function onUse(cid, item, fromPosition, itemEx, toPosition)
local flag = 0
local pos = {x = 100, y = 100, z = 7}
for i = 12252, 12259 do
if getPlayerItemCount(cid, i) >= 1 then
flag = flag+1
end
end
if flag == 8 then
doTeleportThing(cid, pos)
doSendMagicEffect(getThingPos(cid), 21)
return true
end
sendMsgToPlayer(cid, 20, "You need all badges to pass!")
return true
end
<action actionid="xxxx" event="script" value="yyyy.lua"/>
xxxx = action da porta
yyyy = nome do script








info
Grupo: Campones
Registrado: 29/11/11
Posts: 19
Reputação: 0
Gostaria de criar uma porta q só pode passar qm tiver as 8 insignias, a porta iria checar se o player teria as insignias e teleportar ele para dentro. Obg.
Id das insignias:
["Brock"] = 12252,
["Misty"] = 12253,
["Surge"] = 12254,
["Erika"] = 12255,
["Sabrina"] = 12256,
["Koga"] = 12257,
["Blaine"] = 12258,
["Kira"] = 12259}