Maldero
/root/
Hello i have problem with script on tfs 1.0
This is script:
And problem is: When knight advance to lv 45 he get voodo doll
But should get weapons.. ;/
This is script:
Code:
function onAdvance(cid, oldLevel, newLevel)
if getPlayerLevel(cid) >= 20 and getPlayerStorageValue(cid, 90005) == -1 then
if getPlayerVocation(cid) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 2 cc and wand.")
doPlayerAddItem(cid, 2160, 2)
doPlayerAddItem(cid, 2188, 1)
elseif getPlayerVocation(cid) == 2 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 2 cc and rod.")
doPlayerAddItem(cid, 2160, 2)
doPlayerAddItem(cid, 2185, 1)
elseif getPlayerVocation(cid) == 3 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 2 cc and spears.")
doPlayerAddItem(cid, 2160, 2)
doPlayerAddItem(cid, 2389, 5)
elseif getPlayerVocation(cid) == 4 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 2 cc and weapons.")
doPlayerAddItem(cid, 2160, 2)
doPlayerAddItem(cid, 2423, 1)
doPlayerAddItem(cid, 7385, 1)
doPlayerAddItem(cid, 2435, 1)
end
setPlayerStorageValue(cid, 90005, 1)
end
if getPlayerLevel(cid) >= 45 and getPlayerStorageValue(cid, 90010) == -1 then
if getPlayerVocation(cid) == 1 or 5 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 3 cc and wand.")
doPlayerAddItem(cid, 2160, 3)
doPlayerAddItem(cid, 8922, 1)
elseif getPlayerVocation(cid) == 2 or 6 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 3 cc and rod.")
doPlayerAddItem(cid, 2160, 3)
doPlayerAddItem(cid, 8910, 1)
elseif getPlayerVocation(cid) == 3 or 7 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 3 cc and enchanted spears.")
doPlayerAddItem(cid, 2160, 3)
doPlayerAddItem(cid, 7367, 5)
elseif getPlayerVocation(cid) == 4 or 8 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 3 cc and weapons.")
doPlayerAddItem(cid, 2160, 3)
doPlayerAddItem(cid, 7419, 1)
doPlayerAddItem(cid, 3961, 1)
doPlayerAddItem(cid, 7404, 1)
end
setPlayerStorageValue(cid, 90010, 1)
end
if getPlayerLevel(cid) >= 75 and getPlayerStorageValue(cid, 90015) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 5 cc.")
doPlayerAddItem(cid, 2160, 5)
setPlayerStorageValue(cid, 90015, 1)
end
if getPlayerLevel(cid) >= 100 and getPlayerStorageValue(cid, 90020) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 8 cc.")
doPlayerAddItem(cid, 2160, 8)
setPlayerStorageValue(cid, 90020, 1)
end
if getPlayerLevel(cid) >= 150 and getPlayerStorageValue(cid, 90025) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 10 cc.")
doPlayerAddItem(cid, 2160, 10)
setPlayerStorageValue(cid, 90025, 1)
end
if getPlayerLevel(cid) >= 275 and getPlayerStorageValue(cid, 90045) == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have received 25 cc and mount doll.")
doPlayerAddItem(cid, 2160, 25)
doPlayerAddItem(cid, 13565, 1)
setPlayerStorageValue(cid, 90045, 1)
end
end
And problem is: When knight advance to lv 45 he get voodo doll