jonyrewind
New Member
- Joined
- Dec 28, 2010
- Messages
- 2
- Reaction score
- 0
Hello i whant to ask if some one could help me with this script .....
I whant that a player get teleportet when he puts a soil on a basin , atm its only working with 1 soil (id 8298) i would like to use all soils (8299,8302,8303) hope some one can help me .
Thanks
Code:
local config = {
[65091] = {{x=32859,y=31056,z=9}, {x=32861, y=31061, z=9}},
[65092] = {x=32856,y=31055,z=9},
[65093] = {{x=32894,y=31044,z=9}, {x=32888,y=31044,z=9}},
[65094] = {x=32894,y=31046,z=9},
}
function onStepIn(cid, item, pos, fromPosition)
if(config[item.aid]) then
if(type(config[item.aid]) == "table" and #config[item.aid] == 2) then
local coin = getTileItemById(config[item.aid][1],8298).uid
if(coin > 0) then
doRemoveItem(coin, 1)
doSendMagicEffect(config[item.aid][1], CONST_ME_HITBYFIRE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, config[item.aid][2], FALSE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
else
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, config[item.aid], FALSE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
end
return TRUE
end
I whant that a player get teleportet when he puts a soil on a basin , atm its only working with 1 soil (id 8298) i would like to use all soils (8299,8302,8303) hope some one can help me .
Thanks