Zerville
New Member
- Joined
- Sep 19, 2008
- Messages
- 47
- Reaction score
- 0
How can i do in a click and buy system to get only 1 single item and no bps or such?
This is with a bp:
This is with a bp:
Code:
function onUse(cid, item, frompos, item2, topos)
req = 45
cost = 6000
container = doPlayerAddItem(cid, 2003, 1)
if item.itemid == 1285 and doPlayerRemoveMoney(cid,cost) == 1 and getPlayerLevel(cid) >= req then
for i = 1,20 do
doAddContainerItem(container, 2268, 5)
doPlayerSendTextMessage(cid, 24, "You bought a bp of runes")
doSendMagicEffect(topos,12)
end
else
doPlayerSendCancel(cid,"A backpack of rune costs 6000 gps.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return 1
end