amr shalapy
Banned User
- Joined
- Aug 28, 2014
- Messages
- 122
- Reaction score
- 8
when I pass from the door the character got copy and got bug here's the
picture explain Imgur: The most awesome images on the Internet
Imgur: The most awesome images on the Internet
this the script of action id
iam using xml server 8.1
picture explain Imgur: The most awesome images on the Internet
Imgur: The most awesome images on the Internet
this the script of action id
Code:
<action actionid="49000" script="New Doors.lua" />
<action actionid="49001" script="New Doors.lua" />
<action actionid="49002" script="New Doors.lua" />
<action actionid="49003" script="New Doors.lua" />
<action actionid="49004" script="New Doors.lua" />
<action actionid="49005" script="New Doors.lua" />
Code:
function NewDoors(cid, lvl, item, topos, frompos)
if getPlayerLevel(cid) >= lvl then
doorHandler:useDoor(item, topos, cid, nil, true)
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then
doMoveCreature(cid, 1)
elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 2)
elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then
doMoveCreature(cid, 3)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 4)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 5)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 6)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 7)
end
else
doPlayerSendTextMessage(cid, 16, "you want level " .. lvl .. " to pass this door! .")
end
end
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 49000 then
NewDoors(cid, 1000, item, topos, frompos)
elseif item.actionid == 49001 then
NewDoors(cid, 2000, item, topos, frompos)
elseif item.actionid == 49002 then
NewDoors(cid, 5000, item, topos, frompos)
elseif item.actionid == 49003 then
NewDoors(cid, 10000, item, topos, frompos)
elseif item.actionid == 49004 then
NewDoors(cid, 25000, item, topos, frompos)
elseif item.actionid == 49005 then
NewDoors(cid, 60000, item, topos, frompos)
end
end
Last edited: