Olá pessoal, gostaria de saber se alguém pode me ajudar com as quests opcionais, tipo anihi, ou poi. Fiz 5 armas vips e coloquei uma em cada baú, queria saber o script para o jogador poder pegar apenas um item desses 5. Andei olhando um outro script, mas da erro quando eu dou reload. Desde já, obrigado.
Quest Opcional

<action actionid="9910;9911;9912;9913;9914" script="NOMEDOSCRIPT" />
function onUse(cid, item, frompos, item2, topos)
local storage = 92120
local itens = {2160,2161,2162,2163,2164}
if actionid == 9910 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[1],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 9911 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[2],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 9912 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[3],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 9913 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[4],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 9914 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[5],1)
setPlayerStorageValue(cid,storage,1)
end
end
Sublinhado -> id da actionid que você bota na propriedade do bau
Negrito -> id dos itens
Luminous rep-, crie o script e ensine-o a utilizar isso é considerado flood.
Atenciosamente, Vilden.
O que que é o 'localstorage = 92120'?
É um id que vai ser inserido no character, assim impossibilitando ele de pegar vários itens.
Acho que não é necessário mudar ali, só se já existe esse id de storage em alguma script, meio difícil.
Atenciosamente, Vilden.
Não deu certo
function onUse(cid, item, frompos, item2, topos)
local storage = 92120
local itens = {7958,7423,7434,8931,7366}
if actionid == 1985 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[1],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 1986 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[2],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 1987 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[3],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 1988 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[4],1)
setPlayerStorageValue(cid,storage,1)
elseif actionid == 1989 and getPlayerStorageValue(cid,storage) == -1 then
doPlayerAddItem(cid,itens[5],1)
setPlayerStorageValue(cid,storage,1)
end
end
<action actionid="1985;1986;1987;1988;1989" script="viparmas.lua" />
Luminous, o que mudei desse que você postou por último pro de cima que coloquei, que não funcionou?
Vilden??? Não deu certo o que você me mandou, coloquei ali em cima /\ tudo como coloquei no script do meu ot.
Acho que esse vai ajudar, você só precisa colocar o uniqueid em cada baú no lugar do 6000, nessa linha.
if item.uid == 6000 then
Outra coisa, é adicionar o nome do item na mensagem. Crie um arquivo em actions>script e cole isso dentro do seu nomedoseuarquivo.lua
function onUse(cid, item, fromPosition, itemEx, toPosition) local storage = 3543 if item.uid == 6000 then stor = getPlayerStorageValue(cid,storage) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a NOME DO ITEM.") doPlayerAddItem(cid,7958,1) setPlayerStorageValue(cid, storage) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 6001 then stor = getPlayerStorageValue(cid,storage) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a NOME DO ITEM.") doPlayerAddItem(cid,7423,1) setPlayerStorageValue(cid, storage) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 6002 then stor = getPlayerStorageValue(cid,storage) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a NOME DO ITEM.") doPlayerAddItem(cid,7434,1) setPlayerStorageValue(cid, storage) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 6003 then stor = getPlayerStorageValue(cid,storage) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a NOME DO ITEM.") doPlayerAddItem(cid,8931,1) setPlayerStorageValue(cid, storage) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 6004 then stor = getPlayerStorageValue(cid,storage) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a NOME DO ITEM.") doPlayerAddItem(cid,7366,1) setPlayerStorageValue(cid, storage) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end end return true end
Em actions.xml você coloca:
<action uniqueid="6000" script="nomedoseuarquivo.lua" />
<action uniqueid="6001" script="nomedoseuarquivo.lua" />
<action uniqueid="6002" script="nomedoseuarquivo.lua" />
<action uniqueid="6003" script="nomedoseuarquivo.lua" />
<action uniqueid="6004" script="nomedoseuarquivo.lua" />
Lembrando de que, se o uniqueid do baú for diferente desses, mudar no script e mudar na tag. Vlw, abraço!

