• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to sell an item with charges???

Joined
Jul 15, 2008
Messages
38
Reaction score
0
Location
BRAZIL
Hello!

In this new Npc system, my NPC's doesn't work!

Code:
shopModule:addBuyableItem({'sudden death', 'sd'},				2268, 10000,	100,	'sudden death rune')

This should sell a 100 charges SD, but it sell a 1x only...

i tried in the XML too:
Code:
<parameter key="shop_buyable" value="sd,2268,9750,100"/>


How can i sell an item with charges?

Thanks a lot!
 
add
shopModule:addBuyableItem({'sudden death', 'sd'},2268,9750,100)

at your npc_rune_script.lua
 
Some ppl don't read the posts
and go for the reply...


READ MY POST, AND AFTER TRY TO HELP. -.-
 
Please close this thread.

USE THE SEARCH FUNCTION! FOR SOMETHING IT IS THERE.

I bet someone has already asked this.
 
Search for CreateItem in luascript.cpp, add these lines and compile your exe. Your npcs will always sell amulets and might ring with the right charges.

if(itemId == 2197 || itemId == 10219 || itemId == 10221 || itemId == 10220)
newItem->setCharges(5);
else if(itemId == 2164)
newItem->setCharges(20);
else if(itemId == 2198)
newItem->setCharges(50);
else if(itemId == 2199)
newItem->setCharges(150);
else if(itemId == 2201 || itemId == 2172 || itemId == 2170 || itemId == 7887 || itemId == 7888 || itemId == 7889 || itemId == 7890 || itemId == 2161)
newItem->setCharges(200);
else if(itemId == 2200)
newItem->setCharges(250);
 
Back
Top