Godely
Member
- Joined
- Aug 19, 2007
- Messages
- 233
- Reaction score
- 16
This is made for 0.3.5pl1, but I think that for the 0.2 versions it's really similar.
Go to actions and open the folder scripts. If your folder is similar to mine, you'll find another folder called other. Open it. There you'll find a script called teleport.lua. -- If you do not find this script, or you don't have the folder other, try going to actions.xml, press ctrl + f and search for teleport.lua. You surely will see where is the destination folder
Have you opened teleport.lua? You'll find something like this:
You probably are gonna see it in the middle of the file. Just change it to:
Now, on your map, put how many ladders as you want, one above the other. Now, count how many floors above do you have, e.g.:
As you can see in the black number, the character will go up 5 floors. So, in the first ladder, the bottom one, you will do:
Did you understand? You'll have to set the actionid of the first ladder to 100 + number_of_floors_to_go_up.
Now, the last detail, and I know that by now the pros must be asking "and to go down?"
Well, this is really ordinary, and we don't need to change any script. Just go to your map and add the id 459 to the bottom of each ladder, beginning by the second floor:
To the professional scripters:
I know this tutorial is way over explained, but there're some people that keep posting errors and errors, and this time I tried to make like this so everyone will have the opportunity to set this function the way it has to be set.
The pro lua scripters now that this is a really ordinary script, but I believe it has a great functionality. Also, I know realized that there's another way to make this without using any actionids, but it'd have to check if there's a ladder above the one you are using, and I was too lazy to make this. But soon I will
Have you ever tried to do this on your map?
Well, I know that many of you did. Splendid mappers are always doing those stuff, and putting some random IDs and bla-bla-bla: but in the end, we see the most beautiful map ever, isn't that true?
But when you stop to think, the only point of doing it is just to showoff, right? Because you'd never be able to climb all those ladders... well, until now.
This won't happen by magic. You have to put your hands to work. Let's go?
Well, I know that many of you did. Splendid mappers are always doing those stuff, and putting some random IDs and bla-bla-bla: but in the end, we see the most beautiful map ever, isn't that true?
But when you stop to think, the only point of doing it is just to showoff, right? Because you'd never be able to climb all those ladders... well, until now.
This won't happen by magic. You have to put your hands to work. Let's go?
Go to actions and open the folder scripts. If your folder is similar to mine, you'll find another folder called other. Open it. There you'll find a script called teleport.lua. -- If you do not find this script, or you don't have the folder other, try going to actions.xml, press ctrl + f and search for teleport.lua. You surely will see where is the destination folder
Have you opened teleport.lua? You'll find something like this:
Code:
if(isInArray(UP_FLOORS, item.itemid)) then
fromPosition.z = fromPosition.z - 1
fromPosition.y = fromPosition.y + 1
fromPosition.stackpos = STACKPOS_GROUND
if(item.actionid == 100 or getThingFromPos(fromPosition, false).itemid == 0) then
fromPosition.y = fromPosition.y - 2
end
else
fromPosition.z = fromPosition.z + 1
end
You probably are gonna see it in the middle of the file. Just change it to:
Code:
if(isInArray(UP_FLOORS, item.itemid)) then
fromPosition.z = fromPosition.z - 1
fromPosition.y = fromPosition.y + 1
fromPosition.stackpos = STACKPOS_GROUND
if(item.actionid == 100 or getThingFromPos(fromPosition, false).itemid == 0) then
fromPosition.y = fromPosition.y - 1
elseif item.actionid >= 102 and item.actionid <= 107 then
pfloor = item.actionid - 101
fromPosition.z = fromPosition.z - pfloor
end
else
fromPosition.z = fromPosition.z + 1
end
Now, on your map, put how many ladders as you want, one above the other. Now, count how many floors above do you have, e.g.:
As you can see in the black number, the character will go up 5 floors. So, in the first ladder, the bottom one, you will do:
Did you understand? You'll have to set the actionid of the first ladder to 100 + number_of_floors_to_go_up.
Now, the last detail, and I know that by now the pros must be asking "and to go down?"
Well, this is really ordinary, and we don't need to change any script. Just go to your map and add the id 459 to the bottom of each ladder, beginning by the second floor:
To the professional scripters:
I know this tutorial is way over explained, but there're some people that keep posting errors and errors, and this time I tried to make like this so everyone will have the opportunity to set this function the way it has to be set.
The pro lua scripters now that this is a really ordinary script, but I believe it has a great functionality. Also, I know realized that there's another way to make this without using any actionids, but it'd have to check if there's a ladder above the one you are using, and I was too lazy to make this. But soon I will