Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

BuyItem(), SellItem(), GetCost()


  • Please log in to reply
4 replies to this topic

#1
Tiritto

Tiritto

    Script Developer

  • Members
  • 377 posts
  • LocationPoland

int BuyItem(number);

Where number is unique identifier of the item based on League of Legends API
Returns false if player is too far away from the shop, he got not enough money or item cannot be bought and returns true on success.

Value of number cannot be nil. Throw critical error if it is.

 

__________________________________________________________________________________________________________________

 

int SellItem(slot);
 
Where slot is unique number of the slot that contains an item you want to sell.
Returns false if player is too far away from the shop or item cannot be sold and returns true on success.

Value of slot cannot be nil. Throw critical error if it is.
 
__________________________________________________________________________________________________________________
 

int GetCost(number);
 

Where number is unique identifier of the item based on League of Legends API
Returns cost of an item as int or returns nil if item cannot be bought. This value takes takes into account all previously purchased items so cost is smaller for each component you posses.

Value of number cannot be nil. Throw critical error if it is.

 
__________________________________________________________________________________________________________________

 

int GetPrice(number);
 
Alias for the int GetCost(number); function.

 
__________________________________________________________________________________________________________________
 

int GetOriginalPrice(number);
 

Where number is unique identifier of the item based on League of Legends API
Returns full cost of an item as int or returns nil if item cannot be bought. This value remains intact even if you already own some components for the final item.

Value of number cannot be nil. Throw critical error if it is.


  • 0

#2
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts

we arleady have buyItem()


  • 0

#3
Darkness

Darkness

    GoSDB's manager

  • Banned
  • PipPipPip
  • 1,137 posts

why do we need to sell o-o?


  • 0

#4
Tiritto

Tiritto

    Script Developer

  • Members
  • 377 posts
  • LocationPoland

we arleady have buyItem()

Yea I realized my mistake after I posted this topic.

This function is very easy to oversight atm.

why do we need to sell o-o?

For example, for selling all Stealth Wards after buying Sightstone. 

  • 0

#5
ilovesona

ilovesona

    Sona's wife

  • Contributor
  • 1,096 posts

another bot script? :fappa:


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users