Ahi pueden ver lo que hace el script.
La verdad me mate haciendo el script, de error en error, y al final era una cosita estupida lo que hacia que no andase -.-!
Bien, vamos a data/movements/movements.xml
Código:
movevent type="StepIn" uniqueid="5000-5003" event="script" value="Training System.lua"/>
<movevent type="StepOut" uniqueid="5000-5003" event="script" value="Training System.lua"/>
data/movements/scripts/Training System.lua
Código:
function onStepIn(cid, item, pos, fromPos)
local t = {
[5000]={{x=pos.x-1, y=pos.y+1, z=pos.z},{x=pos.x-1, y=pos.y-1, z=pos.z}},
[5001]={{x=pos.x+1, y=pos.y+1, z=pos.z},{x=pos.x+1, y=pos.y-1, z=pos.z}},
[5002]={{x=pos.x+1, y=pos.y-1, z=pos.z},{x=pos.x-1, y=pos.y-1, z=pos.z}},
[5003]={{x=pos.x+1, y=pos.y+1, z=pos.z},{x=pos.x-1, y=pos.y+1, z=pos.z}}
}
local v = t[item.uid]
if v then
doSummonCreature('demon', v[1])
doSummonCreature('demon', v[2])
doSendMagicEffect(v[1],CONST_ME_TELEPORT)
doSendMagicEffect(v[2],CONST_ME_TELEPORT)
end
end
function onStepOut(cid, item, pos)
local t = {
[5000]={{x=pos.x-1, y=pos.y+1, z=pos.z, stackpos = 253},{x=pos.x-1, y=pos.y-1, z=pos.z, stackpos = 253}},
[5001]={{x=pos.x+1, y=pos.y+1, z=pos.z, stackpos = 253},{x=pos.x+1, y=pos.y-1, z=pos.z, stackpos = 253}},
[5002]={{x=pos.x+1, y=pos.y-1, z=pos.z, stackpos = 253},{x=pos.x-1, y=pos.y-1, z=pos.z, stackpos = 253}},
[5003]={{x=pos.x+1, y=pos.y+1, z=pos.z, stackpos = 253},{x=pos.x-1, y=pos.y+1, z=pos.z, stackpos = 253}}
}
local v = t[item.uid]
if v then
doRemoveCreature(getThingfromPos(v[1]).uid)
doRemoveCreature(getThingFromPos(v[2]).uid)
doSendMagicEffect(v[1],CONST_ME_POFF)
doSendMagicEffect(v[2],CONST_ME_POFF)
end
end
y pondran las uniqueid en donde se parara el monito y subira skill.
credito: 100% bt