Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,618
- Solutions
- 6
- Reaction score
- 537
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Hello Guys!
I created the code, but dosn't work fine, can you help me?
I will explain how the code:
Premium Player have Promotion
Premium ends and player lost promotion
Player buy premium again and get promotion again...
Like Tibia Global works...
Here is the code on login.lua
Thank you!
I created the code, but dosn't work fine, can you help me?
I will explain how the code:
Premium Player have Promotion
Premium ends and player lost promotion
Player buy premium again and get promotion again...
Like Tibia Global works...
Here is the code on login.lua
Code:
-- Players promovidos
if isPremium(cid) == TRUE and getPlayerVocation(cid) > 4 and getPlayerStorageValue(cid, 30003) == -1 then
setPlayerStorageValue(cid, 30003, 1)
elseif isPremium(cid) == FALSE and getPlayerVocation(cid) > 4 and getPlayerStorageValue(cid, 30003) == 1 then
doPlayerSetVocation(cid, getPlayerVocation(cid)-4)
setPlayerStorageValue(cid, 30003, -1)
elseif isPremium(cid) == TRUE and getPlayerVocation(cid) < 5 and getPlayerStorageValue(cid, 30003) == 1 then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
end
Thank you!