[Add-On]Temple Of Time

Newbie Spellweaver
Joined
Mar 13, 2011
Messages
21
Reaction score
39
Location
The Netherlands
Dont know what to say xD hope you like it =D

Corba (2082003.js)
PHP:
function start() {
cm.sendSimple("If you had wings, I'm sure you could go there.  But, that alone won't be enough.  If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well.  I'm the only Halfling left that knows the way back... If you want to go there, I can transform you.  No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
}

function action(m, t, s) {
   if (m > 0)
      cm.useItem(2210016, 1);
      cm.warp(200090500, 0);
   cm.dispose();
}

Portals:

OutTemple.js
PHP:
function enter(pi) {
    pi.useItem(2210016);
    pi.warp(200090510);
    return true;
}

templeenter.js
PHP:
function enter(pi) {
    pi.cancelItem(2210016);
    pi.warp(270000100, "out00");
    return true;
}

timeQuest.js
PHP:
var from = [270010100, 270010200, 270010300, 270010400, 270010500, 270020100,
            270020200, 270020300, 270020400, 270020500, 270030100, 270030200,
            270030300, 270030400, 270030500, 270040000, 270040100];
var to = [[270010110, 3], [270010210, 3], [270010310, 3], [270010410, 3],
          [270020000, 4], [270020110, 3], [270020210, 3], [270020310, 3], 
          [270020410, 3], [270030000, 4], [270030110, 3], [270030210, 3],
          [270030310, 3], [270030410, 3], [270040000, 3], [270040100, 3],
          [270050000, 0]];
          
function enter(pi) {
    for (var i = 0; i < from.length; i++)
        if (pi.getPlayer().getMapId() == from[i]) {
            pi.warp(to[i][0], to[i][1]);
            return true;
        }
    pi.warp(togo, 0);
    return true;
}

undodraco.js
PHP:
function enter(pi) {
    pi.cancelItem(2210016);
    pi.warp(240000110, 2);
    return true;
}

reundodraco.js
PHP:
function enter(pi) {
    pi.blockPortal();   
    return true; 
}


If you dont have cancelitem thing add to AbstractPlayerInteraction
PHP:
    public final void cancelItem(final int id) {
	c.getPlayer().cancelEffect(MapleItemInformationProvider.getInstance().getItemEffect(id), false, -1);
    }

Screens:
MapleSanta - [Add-On]Temple Of Time - RaGEZONE Forums

MapleSanta - [Add-On]Temple Of Time - RaGEZONE Forums

MapleSanta - [Add-On]Temple Of Time - RaGEZONE Forums
 
Last edited:
Anyone know why this happens?

I go to the next map's portal from, let's say Memory Lane 4.
I enter the portal, the sound doesn't play (entering portal sound) and I see the map being loaded 6-10 times and then I finally land in the next map. Sometimes, I land in the map after the resting map 4. Once, I landed in the map AFTER memory lane 5. I am using this thread's portal scripts, and I am no master of portal scripts so I don't know what exactly is causing it, but if you know why this happens, please let me know.

Every once in a while, the portal loads fine, but at least half the time, it spam loads the map and sometimes puts me in the wrong map.
 
PHP:
var from = [270010100, 270010200, 270010300, 270010400, 270010500, 270020100,
            270020200, 270020300, 270020400, 270020500, 270030100, 270030200,
            270030300, 270030400, 270030500, 270040000, 270040100];
var to = [[270010110, 3], [270010210, 3], [270010310, 3], [270010410, 3],
          [270020000, 4], [270020110, 3], [270020210, 3], [270020310, 3], 
          [270020410, 3], [270030000, 4], [270030110, 3], [270030210, 3],
          [270030310, 3], [270030410, 3], [270040000, 3], [270040100, 3],
          [270050000, 0]];
          
function enter(pi) {
    for (var i = 0; i < from.length; i++)
        if (pi.getPlayer().getMapId() == from[i]) {
            pi.warp(to[i][0], to[i][1]);
            return true;
        }
    pi.warp(togo, 0);
    return true;
}

looks prettier.

Thanks, by the way :)
 
Last edited:
better

Code:
/* @author iPhoneSwag */

function start() {
cm.sendSimple("If you had wings, I'm sure you could go there.  But, that alone won't be enough.  If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well.  I'm the only Halfling left that knows the way back... If you want to go there, I can transform you.  No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
}

function action(m, t, s) {
    if (m > 0) {
	if (s == 0) {
        cm.useItem(2210016);
        cm.warp(200090500, 0);
        cm.dispose();
     }
   }
   cm.dispose();
}
 
PHP:
function start() {
cm.sendSimple("If you had wings, I'm sure you could go there.  But, that alone won't be enough.  If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well.  I'm the only Halfling left that knows the way back... If you want to go there, I can transform you.  No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
}

function action(m, t, s) {
   if (m > 0)
      cm.useItem(2210016, 1);
      cm.warp(200090500, 0);
   cm.dispose();
}
 
PHP:
function start() {
cm.sendSimple("If you had wings, I'm sure you could go there.  But, that alone won't be enough.  If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well.  I'm the only Halfling left that knows the way back... If you want to go there, I can transform you.  No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
}

function action(m, t, s) {
   if (m > 0)
      cm.useItem(2210016, 1);
      cm.warp(200090500, 0);
   cm.dispose();
}
Uhm.... no. o_o
 
PHP:
function start() {
cm.sendSimple("If you had wings, I'm sure you could go there.  But, that alone won't be enough.  If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well.  I'm the only Halfling left that knows the way back... If you want to go there, I can transform you.  No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
}

function action(m, t, s) {
   if (m > 0)
      cm.useItem(2210016, 1);
      cm.warp(200090500, 0);
   cm.dispose();
}

That doesn't work. Learn to use braces and learn when they are and when they aren't needed. Also, even when they are optional, you should use them. You should follow proper coding style and not make your code unreadable. Also having the selection check is good as this will work even if you packet edit and send selection as 2, but it doesn't really matter at this point since you get warped regardless of clicking end chat or selecting something.
 
Lmao your code doesn't need the selection check since is only one selection, I didn't have time to test but you know what I was going for :p no need to get mad over missing brackets :)
 
Lmao your code doesn't need the selection check since is only one selection, I didn't have time to test but you know what I was going for :p no need to get mad over missing brackets :)
He's not getting angry. He's clearly explaining the obvious faults of the script. x) ( I didn't read the scripts , maybe he's right, maybe you are. lol)
 
Last edited:
Back