Forum General
1st Donator Division
Anyone know what is exactly wrong with this?
It is basically a simple script where you click on an object in the game and it changes your vocation.
When I use the current script in the game, it does the smoke on the object and says "You already chose your vocation!". I want it to say "You are now a druid!".
I have a feeling that something is wrong in the storage value, but I'm not exactly sure.
Here is adruid.lua:
It is basically a simple script where you click on an object in the game and it changes your vocation.
When I use the current script in the game, it does the smoke on the object and says "You already chose your vocation!". I want it to say "You are now a druid!".
I have a feeling that something is wrong in the storage value, but I'm not exactly sure.
Here is adruid.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
stor = getPlayerStorageValue(cid, 10050)
if isPlayer(cid) and stor == 0 then
doSendMagicEffect(fromPosition, 13)
doPlayerSetVocation(cid, 2)
doPlayerSetStorageValue(cid, 10050, 1)
doCreatureSay(cid, "You are now a druid!", TALKTYPE_ORANGE_1)
else
doSendMagicEffect(fromPosition, 2)
doCreatureSay(cid, "You already chose your vocation!", TALKTYPE_ORANGE_1)
end
return true
end