It's hard what you saycan someone help me make a new promotion for vocations premium account, which player to become premium, so going to the new vocation and when the premium days are over, go back to master
I can find this script, but it doesn't work on tfs 1.3, and I wanted it to work on premium account
--[[ by vodkart ]]--
function onLogin(cid)
if vip.hasVip(cid) == TRUE then
if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then
doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
end
elseif vip.hasVip(cid) == FALSE and vip.getVip(cid) == 0 then
if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then -- id das vocation epic
doPlayerSetVocation(cid,getPlayerVocation(cid)-4)
end
end
return TRUE
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local vocation = player:getVocation():getId()
if vocation >= 5 and vocation <= 8 then
vocation = vocation + 4
player:setVocation(vocation)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You've been promoted! Congratulations!")
item:remove()
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You're already at the maximum promotion level. Unable to utilize this item.")
end
return true
end
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local vocation = player:getVocation():getId()
if vocation >= 5 and vocation <= 8 then
vocation = vocation + 4
player:setVocation(vocation)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You've been promoted! Congratulations!")
item:remove()
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You're already at the maximum promotion level. Unable to utilize this item.")
end
return true
end