QuaS
Cykotitan Pwned =/
Code:
function onAddItem(moveitem, tileitem, pos, cid)
local coins = {
[13100] = {frompos = {x= 33276,y= 32553,z = 13}, topos = {x= 33271,y= 32553,z = 13}},
[13101] = {frompos = {x= 33234,y= 32692,z = 13}, topos = {x= 33234,y= 32688,z = 13}},
[13102] = {frompos = {x= 33293,y= 32742,z = 13}, topos = {x= 33299,y= 32742,z = 13}},
[13103] = {frompos = {x= 33240,y= 32856,z = 13}, topos = {x= 33250,y= 32867,z = 13}},
[13104] = {frompos = {x= 33163,y= 32831,z = 10}, topos = {x= 33156,y= 32832,z = 10}},
[13105] = {frompos = {x= 33097,y= 32816,z = 13}, topos = {x= 33093,y= 32824,z = 13}},
[13106] = {frompos = {x= 33135,y= 32683,z = 12}, topos = {x= 33130,y= 32683,z = 12}},
[13107] = {frompos = {x= 33073,y= 32590,z = 13}, topos = {x= 33079,y= 32589,z = 13}}
}
if moveitem.itemid == 2159 then
doRemoveItem(moveitem.uid)
doSendMagicEffect(pos, 15)
doSendMagicEffect(coins[tileitem.actionid].frompos, CONST_ME_TELEPORT)
doSendMagicEffect(coins[tileitem.actionid].topos, CONST_ME_TELEPORT)
doRelocate(coins[tileitem.actionid].frompos,coins[tileitem.actionid].topos)
end
return TRUE
end
function onStepIn(cid, item, position, fromPosition)
local back_n = {
[13108] = {x=33292,y=32742,z=13},
[13109] = {x=33234,y=32693,z=13},
[13110] = {x=33136,y=32683,z=12},
[13111] = {x=33072,y=32590,z=13},
[13112] = {x=33097,y=32815,z=13},
[13113] = {x=33239,y=32856,z=13},
[13114] = {x=33161,y=32832,z=10},
[13115] = {x=33277,y=32553,z=14}
}
doSendMagicEffect(position, 10)
doRelocate(position,back_n[item.actionid])
doSendMagicEffect(back_n[item.actionid], 10)
return true
end
PHP:
<!-- Scarab Coin -->
<movevent type="AddItem" tileitem="1" fromaid="13100" toaid ="13107" event="script" value="coin.lua"/>
<movevent type="StepIn" fromaid="13108" toaid="13115" event="script" value="coin.lua"/>
Explaination:
Lua:
Teleport In:
local coins = {--[CoalBasin AID] = {frompos = [mystic_flame_pos], topos = [Where teleport player(and items below him)]}
[13100] = {frompos = {x= 33276,y= 32553,z = 13}, topos = {x= 33271,y= 32553,z = 13}},
[13101] = {frompos = {x= 33234,y= 32692,z = 13}, topos = {x= 33234,y= 32688,z = 13}},
[13102] = {frompos = {x= 33293,y= 32742,z = 13}, topos = {x= 33299,y= 32742,z = 13}},
[13103] = {frompos = {x= 33240,y= 32856,z = 13}, topos = {x= 33250,y= 32867,z = 13}},
[13104] = {frompos = {x= 33163,y= 32831,z = 10}, topos = {x= 33156,y= 32832,z = 10}},
[13105] = {frompos = {x= 33097,y= 32816,z = 13}, topos = {x= 33093,y= 32824,z = 13}},
[13106] = {frompos = {x= 33135,y= 32683,z = 12}, topos = {x= 33130,y= 32683,z = 12}},
[13107] = {frompos = {x= 33073,y= 32590,z = 13}, topos = {x= 33079,y= 32589,z = 13}}
}
Teleport Out:
local back_n = {--[AID_of_mystic_flame_to_back(right one on png)] = Pos_To_TP. (red arrow)
[13108] = {x=33292,y=32742,z=13},
[13109] = {x=33234,y=32693,z=13},
[13110] = {x=33136,y=32683,z=12},
[13111] = {x=33072,y=32590,z=13},
[13112] = {x=33097,y=32815,z=13},
[13113] = {x=33239,y=32856,z=13},
[13114] = {x=33161,y=32832,z=10},
[13115] = {x=33277,y=32553,z=14}
}
Last edited: