Seiro Posted December 19, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 42 Reputation: 0 Joined: 10/24/12 Last Seen: August 11, 2014 Share Posted December 19, 2012 (edited) Can anyone make this map (1@cash) an instance for me? I'm trying to make something like Endless tower. I want more than one party to get in but I don't want them to meet inside or killing the same monster. Edited December 19, 2012 by Seiro Quote Link to comment Share on other sites More sharing options...
michaelsoftman Posted December 19, 2012 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 410 Reputation: 29 Joined: 04/04/12 Last Seen: November 28, 2024 Share Posted December 19, 2012 (edited) Here's some sample code. You have to set the $Instance_Minparty variable and edit some other things, but you should get the idea. getpartymember(getcharid(1)); if(!getcharid(1) || $@partymembercount < $Instance_Minparty){ mes "Make or join a party with more than "+$Instance_Minparty+" member!"; close; } if(instance_id(1)){ if(has_instance("1@Cash") == ""){ mes "Your group is already registered at another instance."; close; } mes "Your group is already registered."; mes "Select ^0000FFRe-Enter Instance^000000 in the main menu to enter."; close; } set .@instance, instance_create("My Instance", getcharid(1)); instance_attachmap "1@Cash", .@instance; instance_set_timeout(3600,300,.@instance); instance_init .@instance; warp has_instance("1@Cash"),0,0; end; Edited December 19, 2012 by michaelsoftman Quote Link to comment Share on other sites More sharing options...
Seiro Posted December 19, 2012 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 42 Reputation: 0 Joined: 10/24/12 Last Seen: August 11, 2014 Author Share Posted December 19, 2012 Can I see the whole script? or is this yours and it's private? I kinda don't get it, it registers the party but it only ends up saying "Your group is already registered at another instance." after. Quote Link to comment Share on other sites More sharing options...
michaelsoftman Posted December 21, 2012 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 410 Reputation: 29 Joined: 04/04/12 Last Seen: November 28, 2024 Share Posted December 21, 2012 It's my private script... I will share more of it with you though. mes "What would you like to do?"; switch(select("Start Instance:Re-enter Instance:Quit")) { Case 1: if(CT_Lasttime + $CT_Cooldown > gettimetick(2) && CT_Lasttime < gettimetick(2)) { set .@last,CT_Lasttime + $CT_Cooldown - gettimetick(2); set .@hours,.@last / 60 / 60; set .@minutes,.@last / 60 % 60; set .@seconds,.@last % 60; mes "Due to the cooldown limit,"; mes "you cannot start the instance right"; mes "now, "+.@hours+"hours "+.@minutes+"minutes "+.@seconds+"seconds"; mes "left to start the next instance."; close; } getpartymember(getcharid(1)); if(!getcharid(1) || $@partymembercount < $CT_Minparty){ mes "Make or join a party with more than "+$CT_Minparty+" member!"; close; } if(instance_id(1)){ if(has_instance("1@cash") == ""){ mes "Your group is already registered at another instance."; close; } mes "Your group is already registered."; mes "Select ^0000FFRe-Enter Instance^000000 in the main menu to enter."; close; } set .@instance, instance_create("Instance Test", getcharid(1)); instance_attachmap "1@cashl", .@instance; instance_set_timeout(7200,300,.@instance); instance_init .@instance; set .@a$, has_instance("1@cash"); warp has_instance("1@cash"),0,0; set CT_Lasttime,gettimetick(2) + $CT_Timelimit; end; Case 2: if(!instance_id(1) || has_instance("1@val") == ""){ mes "The Instance does not exist."; mes "Please confirm with your party leader whether the Instance"; mes "has been destroyed or if the time given for entering has expired."; close; } instance_attach instance_id(1); warp has_instance("1@cash"),100,8; set CT_Lasttime,gettimetick(2) + $CT_Timelimit; end; Case 3: close; } Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 21, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 21, 2012 (edited) // callfunc( "instance__", "<instance name>", <alive timeout>, <idle timeout>, "<instance map 1>" {, <instance map 2>, <instance map 3> ... } ) function script instance__ { if ( ( .@ins = instance_create( getarg(0), getcharid(1) ) ) < 0 ) return .@ins; .@i = 3; while ( getarg( .@i, "" ) != "" ) { if ( instance_attachmap( getarg(.@i), .@ins ) == "" ) { instance_destroy .@ins; return -5; } .@i++; } if ( getarg(1) || getarg(2) ) instance_set_timeout getarg(1), getarg(2), .@ins; instance_init .@ins; instance_attach .@ins; return .@ins; } prontera,156,185,5 script Devil Square 100,{ if ( !getcharid(1) ) { mes "you need a party to get in"; close; } if ( instance_id(1) && getstrlen( has_instance("1@cash") ) ) { warp has_instance("1@cash"), 310,215; end; } if ( instance_id(1) ) { mes "your party is currently running an instance"; close; } if ( callfunc( "instance__", "test", 0, 0, "1@cash" ) < 0 ) { mes "failed to create instance"; close; } warp "1@cash", 310,215; donpcevent instance_npcname("test_instance")+"::Onstart"; close; } 1@cash,0,0,0 script test_instance -1,{ Onstart: monster "1@cash", 310,215, "--ja--", 1002, 1, instance_npcname("test_instance")+"::Onstart"; end; } Edited December 21, 2012 by AnnieRuru 1 Quote Link to comment Share on other sites More sharing options...
Question
Seiro
Can anyone make this map (1@cash) an instance for me? I'm trying to make something like Endless tower. I want more than one party to get in but I don't want them to meet inside or killing the same monster.
Edited by SeiroLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.