• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action-Door Level

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
254
Solutions
3
Reaction score
18
Location
Egypt
i have door level script from 8.1 ot i have added it to 8.6 server
i got error while passing the door
here is the error
Code:
[21/06/2017 06:33:40] [Error - Action Interface]
[21/06/2017 06:33:40] data/actions/scripts/New Doors.lua:onUse
[21/06/2017 06:33:40] Description:
[21/06/2017 06:33:40] data/actions/scripts/New Doors.lua:3: attempt to index global 'doorHandler' (a nil value)
[21/06/2017 06:33:40] stack traceback:
[21/06/2017 06:33:40]     data/actions/scripts/New Doors.lua:3: in function 'NewDoors'
[21/06/2017 06:33:40]     data/actions/scripts/New Doors.lua:32: in function <data/actions/scripts/New Doors.lua:29>
this my action code
Code:
<action actionid="49000" event="script" value="New Doors.lua"    />
<action actionid="49001" event="script" value="New Doors.lua"    />
<action actionid="49002" event="script" value="New Doors.lua" />
<action actionid="49003" event="script" value="New Doors.lua"    />
<action actionid="49004" event="script" value="New Doors.lua" />
<action actionid="49005" event="script" value="New Doors.lua" />
and here is my script:-
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
 
Seems like you have some sort of custom functions there. Just take the original door scripts from the distribution you are using.
 
Looks like you just want to make some level doors. Why don't you use a default system of your distro?
 
Client version doesn't matter here, but your distribution.
I guess you're using 0.3.6, so if you didn't mess up you can just place 'gate of expertise' in map editor and set it's action id to 1000 + required level.
So for level 100, action id should be 1100, for 30: 1030, and so on.
 
Client version doesn't matter here, but your distribution.
I guess you're using 0.3.6, so if you didn't mess up you can just place 'gate of expertise' in map editor and set it's action id to 1000 + required level.
So for level 100, action id should be 1100, for 30: 1030, and so on.
now i want made door in my server from level 60,000 how to do ?
 
@Static_ static could you help me correct the script
do what ond said
dont try using custom scripts like this it's horribly made and i cannot possibly guess the value of something you don't have
you're also not supposed to tag people like that, i'm not your personal script maker and therefore won't reply any more
 
do what ond said
dont try using custom scripts like this it's horribly made and i cannot possibly guess the value of something you don't have
you're also not supposed to tag people like that, i'm not your personal script maker and therefore won't reply any more
I want to get permission i ask you Respectfully if you could help as you like i have removed the tag thank you
 
Last edited:
Let's take it from the top! What distribution are you using? What is the name of the otserver that you have downloaded?
 
Back
Top