GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.waspscripts.com — Data Data¶This page is about fetching game data with WaspLib. WaspLib has several tools to get information about items, npcs, weapons, … TItemData¶Record responsible for providing item information in WaspLib. TItemPriceData¶Record responsible for holding item price data. ItemData.GetDefinition¶function TItemData.GetDefinition(id: Integer): TItemDefinition; This is mostly for internal use but you may use it for whatever you wish. This returns the TItemDefinition of an item, read straight from the game cache. Item definitions are items information stored in the game cache, things like:
Example: id := ItemFinder.Database.Get('abyssal whip', 'item', 'id'); def := ItemData.GetDefinition(StrToInt(id)); WriteLn def.Name, ' costs ', def.Cost; ItemData.GetTradeableID¶function TItemData.GetTradeableID(item: TItem): String; Mostly for internal use but you may use it as you see fit. Some items in the game have versions of themselves that are not tradeable and can’t be used to fetch item prices, such as degraded items, ornamented items, etc. This function checks every id associated with the specified The first tradeable id found is returned. Example: WriteLn ItemData.GetTradeableID('Rune scimitar'); //rune scimitar has 2 ids and one is not tradeable. ItemData.GetPriceData¶function TItemData.GetPriceData(item: TItem): TItemPriceData; Method used to return the price data of the specified Example: var priceData: TItemPriceData; begin priceData := ItemData.GetPriceData('Abyssal whip'); WriteLn('High: ' + ToStr(priceData.high) + ' Low: ' + ToStr(priceData.low)); end; ItemData.GetPrice¶function TItemData.GetPrice(item: TItem): Integer; Method used to return the average price of the specified Example: WriteLn ItemData.GetPrice('Abyssal whip'); ItemData.GetLowAlch()¶function TItemData.GetLowAlch(item: TItem): Integer; Method used to get the the low alchemy value of an item. Example: WriteLn ItemData.GetLowAlch('Magic longbow'); ItemData.GetHighAlch()¶function TItemData.GetHighAlch(item: TItem): Integer; Method used to get the the high alchemy value of an item. Example: WriteLn ItemData.GetHighAlch('Magic longbow'); ItemData variable¶Global TItemData variable. TGearData¶Type responsible for retrieving gear data. “Gear” refers to as any equippable item in the game. GearData.Setup¶procedure TGearData.Setup(); Internal method to setup TGearData, loading GearData.GetArray¶function TGearData.GetArray(index: Integer): TJSONItem; function TGearData.GetArray(key: String): TJSONItem; overload; Method to fetch json arrays from gear.json. Note Using this requires knowledge of the structure of gear.json GearData.GetItems¶function TGearData.GetItems(key: Integer): TItemArray; function TGearData.GetItems(key: String): TItemArray; overload; Method to fetch items under a key in gear.json. GearData variable¶Global TGearData variable. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |