Sunteți pe pagina 1din 8

Changes from SRL-5 to SRL-6

General Changes As stated above, SRL now runs in resizable mode (any screen size), and in OpenGL. The interface constants (MMX1, MSCX, MCY2, etc.) have been removed. You should now use the TRSInterface variable (i.e. minimap.x1, or minimap.getBounds()). Lape doesn't currently support an "addOnTerminate" feature. Because of this, terminateScript() should be called at the very end of every script this will allow SRL variables such as bitmaps and files to be freed properly. Data with prefixes "_" or "__" is internal SRL data. Neither should be used outside SRL unless you know what you're doing; however, data with a single "_" won't harm anything if used. Data with a double "__" are meant for inside SRL only. If you think you need to use an internal function, there's likely an alternative that should be used. If you are unsure, don't hesitate to ask.

lib/core/debug.simba New variables: disableSRLDebug, disableSRLLog, and disableIPScreenshots (should be set before setupSRL() is called). Log files are, by default, saved to SRL-6/logs/. Function TakeIPScreen replaced with takeScreenshot(). Functions added from SRL-5's misc/debug.simba: debugBitmap(), debugTPA(), debugATPA(), and debugATPABounds(). Debug levels are now expressed as a TDebug enum (i.e. TDebug.ERROR). SRL_Warn replaced with print(). Debugging guidelines are at the top of debug.simba. We highlly recommend adopting SRL's debugging system for your scripts. If you've ever seen MSI's debug, it looks just like it.

lib/core/globals.simba All global data is stored in its respective files. Other data is stored here. SRL_Procs renamed to SRL_Events.

lib/core/mouse.simba WindMouse split into _humanWindMouse() and _brakeWindMouse(). MMouse and Mouse combined to mouse() overload functions, and now take a TPoint parameter, rather than x, y coordinates. ClickMouse2 renamed fastClick(). didClick() calls fastClick() and returns true if the colored X is found. New function, multiClick(), used to simulate when humans "spam-click" objects. New function, mouseScroll(), that uses the mouse wheel to scroll through windows. sleepAndMoveMouse moved to antiban.simba mouseBox now takes a TBox parameter rather than coordinates. DragMouseTBox renamed to dragMouse(). Functions removed: IdleTime, MouseTBox, DidRedClick, DidYellowClick, and MouseBoxEx.

lib/core/players.simba Merged with SRL-5's login.simba. Most functions are of the TPlayer or TPlayerArray type, meaning they are called using the players or players[currentPlayer] variables. LoggedIn remains its own function, and has been renamed to isLoggedIn(). Each player's .world attribute is set to -1 by default, meaning it won't select a world. Setting it to 0 will choose a random world, otherwise it will choose the specified world. TUser renamed to TPlayer. Attributes removed: WorldInfo, Nick, Status, Skill, Banked, Rand, Arrays, and BoxRewards. Attributes renamed: loginName, bankPin, password, and location. Attributes added: displayName, findMod, findTrade, reincarnate, and world. Variables removed: CheckHPFirst, LogoutOnMod, Reincarnate, and PlayerCurTime. TPlayer.worked type changed to TTimeMarker (see time.simba). To get the player's time worked, call: Simba Code: players[currentPlayer].worked.getTime(); Functions removed: AllPlayersInactive, NumberOfPlayers, and all Audio/Graphics functions. Functions renamed: o PlayersActive TPlayerArray.getActive(). o LoggedIn isLoggedIn(). o PlayerWorked TPlayer.addWorked(). o LoginPlayerToLob TPlayer.loginToLobby(). o LoginPlayer TPlayer.login(). o NextPlayerIndex/NextPlayer TPlayerArray.next(). o RandomPlayerIndex/RandomNextPlayer TPlayerArray.randomNext(). Function added, TPlayerArray.setup() that needs to be called in declarePlayers().

lib/core/text.simba TypeSendEx removed and an optional parameter, "pressEnter", added to typeSend(). FindTextTPAEx and FindTextTPA merged into a findText() overload. IsUpText (and like functions) replaced with isMouseOverText(), which includes an optional time parameter to work like the old WaitUpText. All choose-option functions merged into a single chooseOption(), also with an optional time parameter. Choose option functions will now work with extended menus. FindNPCChatText moved to conversationbox.simba and renamed TRSConversationBox.findDialogText().

