Ecstacy
Mothafuckaaa
Hello,
I'm starting to script an go to mainland script, but now when I'm at the part to chose the vocation, it can't get the player where I need to get the storage value of :blink:
ALSO, only mind the arganoth part, icarus is not done.
Here's the script:
+rep if you fix it. :thumbup:
thanks,
unknown666
I'm starting to script an go to mainland script, but now when I'm at the part to chose the vocation, it can't get the player where I need to get the storage value of :blink:
ALSO, only mind the arganoth part, icarus is not done.
Code:
[19/07/2009 15:28:11] luaGetPlayerStorageValue(). Player not found
Here's the script:
PHP:
//Arganoth//
local argpos = {x = 1333, y = 984, z = 7} //Town Temple postion //town 1
//Icarus//
local icapos = {x = 1323, y = 702, z = 7} //Town Temple Postion //town 2
function onSay(cid, words, param)
if param == 'arganoth' then //town name
if getPlayerLevel(cid) >= 8 then //Required LEvel
if getPlayerStorageValue(cid, 123123) == -1 then //Storage Value
doPlayerSendTextMessage(cid,4,"You may now choose a vocation! type !main 'vocation'") //Message when done
setPlayerStorageValue(cid, 123123, 1) //prevention from multiple times choosing vocation and going to main
setPlayerStorageValue(cid, 123124, 1) //turn on the ability to choose vocation
elseif getPlayerStorageValue(cid, 123124, 1) == 1 then //Vaction storage value
if param == 'sorcerer' then //sorcerer
doPlayerSetTown = 2 //town ID
doTeleportThing(cid, argpos) // teleports to argpos
doPlayerSetVocation(cid,1) // Sorcerer
doPlayerSendTextMessage(cid,4,"You are now one of the mighty sorcerer's of Arganoth!") // Succeed message
setPlayerStorageValue(cid, 123123, 2) // prevention from going to main more as once
setPlayerStorageValue(cid, 123124, 2) // Prevention from choosing vocations twice
elseif param == 'druid' then // druid
doPlayersetTown = 2 // town ID //should be the same as the above
doTeleportThing(cid, argpos) // teleports to argpos
doPlayerSetVocation(cid,2) // druid
doPlayerSendTextMessage(cid,4,"You are now an intelligent druid of Arganoth!") // succeed message
setPlayerStorageValue(cid, 123123, 2) // prevention from going to main more as once
setPlayerStorageValue(cid, 123124, 2) // Prevention from choosing vocations twice
elseif param == 'paladin' then // paladin
doPlayerSetTown = 2 // town ID
doTeleportThing(cid, argpos) // argpos
doPlayerSetVocation(cid,3) // paladin
doPlayerSendTextMessage(cid,4,"You are now a stratigic paladin of Arganoth!") // succeed message
setPlayerStorageValue(cid, 123123, 2) // prevention from going to main more as once
setPlayerStorageValue(cid, 123124, 2) // Prevention from choosing vocations twice
elseif param == 'knight' then // knight
doPlayerSetTown = 2 // town ID
doTeleportThing(cid,argpos) // argpos
doPlayerSetVocation(cid,4) // Knight
doPlayerSendTextMessage(cid,4,"You are now one of the brutal knights of Arganoth!") // succeed message
setPlayerStorageValue(cid, 123123, 2) // prevention from going to main more as once
setPlayerStorageValue(cid, 123124, 2) // Prevention from choosing vocations twice
end
return TRUE
elseif getPlayerStorageValue(cid, 123123) == 1 then // you need to choose a vocation
doPlayerSendTextMessage(cid,4,"You need to choose a vocation!")
doPlayerSendCancel(cid,'')
elseif getPlayerStorageValue(cid, 123123) == 2 then
doPlayerSendTextMessage(cid,4,"You need to be level 8 to go to main!") // you are in main
doPlayerSendCancel(cid,'')
end
return TRUE
elseif param == 'icarus' then
if getPlayerLevel(cid) >= 8 then
if getPlayerStorageValue(cid, 123123) == -1 then
doTeleportThing(cid, icapos)
doPlayerSendTextMessage(cid,4,"You are now a citizen of Icarus!")
doPlayerSetTown(cid, 3)
setPlayerStorageValue(cid, 123123, 1)
else
doPlayerSendTextMessage(cid,4,"You are already in main!")
doPlayerSendCancel(cid,'')
end
return TRUE
else
doPlayerSendTextMessage(cid,4,"You need level 8 to go to icarus.")
doPlayerSendCancel(cid,'')
end
return TRUE
end
return FALSE
end
end
+rep if you fix it. :thumbup:
thanks,
unknown666
Last edited: