Nirer
New Member
First of all, I want to say this is my first scrip, so don't give me all that bullshit, its about 2 am right now so once again, DON'T GIVE ME BULLSHIT
Topics:
1) Why did I make it?
2) Information/About
3)How to add it (including pictures)
4)Cretids
---------------------
1) Why did I make it?
I made this because a Guy on a different open-tibia forum (you know the name -.-) requested it, and to finally make a first script and check my skills...
---------------------
2) Information/About:
Access doors - Doors which are meant for staff purposes only!
These doors can only be opened by an access level of 2 or higher (GameMaster and above).
Furthermore, This script is meant for true purposes and not for some leechers to post it on some Pl forum and saying they made it (when they obviously didn't). --PL dudes, sorry if i offended you xD
This script was made for TFS (The Forgotten Server) meaning it is meant for the "global.lua" of TFS, the MYSQL database of TFS and everything alse that matters, WAS NOT TESTED ON ANYOTHER DISTRO BUT TFS
This is my first script as I said so, it its pretty long (I think) compared to other Access doors scripts. I will release a new one when I will be more skilled
Note: This script was made only for 2 doors so choose carefully , in future scripts I will try to improve that fact...
3)How to add it? (Containing pictures)
Step one:
go in to the "data\actions\scripts\other" directory in your TFS folder.
Step two:
create a new file called: "accessdoor.lua" (must be a lua file!)
like this:
Step three:
Enter that file you just made and paste this:
Save and exit the file.
Step four:
Open your Map with a Map Editor and make 2 doors, where ever you want..
IMPORTANT, door Id must be 5733 or 5736 (made them these 2 Id's because they remind of the gates to heaven -- most suitable for gamemasters )
Give the first door a unique ID of "9876" -- to do this, just right click the door and press properties...
This picture will explain:
Do the same for the other door except this time, unique ID is "6789" like this:
Step five:
Go in to the "data\actions" directory in your TFS folder and open actions.XML with notepad or any other editing program and do this:
Under:
Pase this:
like in this picture:
Save file and exit.
Step six:
Go in to your "data\movements" directory in your TFS folder,
open "movements.XML" and do the following:
Under:
Paste this:
Like in this picture:
Well you are done for now ... That was the hard part, now lets go see how it looks:
This is non-GM mode:
This is GM mode:
4)Credits:
First of all, Credits to the best teacher in the world "Nahruto"!
He taught me everything I know, all though we are not even half way through, Thank you Nahruto for teaching me You are the greatest teacher ever!
Credits to me for making the script and everything and of course for making this tutorial...
Bonus! (lol)
Sorry to:
Guys who made TFS, I know this offended your respect because it's not "worty" to put in TFS, sorry for offending..
Sorry to any other people I've offended by this tutorial or by anything I did on the way...
Bugs: Please report the bugs here, or send me a private msg..
you can also report bugs to my emal/MSN:
[email protected]
-- Thank you --
Topics:
1) Why did I make it?
2) Information/About
3)How to add it (including pictures)
4)Cretids
---------------------
1) Why did I make it?
I made this because a Guy on a different open-tibia forum (you know the name -.-) requested it, and to finally make a first script and check my skills...
---------------------
2) Information/About:
Access doors - Doors which are meant for staff purposes only!
These doors can only be opened by an access level of 2 or higher (GameMaster and above).
Furthermore, This script is meant for true purposes and not for some leechers to post it on some Pl forum and saying they made it (when they obviously didn't). --PL dudes, sorry if i offended you xD
This script was made for TFS (The Forgotten Server) meaning it is meant for the "global.lua" of TFS, the MYSQL database of TFS and everything alse that matters, WAS NOT TESTED ON ANYOTHER DISTRO BUT TFS
This is my first script as I said so, it its pretty long (I think) compared to other Access doors scripts. I will release a new one when I will be more skilled
Note: This script was made only for 2 doors so choose carefully , in future scripts I will try to improve that fact...
3)How to add it? (Containing pictures)
Step one:
go in to the "data\actions\scripts\other" directory in your TFS folder.
Step two:
create a new file called: "accessdoor.lua" (must be a lua file!)
like this:
Step three:
Enter that file you just made and paste this:
PHP:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5733 or item.itemid == 5736 then
if (item.uid==9876 or item.uid==6789) then
if (getPlayerGroupId(cid)>=2) then
doTransformItem(item.uid, item.itemid+1)
doPlayerSendTextMessage(cid, 22, "Welcome to staff area, we will be passing out peanuts in a moment ;) ENJOY YOUR STAY :)")
end
if (getPlayerGroupId(cid)<2) then
doPlayerSendTextMessage(cid, 22, "You are not a GameMaster or a God, this place was not meant for you...")
end
end
end
return 1
end
Save and exit the file.
Step four:
Open your Map with a Map Editor and make 2 doors, where ever you want..
IMPORTANT, door Id must be 5733 or 5736 (made them these 2 Id's because they remind of the gates to heaven -- most suitable for gamemasters )
Give the first door a unique ID of "9876" -- to do this, just right click the door and press properties...
This picture will explain:
Do the same for the other door except this time, unique ID is "6789" like this:
Step five:
Go in to the "data\actions" directory in your TFS folder and open actions.XML with notepad or any other editing program and do this:
Under:
PHP:
<action itemid="2553" script="tools/pick.lua"/>
Pase this:
PHP:
<!-- Access Doors -->
<action uniqueid="9876" script="other/accessdoor.lua"/>
<action uniqueid="6789" script="other/accessdoor.lua"/>
like in this picture:
Save file and exit.
Step six:
Go in to your "data\movements" directory in your TFS folder,
open "movements.XML" and do the following:
Under:
PHP:
<!-- (Level & quest) doors -->
Paste this:
PHP:
<movevent event="StepOut" itemid="5737" script="closingdoor.lua"/>
<movevent event="StepOut" itemid="5734" script="closingdoor.lua"/>
Like in this picture:
Well you are done for now ... That was the hard part, now lets go see how it looks:
This is non-GM mode:
This is GM mode:
4)Credits:
First of all, Credits to the best teacher in the world "Nahruto"!
He taught me everything I know, all though we are not even half way through, Thank you Nahruto for teaching me You are the greatest teacher ever!
Credits to me for making the script and everything and of course for making this tutorial...
Bonus! (lol)
Sorry to:
Guys who made TFS, I know this offended your respect because it's not "worty" to put in TFS, sorry for offending..
Sorry to any other people I've offended by this tutorial or by anything I did on the way...
Bugs: Please report the bugs here, or send me a private msg..
you can also report bugs to my emal/MSN:
[email protected]
-- Thank you --
Last edited: