OT

Item Que Da Storage.

Por othereality, 11 de jun. de 2011 em Scripts

6
2k
otherealityO
11 de junho de 2011 às 13:48

Eu tava tentando fazer um negocio bem simples mas não to conseguindo:

 

um item qualquer no jogo que tem uma action id que deveria dar uma storage ao clicar.

por exemplo uma arvore de laranja, você clica e ganha uma storage no caso eu ia usar 25504.

se alguem souber me ajudar agradeço..

vlw.

DarkwathD
11 de junho de 2011 às 15:33

Tenta assim:

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


if item.uid == 5004 then
	queststatus = getPlayerStorageValue(cid,25504)
	if queststatus == -1 then
	setPlayerStorageValue(cid,25504,1)
	else
	doPlayerSendTextMessage(cid,22,"Sorry not possible")
end
else
return 0
end
return 1
end 

apenas mude o uniqueid se nao funcionar me fala

otherealityO
11 de junho de 2011 às 17:52

testando...

 

EDIT:

 

minha tag:

 

	<action itemid="2247" event="script" value="chave.lua"/>

 

meu script:

 

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


       if item.uid == 2247 then
       queststatus = getPlayerStorageValue(cid,99857)
       if queststatus == -1 then
       setPlayerStorageValue(cid,99857,1)
       else
       doPlayerSendTextMessage(cid,22,"Sorry not possible")
       end
       else
       return 0
       end
       return 1
       end 

 

não ta funcinando.

 

 

 

 

uma ultima coisa,

ei poderia fazer isso??

 

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

 

 

if item.uid == 2247 then

queststatus = getPlayerStorageValue(cid,99857)

if queststatus == -1 then

setPlayerStorageValue(cid,99857,1)

doPlayerSendTextMessage(cid,22,"Voce encontrou uma chave.")

else

doPlayerSendTextMessage(cid,22,"Sorry not possible")

end

else

return 0

end

return 1

end

Editado Junho 11 por OtheReality

11 de junho de 2011 às 18:29

function onUse(cid, item)

if getPlayerStorageValue(cid, 25504) == -1 then
setPlayerStorageValue(cid, 25504, 1)
doPlayerSendTextMessage(cid, 22, "Voce encontrou uma chave.")
else
doPlayerSendTextMessage(cid, 22, "Voce já fez esta quest.")
return FALSE
end

return TRUE
end

 

<action actionid="AID" event="script" value="chave.lua"/>

otherealityO
12 de junho de 2011 às 00:31

Vlw DemonB.

Sempre ajudando =D

REP+

2 meses depois...
28 de agosto de 2011 às 02:04

function onUse(cid, item)

 

if getPlayerStorageValue(cid, 25504) == -1 then

setPlayerStorageValue(cid, 25504, 1)

doPlayerSendTextMessage(cid, 22, "Voce encontrou uma chave.")

else

doPlayerSendTextMessage(cid, 22, "Voce já fez esta quest.")

return FALSE

end

 

return TRUE

end

 

 

<action itemid="8306" event="script" value="chave.lua"/>

 

 

como eu faso pra ela remover o item que usa para dar a storage? no caso seria itemid="8306"