lib/interfaces/gametabs/gametab.simba Split into separate files for each gametab (you'll notice that only a few are actually completed). See A How-to On SRL Development if you're interested in developing one of these files. Stores the TRSGameTabs type and general game-tab functions.

GameTab renamed to TRSGameTabs._openTab(). Yes, this is internal -- you should use the tab's open() function (i.e. tabBackpack.open()), but there may not be a variable for the tab you wish to use, so until there is, you can call: Simba Code: gameTabs._openTab(_TAB_TASK); GetCurrentTab renamed to TRSGameTabs.getActiveTab(). Functions added: o TRSGameTabs.findX(). o TRSGameTabs.areTabArrowsVisible(). o TRSGameTabs.areMultiOpen(). o TRSGameTabs.areAnyOpen(). o TRSGameTabs.clearMouseOverText().

lib/interfaces/gametabs/backpack.simba The previous inventory.simba. Jagex renamed to "backpack" upon release of RS3. All functions are of the TRSTabBackpack type, and are called through the tabBackpack variable. New constants: BACKPACK_SLOT_LOW, BACKPACK_SLOT_HIGH, DROP_PATTERN_REGULAR, DROP_PATTERN_BACKWARDS, DROP_PATTERN_SNAKE, and DROP_PATTERN_UP_DOWN. Functions renamed: o InvBox TRSTabBackpack.getSlotBox(). o CoordsToItem TRSTabBackpack.pointToSlot(). o ExistsItem TRSTabBackpack.isItemInSlot(). o InvMouse TRSTabBackpack.mouseSlot(). o DragItem TRSTabBackpack.dragSlot(). o InvCount TRSTabBackpack.count(). o InvEmpty TRSTabBackpack.isEmpty(). o InvFull TRSTabBackpack.isFull(). o CountItems TRSTabBackpack.countDTM(). o ActivatedItem TRSTabBackpack.getActivatedSlot(). o ItemActivated TRSTabBackpack.isSlotActivated(). o DropItem TRSTabBackpack.dropItems(). Functions added: o TRSTabBackpack.clickDTM(). o TRSTabBackpack.waitCount(). o TRSTabBackpack.countDTM(). o TRSTabBackpack.countItemsBitmap(). o TRSTabBackpack.waitForShift(). o TRSTabBackpack.getMoneyPouchAmount(). o TRSTabBackpack.getQuickInventorySlot(). o TRSTabBackpack.setQuickInventorySlot(). Functions removed: o GetInven. o GetInventoryArray. o ItemCoords. o GetInvItemBounds. o ExistItemDTM. o MMouseItem. o MouseItem.

o o o o o o o o

ClickAllItemsExcept. ClickAllItems. DropPattern. DropAllExcept. DropItemsByIdentifer. CountItemBlackLine. ClickAllItemsBlackLine. CountItems.

lib/interfaces/lobby/lobby.simba Lobby functions are now of the TRSLobby type and are called through the variable, "lobby". LobbyScreen renamed to TRSLobby.isOpen(). LobbyTab moved from SRL-5s gametab.simba and renamed TRSLobby._openTab(). New function TRSLobby.findPlayButton(). New function TRSLobby.getCurrentTab(). Lobby tab constants renamed to: LOBBY_PLAYER, LOBBY_WORLDS, LOBBY_FRIENDS, LOBBY_CHAT, LOBBY_CLAN, and LOBBY_OPTIONS.

lib/interfaces/lobby/worlds.simba Renamed from SRL-5s worldswitcher.simba. All functions are of the TRSLobbyWorlds type and are called through the variable, lobbyWorlds. Functions renamed: o WorldScreen TRSLobbyWorlds.isOpen(). o OpenWorldScreen TRSLobbyWorlds.open(). o WS_CurrentWorld/Ex TRSLobbyWorlds.getCurrentWorld(). o OrderWorlds TRSLobbyWorlds.sort(). o FindWorld TRSLobby.selectWorld(). o RandomWorld TRSLobby.selectRandomWorld(). ChangeWorld moved to players.simba and renamed TPlayer.switchWorld(). UpdateWorlds removed as theres no longer a worlds list to be parsed. A worlds.ini file still exists and stores relative information about each world. Language constants removed as they were no longer needed. Functions removed: o GetWorldInfo. o ChooseWorldBy. World switching now uses the mouse wheel to scroll rather than needing to sort the list and use math to find the correct world.

lib/interfaces/minimap.simba A combination of SRL-5s mapwalk.simba, flag.simba, and symbol.simba. All functions are of the TRSMinimap type and are called using the minimap variable. Lodestone functions moved to this file. MMToMS removed. Because of the millions of interface combinations, a function like this isnt really feasible. New functions:

o o o o

TRSMinimap.isPlayerMoving(). TRSMinimap.waitPlayerMoving(). TRSMinimap.getColorPercent(). TRSMinimap.getBlackBackground().

New minimap dot, maximum pixel count, and location direction constants. Functions removed: o VariantToDirection. o RunAway. o RoadColorChecker and its components. o MouseFlagEx. o MFF. o MFNF. o MouseFlag. All radial walk functions combined into one TRSMinimap.radialWalk(). NOTE: Setting the start and end radials to the same value will work like LinearWalk in SRL-5. Functions renamed: o MakeCompass TRSMinimap.setAngle(). o GetMinimapDotsIn TRSMinimap.getDots(). o FindFlag/FindFlag2 TRSMinimap.isFlagPresent().

lib/interfaces/mainscreen.simba FindObject functions moved from SRL-5s objects.simba and renamed TRSMainscreen.findObject(). Camera angle constants renamed with a MS_ prefix.

lib/interfaces/chatbox.simba Renamed from SRL-5s chat.simba. Functions are of the TRSChatbox type and are called using the chatbox variable. The chatbox can be of any size/location. Currently the only function is TRSChatbox.isOpen().

lib/interfaces/conversationbox.simba New file for functions that open the NPC/game conversation box, which is now separate from the in-game chat box. Moved from SRL-5s text.simba and renamed: o FindNPCChatText TRSConversationBox.findDialogText(). o GetNPCChatName TRSConversationBox.getSpeaker(). o AreTalking TRSConversationBox.areTalking(). o ClickContinue TRSConversationBox.continue(). DoConversation removed since it is a very simple logic loop of the above functions.

lib/interfaces/bankscreen.simba All functions are of the TRSBankScreen type and are called using the bankScreen variable.

Only basic slot and tab manipulation functions have been converted from SRL-5. Others are to come later. Functions: o TRSBankScreen.isOpen(). o TRSBankScreen.close(). o TRSBankScreen.getBankItemBounds(). o TRSBankScreen.getPackItemBounds(). o TRSBankScreen.isTabActive(). o TRSBankScreen.openTab(). o TRSBankScreen.scrollUp().

lib/interfaces/interfaces.simba Stores the TRSInterface type (which is inherited by all interface files), and general interface functions. Stores all the interface IDs. Functions: o TRSInterface.getBounds(). o TRSInterface.setBounds(). o TRSInterface.getCenterPoint(). o TRSInterface.drag().

lib/interfaces/options.simba New file for the in-game options menu opened by either clicking the Settings game tab, or pressing the ESC button. Only basic opening and closing functions currently exist for this interface.

lib/items/items.simba Renamed from SRL-5s amount.simba. Functions removed: o ShopSwitchTab. o RuneAmount. o CoinAmount. o FindCoins. o CountItemsArea. o CountItemsIn. o ItemCoordinates. o CheckArea. o AreaInfo. o ShopScreen. Functions added: o findItem() with an overload. o getItemAmount() merged from ItemAmount, GetAmount, and GetAmountBox. o isItemIn().

lib/misc/srlstats.simba Renamed from SRL-5s globalstats.simba. Removed _ from function names/variables.

statsUsername, statsPassword, and statsScriptID need to be set in scripts. stats_Commit and stats_IncVariable renamed to statsCommit() and statsIncVariable(). SetupSRLStats renamed to statsSetup().

lib/misc/smart.simba Set smartClientWidth and smartClientHeight variables to change the size of the client SMART loads. To draw on SMART, simple use one of the many TMufasaBitmap drawing functions added in lib/utilities/drawing.simba. Just call them on the smartImage variable.

lib/misc/antiban.simba Functions renamed: o RandomRClick randomRClickItem(). o AdjustMouseSpeed randomMouseSpeed(). o CompassMovement randomCompass(). Spin ticket functions combined into one function, findSpinTicket(). FindDwarvenPopup removed as its handled in closeAdWindow(). ExamineInv removed as it did the same thing as randomRClickItem(). multiMouse and missMouse moved to mouse.simba. Several other functions are missing due to other parts of the include not being finished.

lib/utilities/types/ The types folder holds several files for different types. It stores a vast variety of functions and procedures used to manipulate the different types. Some functions are in Simba and some arent. Take a look for yourself!

lib/utilities/color.simba A utility file that allows easy color finding in different tolerance speeds. No longer do you need to set and reset color tolerance speeds. This include allows you to do it in one line. Simba Code: findColorTolerance(x, y, color, mainscreen.getBounds(), 15, colorSetting(2, 0.33, 0.05)); These functions will automatically set the CTS back to its original state.

lib/utilities/drawing.simba Converted from SRL-5s smartgraphics.simba. All functions are of the TMufasaBitmap type and can be used with any variable. To draw on SMART, simply call smartImage.drawingFunctionNameHere().

lib/utilities/pixelshift.simba Renamed from SRL-5s animation.simba. PlayerMoving and WaitPlayerMoving moved to minimap.simba

Functions removed: o ReturnGridColorsInBox. o ValidatePixels. o InitBoolArr. o CountBools. o PixelShiftOT. Four overload functions for getPixelShift and getPixelShiftAverage are all that make up this utility file.

lib/utilities/time.simba Renamed from SRL-5s timing.simba. MarkTime and TimeFromMark replaced with TTimeMarker functions.

lib/utilities/wrappers.simba This file includes functions that are in Simba, but give scripters alternate parameters. Finding functions such as findColorTolerance, findBitmap, and findDTM will take TBox parameters as well as coordinates. Check out the file to see the list of available functions.

S-ar putea să vă placă și