Awesome Slayer
New Member
- Joined
- Jul 16, 2008
- Messages
- 58
- Reaction score
- 0
i have made this script that summons trainers to the north east,west and south east,west of the player when they stand on a square, i need help to make the script remove the monks when the player steps off the square (the tile i use is id-426 when us tand on it it chnages to 425 if that helps... anyway here is my script.
P.S sorry i didnt credit anyone as i forget who helped me it was like 4 months ago
I tried to make a script for when u step out it looked like this:
i know its going to be something really simple, i am not very good at this, if you could please help me i would be very greatful
P.S sorry i didnt credit anyone as i forget who helped me it was like 4 months ago
Code:
function onStepIn(cid, item, pos)
Player = getPlayerPosition(cid)
NorthWest = {x=Player.x-1, y=Player.y-1, z=Player.z}
NorthEast = {x=Player.x+1, y=Player.y-1, z=Player.z}
SouthWest = {x=Player.x-1, y=Player.y+1, z=Player.z}
SouthEast = {x=Player.x+1, y=Player.y+1, z=Player.z}
doSummonCreature("Trainer", NorthWest)
doSummonCreature("Trainer", NorthEast)
doSummonCreature("Trainer", SouthWest)
doSummonCreature("Trainer", SouthEast)
return 1
end
I tried to make a script for when u step out it looked like this:
Code:
function onStepOut(cid, item, pos)
Player = getPlayerPosition(cid)
NorthWest = {x=Player.x-1, y=Player.y-1, z=Player.z}
NorthEast = {x=Player.x+1, y=Player.y-1, z=Player.z}
SouthWest = {x=Player.x-1, y=Player.y+1, z=Player.z}
SouthEast = {x=Player.x+1, y=Player.y+1, z=Player.z}
doRemoveCreature("Trainer", NorthWest)
doRemoveCreature("Trainer", NorthEast)
doRemoveCreature("Trainer", SouthWest)
doRemoveCreature("Trainer", SouthEast)
return 1
end
i know its going to be something really simple, i am not very good at this, if you could please help me i would be very greatful