gunmetal
New Member
- Joined
- Oct 15, 2007
- Messages
- 75
- Reaction score
- 0
Im a big noob at this..I have this function but im not sure where to put it also can somone correct me if im wrong?In actions xml i should have something like this?
also can somone correct me if im wrong?In actions xml i should have something like this for each gate?
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = {
gates = {
[1930] = {{x=100,y=100,z=7}, CONST_ME_TELEPORT}, -- [uid] = {{pos}, effect}
[1931] = {{x=100,y=100,z=7}, CONST_ME_TELEPORT},
[1932] = {{x=100,y=100,z=7}, CONST_ME_TELEPORT},
[1933] = {{x=100,y=100,z=7}, CONST_ME_TELEPORT},
[1934] = {{x=100,y=100,z=7}, CONST_ME_TELEPORT},
[1935] = {{x=100,y=100,z=7}, CONST_ME_TELEPORT}
},
text = "You are worthy enought to pass."
}
for type, variable in pairs(config.gates) do
if item.uid == type then
doTeleportThing(cid, variable[1])
doSendMagicEffect(variable[1], variable[2])
doPlayerSendTextMessage(cid, 22, config.text)
end
end
return TRUE
end
also can somone correct me if im wrong?In actions xml i should have something like this for each gate?
PHP:
<action uniqueid=" blah blah" script="quests/multigate.lua"/>