Leoxtibia, fiz isso que você falou, mas da para pegar todos os itens...
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storage = 3543
if item.uid == 1985 then
stor = getPlayerStorageValue(cid,storage)
if stor == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Staff.")
doPlayerAddItem(cid,7958,1)
setPlayerStorageValue(cid, storage)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1986 then
stor = getPlayerStorageValue(cid,storage)
if stor == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Club.")
doPlayerAddItem(cid,7423,1)
setPlayerStorageValue(cid, storage)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1987 then
stor = getPlayerStorageValue(cid,storage)
if stor == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Axe.")
doPlayerAddItem(cid,7434,1)
setPlayerStorageValue(cid, storage)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1988 then
stor = getPlayerStorageValue(cid,storage)
if stor == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Sword.")
doPlayerAddItem(cid,8931,1)
setPlayerStorageValue(cid, storage)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1989 then
stor = getPlayerStorageValue(cid,storage)
if stor == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Star.")
doPlayerAddItem(cid,7366,1)
setPlayerStorageValue(cid, storage)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return true
end
<action uniqueid="1985" script="viparmas.lua" />
<action uniqueid="1986" script="viparmas.lua" />
<action uniqueid="1987" script="viparmas.lua" />
<action uniqueid="1988" script="viparmas.lua" />
<action uniqueid="1989" script="viparmas.lua" />
É, errei em uma coisa... coloca esse no lugar:
function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 1985 then stor = getPlayerStorageValue(cid,3543) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Staff.") doPlayerAddItem(cid,7958,1) setPlayerStorageValue(cid,3543,1) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 1986 then stor = getPlayerStorageValue(cid,3543) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Club.") doPlayerAddItem(cid,7423,1) setPlayerStorageValue(cid,3543,1) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 1987 then stor = getPlayerStorageValue(cid,3543) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Axe.") doPlayerAddItem(cid,7434,1) setPlayerStorageValue(cid,3543,1) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 1988 then stor = getPlayerStorageValue(cid,3543) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Sword.") doPlayerAddItem(cid,8931,1) setPlayerStorageValue(cid,3543,1) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end elseif item.uid == 1989 then stor = getPlayerStorageValue(cid,3543) if stor == -1 then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a VIP Star.") doPlayerAddItem(cid,7366,1) setPlayerStorageValue(cid,3543,1) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.") end end return true end

Obrigado, deu certo!
Dúvida Sanada.
Tópico reportado para moverem !
Me segui lá (:
Dúvida sanada, movido.
Atenciosamente, Vilden.
Boa Noite desculpe se estou postando nesse tópico mais foi oque melhor eu achei (que chega mais perto da minha duvida) vamos la
Eu Criei um OT de pvp enforced, (criei nao editei um) e fiz uns novos itens porem que por eles no final da quest com estilo da poi nao sei como eh mas ja tentei vários scripts e nunca da certo eu queria que se vcs pudesse me ajudar a fazer esse script vou postar o nome dos itens com o ID dos mesmo se alguem puder me ajudar...
8926 Chuck Norris Axe
7391 Chuck Norris Sword
7379 Chuck Norris Club
2399 Chuck Norris Star
7869 Chuck Norris Wand
7763 Chuck Norris Rod
vou postar uma foto de como fiz a quest no RME, e as coordenadas dos baus
Bau:
ID | Nome do Item | Coordenada do Bau
8926 Chuck Norris Axe 1968/1009/8
7391 Chuck Norris Sword 1966/1009/8
7379 Chuck Norris Club 1964/1009/8
2399 Chuck Norris Star 1962/1009/8
7869 Chuck Norris Wand 1960/1009/8
7763 Chuck Norris Rod 1958/1009/8
[spoiler][img]http://img843.imageshack.us/img843/8761/semttulohyd.png[/img][/spoiler]
Preciso disso pois só falta isso para liberar essa areá no meu ot, grato.