OT

Meu Script Nãofuncionou.

Por othereality, 20 de jun. de 2011 em Scripts

script
3
1k
otherealityO
20 de junho de 2011 às 12:18

Mesmo sabendo que não tenho muitas condições eu tentei fazer,

deveria ser um script que ao usar uma estatua voce ganha Promotion:

 

function onUse(cid,item,frompos,item2,topos)

if item.uid == 25555 then

 

 

local teleport = {x=1006, y=1009, z=8}

 

if reqvoc == 1 then

doPlayerSetVocation(cid,5)

doTeleportThing(cid, teleport)

doPlayerAddItem(cid, 2175, 1)

else

doPlayerSendCancel(cid,"...")

end

 

if reqvoc == 2 then

doPlayerSetVocation(cid,6)

doTeleportThing(cid, teleport)

doPlayerAddItem(cid, 2175, 1)

else

doPlayerSendCancel(cid,"...")

end

 

if reqvoc == 3 then

doPlayerSetVocation(cid,7)

doTeleportThing(cid, teleport)

doPlayerAddItem(cid, 2175, 1)

else

doPlayerSendCancel(cid,"...")

end

 

if reqvoc == 4 then

doPlayerSetVocation(cid,8)

doTeleportThing(cid, teleport)

doPlayerAddItem(cid, 2175, 1)

else

doPlayerSendCancel(cid,"...")

end

 

return true

end

 

 

Mas não funcionou =S

alguem sabe arrumar pra mim?

Vlw.

20 de junho de 2011 às 12:50

function onUse(cid,item,frompos,item2,topos)

if item.uid == 25555 then

local teleport = {x=1006, y=1009, z=8}

if isInArray({1,2,3,4}, getPlayerVocation(cid)) then
doPlayerSetVocation(cid, getPlayerVocation(cid) + 4)
doTeleportThing(cid, teleport)
doPlayerAddItem(cid, 2175, 1)
else
doPlayerSendCancel(cid,"...")
end

end

return true
end

 

Uma coisa que eu sempre falo, não precisa colocar item.uid no script se você colocar na tag.

 

A menos que sejam vários uids pro mesmo script.

 

Até.

otherealityO
20 de junho de 2011 às 16:13

suaihsaushu...

 

Bem mais simples do que eu fasso parecer :confused:

vlw pela dica =D

 

DemonB. >> REP+

Editado Junho 20 por OtheReality