Hi Guys, maybe someone is able to help me? TFS 1.2 , I did Script for Exp voucher and its doesnt work. Everythink is fine, but the problem is, people dont get (x30) exp, when use voucher. My exp server is on stages. Until 600 lvl is x300 , and from lvl 600 to 999 is x10. Thats why i want to create voucher for exp x30 by 1 hour.
This is what happend when i use item voucher in game, it is removed from backpack like should and get message:
http://s5.ifotos.pl/img/Beztytulu_qnewxhw.jpg
So....
Items.xml
Actions.xml (of course i put exp.voucher.lua to folder)
Expvoucher.lua
Anybody know how to fix it please?
This is what happend when i use item voucher in game, it is removed from backpack like should and get message:
http://s5.ifotos.pl/img/Beztytulu_qnewxhw.jpg
So....
Items.xml
Code:
<item id="8981" article="a" name="EXP Voucher x30">
<attribute key="weight" value="2400" />
<attribute key="description" value="x30 EXP Voucher by 1 hour." />
Actions.xml (of course i put exp.voucher.lua to folder)
Code:
<action itemid="8981" script="other/expvoucher.lua"/>
Expvoucher.lua
Code:
function onUse(cid, item, frompos, item2, topos)
local pausa = 60*60*1000 -- (1000 = 1 second)
local texto = "You have 30 times more experience for 1 hour, do not logout or else you will loose the bonus."
local exp = 30 -- How much you want over your experience, for example 2 is 2x your server's rates.
doPlayerSendTextMessage(cid, 22, "Have fun with Your x30 EXP.")
doRemoveItem(item.uid,1)
Game.getExperienceStage(cid,exp)
doSendMagicEffect(frompos,13)
doPlayerSendTextMessage(cid,22,texto)
end
function potion(pos, cid)
doPlayerSetExperienceRate(pos,expfinal)
doPlayerSendTextMessage(pos,22,textofinal)
end
Anybody know how to fix it please?