Hello everyone.
I use script to change vocation in game, it work.
There is the script. \/
But my problem is when i relog with new vocation i become to normal vocation for example.
16:56 You see yourself. You are a sniper.
And when i relog i become
16:56 You see yourself. You are a druid.
Please Help
I use script to change vocation in game, it work.
There is the script. \/
But my problem is when i relog with new vocation i become to normal vocation for example.
16:56 You see yourself. You are a sniper.
And when i relog i become
16:56 You see yourself. You are a druid.
Please Help
Code:
local storage = 45001
local n = 15 -- number of vocations in server.
-- not including vocation '0', rookgaardian or promotions
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, storage) == 1 then
doPlayerSendCancel(cid, "Vocation already changed.")
return true
end
local rand = math.random(1, n)
doPlayerSetVocation(cid, rand)
-- doRemoveItem(item.uid, 1)
-- setPlayerStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your vocation has been changed to " .. getPlayerVocation(cid) ..".")
return true
end
Last edited by a moderator: