Gabriel Tibiano
New Member
- Joined
- Nov 21, 2009
- Messages
- 420
- Reaction score
- 4
Can anyone simplify this script to me?
When a person enters the teleport with the item of the Pharaoh, is teleported to a secret room and receives a piece of the helmet, otherwise goes to the beginning of the tomb.
When a person enters the teleport with the item of the Pharaoh, is teleported to a secret room and receives a piece of the helmet, otherwise goes to the beginning of the tomb.
LUA:
function onStepIn(cid, item, pos, fromPosition)
local config = {
secretroom = {x=611, y=608, z=12},
begin = {x=611, y=608, z=12},
}
local p = pharaoitem[item.itemid]
local pharaoitem = {
[1] = {pharaoitem = 2348, helmetthing = 2335},
[2] = {pharaoitem = 2348, helmetthing = 2336},
[3] = {pharaoitem = 2348, helmetthing = 2337},
[4] = {pharaoitem = 2348, helmetthing = 2338},
[5] = {pharaoitem = 2348, helmetthing = 2340},
[6] = {pharaoitem = 2348, helmetthing = 2339},
}
if isPlayer(cid) then
if getPlayerItemCount(cid, t.pharaoitem) >= 1 then
doSendMagicEffect(fromPosition,2)
doSendMagicEffect(config.secretroom,10)
doTeleportThing(cid, config.secretroom)
doPlayerRemoveItem(cid, t.pharaoitem, 1)
doPlayerAddItem(cid, t.helmetthing, 1)
else
doTeleportThing(cid, config.begin)
doSendMagicEffect(config.begin,10)
doSendMagicEffect(fromPosition,2)
end
end
end
Last edited: