Hadeszeus 15 Posted February 25, 2014 (edited) Another very useful and very good script from Annie! Also thanks leloush @Annie One more question. Im trying to add a timetick to avoid multiple entries of the players who already joined or part of a party. How to make it work. if ( instance_attachmap( "guild_vs2", .@ins, 1, getcharid(1)+"RAID" ) == "" ) { mes "error : 5"; instance_destroy .@ins; close; } else if( #delay > gettimetick(1) ){ dispbottom "Delaying..."; } instance_set_timeout 0, 1, .@ins; instance_init .@ins; instance_attach .@ins; delitem .register_item, 1; warpparty has_instance("guild_vs2"), 0,0, getcharid(1), strnpcinfo(4); 'lives = .party_lives; set #delay,#delay + ( 3600 * 5 ); Edited February 27, 2014 by AnnieRuru split topic from http://hercules.ws/board/topic/4610- Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted March 7, 2014 (edited) What I did is I used all the Lives. After that nothing happens, The event did not finish but instead we character select. after that we can register but that error will appear if ( !'lives ) {instance_announce -1, "Your party has used up all the lives", bc_map;.@map$ = strcharinfo(3);killmonsterall .@map$;sleep 5000;mapwarp .@map$, .map$, .x, .y;}if the party has no more lives, the map will be cleaned from monstersand then after 5 seconds, everyone is warp out to where the register npc is 2. change mes "you need to make a party of MAXIMUM of 15Members and a MINIMUM of 10Members.. so i can allow you to dive inside.";into mes "you need to make a party of EXACTLY "+ .register_min +" members ... so i can allow you to dive inside.";problem solve I think you should just show your edited script instead of keep saying bug bug bug ... I don't know what are the things that you have edited Problem Always destroyed map instance on entering the map. The weird part of it. After trying about 30 times there's 1 instance that's not destroyed. prontera,134,206,5 script Raid 100,{ mes "This is Raid Dungeon."; mes "you need to make a party of MAXIMUM of 15Members and a MINIMUM of 10Members.. so i can allow you to dive inside."; mes "Inside this raid dungeon, there would be 7 Levels of Mob."; mes "Lever 1, Lever 2, Lever 3, and so on and so forth"; mes "as the Lvl increases the more the mobs gets stronger. so better be carefull"; mes "the next lever will appear after you finish the mobs of ( e.g. Lever 1 )"; mes "after Lever 1-7 which is normal mobs"; mes "the Lever for boss of this raid dungeon will appear"; mes "NOTE: this is a custom mob Boss Monster so u better be prepare what ever it happens"; mes "and oh i forgot (your party has only 15 lives)"; mes "you can ressurect them by using Yggdrasil leaf or Skill of priest"; mes "but remember just 15 Lives. if ur party exceed this limit you party will be automatically warped out"; mes "so are you ready?"; mes "here we go"; next; if ( !getcharid(1) ) { mes "You have to form a party to play."; close; } if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) { mes "Only the party leader can register."; close; } if ( !countitem( .register_item ) ) { mes "you don't have "+ getitemname( .register_item ); close; } .@origin = getcharid(3); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) { .@online++; if ( #raid_ins_deny + .deny_enter > gettimetick(2) ) { .@denyname$[.@denycount] = strcharinfo(0); .@denytime[.@denycount] = #raid_ins_deny + .deny_enter; .@denycount++; } } } } attachrid .@origin; if ( $@partymembercount != .register_min ) { mes "[MvP Ladder Warper]"; mes "You have to form a party with exactly "+ .register_min +" members to play."; close; } else if ( .@online != .register_min ) { mes "[MvP Ladder Warper]"; mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'."; close; } else if ( .@denycount ) { mes "[MvP Ladder Warper]"; mes "There are a few party members that just enter this dungeon recently"; for ( .@i = 0; .@i < .@denycount; .@i++ ) mes ( .@i +1 ) +". "+ .@denyname$[.@i] +" has to come back in "+ callfunc( "Time2Str", .@denytime ); close; } if ( ( .@ins = instance_create( "Raid Dungeon", getcharid(1), IOT_PARTY ) ) < 0 ) { mes "error : "+ .@ins; close; } if ( instance_attachmap( "guild_vs2", .@ins, 1, getcharid(1)+"Raid" ) == "" ) { mes "error : 5"; instance_destroy .@ins; close; } instance_set_timeout 0, 1, .@ins; instance_init .@ins; instance_attach .@ins; delitem .register_item, 1; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) { #raid_ins_deny = gettimetick(2); warp has_instance("guild_vs2"), 0,0; } } } 'lives = .party_lives; end;OnInit: .register_min = 1; // the exact amount of party members to have in the party to start .register_item = 501; // this item is require to start the event .party_lives = 15; // number of lives for the party members to lose their life, otherwise they'll fail at this event .deny_enter = 1; // how many seconds to deny them from keep entering this instanced dungeon setarray .round1[0], 1001,20, 1001,20; setarray .round2[0], 1031,20, 1032,20; setarray .round3[0], 1111,20, 1113,20; .totalround = 3; getmapxy .smap$, .x, .y, 1; end;OnPCDieEvent: if ( strcharinfo(3) == has_instance("guild_vs2") ) { instance_attach has_instance2( "guild_vs2" ); 'lives--; if ( !'lives ) { instance_announce -1, "Your party has used up all the lives", bc_map; .@map$ = strcharinfo(3); killmonsterall .@map$; sleep 5000; mapwarp .@map$, .smap$, .x, .y; } else { instance_announce -1, "Your party still has "+ 'lives +" lives left", bc_map; } } end;}guild_vs2,0,0,0 script Raid_ins -1,{OnInstanceInit: sleep 2000; // delay abitOnDead: if ( 'round ) 'killed++; if ( 'killed < 'total ) end; .@main$ = "Raid"; // main npc name 'round++; 'killed = 0; if ( 'round == getvariableofnpc( .totalround, .@main$ ) +1 ) { instance_announce -1, "Congratulations !", bc_all; sleep 2000; instance_warpall getvariableofnpc( .smap$, .@main$ ), getvariableofnpc( .x, .@main$ ), getvariableofnpc( .y, .@main$ ); end; } instance_announce -1, "Prepare for Level "+ 'round +" Mobs...", bc_all; sleep 2000; .@size = getarraysize( getvariableofnpc( getd( ".round"+ 'round ), .@main$ ) ); 'total = 0; for ( .@j = 0; .@j < .@size; .@j += 2 ) { monster has_instance( "guild_vs2" ), 49,49, "--ja--", getvariableofnpc( getelementofarray( getd( ".round"+ 'round ), .@j ), .@main$ ), getvariableofnpc( getelementofarray( getd( ".round"+ 'round ), .@j +1 ), .@main$ ), instance_npcname( strnpcinfo(0) )+"::OnDead"; 'total = 'total + getvariableofnpc( getelementofarray( getd( ".round"+ 'round ), .@j +1 ), .@main$ ); } end;}guild_vs2 mapflag nowarpguild_vs2 mapflag nowarptoguild_vs2 mapflag nomemoguild_vs2 mapflag nosave SavePointguild_vs2 mapflag partylockguild_vs2 mapflag src4instance Edited March 7, 2014 by Hadeszeus Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 7, 2014 (edited) OK I know what's the problem now https://github.com/HerculesWS/Hercules/blob/master/db/const.txt#L3324 it will be YOUR OWN PROBLEM for not update the const.txt file change this line if ( ( .@ins = instance_create( "Raid Dungeon", getcharid(1), IOT_PARTY ) ) < 0 ) {into thisif ( ( .@ins = instance_create( "Raid Dungeon", getcharid(1), 2 ) ) < 0 ) {.. . EDIT: honestly I feel something fishy about this instance script in hercules ... why people always getting different result from my test server ? perhaps some of you should try in a clean hercules test server before put it on a live server one Edited March 7, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
0 evilpuncker 503 Posted March 7, 2014 EDIT: honestly I feel something fishy about this instance script in hercules ... why people always getting different result from my test server ? perhaps some of you should try in a clean hercules test server before put it on a live server one they tend to use outdated emulators Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted March 7, 2014 it's weird actually. I always commit the changes, then get pull request first before adding or testing new script locally. or maybe something wrong with the persone updating (me) hhahah.. BTW thanks for this and for reminding that. Quote Share this post Link to post Share on other sites
0 karazu 33 Posted March 7, 2014 (edited) my hecules is 1 week old.EDIT: I mean when the balancing of skill patch has been released. Edited March 7, 2014 by karazu Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 8, 2014 all right both of you tells your problem again only tell the bugs that you think that is not yet fixed when entering the dungeon, this box should pop out I'm not going to support for those people who doesn't have this box . . . they tend to use outdated emulators hercules has instance system that can attach on guild ID -> IOT_GUILDand I have some ideas to make a guild base script that every guild will have their own base, which instanced to each guild if people keep saying this and that my instance script not working, then I don't want to make this guild base script anymore Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted March 8, 2014 (edited) all right both of you tells your problem again only tell the bugs that you think that is not yet fixed when entering the dungeon, this box should pop out screenHercules015.jpg I'm not going to support for those people who doesn't have this box . . . they tend to use outdated emulators hercules has instance system that can attach on guild ID -> IOT_GUILDand I have some ideas to make a guild base script that every guild will have their own base, which instanced to each guild if people keep saying this and that my instance script not working, then I don't want to make this guild base script anymore Updating my copy in my local didn't solved the problem. BUT downloading a fresh copy did. It's working now. I just need to figure out whats causing the problem on my server. I'm so noob with this linux command, really having a hard time updating configuring files etc.. zzzzzz... Sure thing is, instance dungeon works fine as long as you are running the latest rev. Edited March 8, 2014 by Hadeszeus Quote Share this post Link to post Share on other sites
0 karazu 33 Posted March 8, 2014 Just updated everthing in my server.. Still error exist.Everytime you go inside [Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''killed', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''total', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Error]: script_set_reg: cannot write instance variable ''round', NPC not in a instance![Error]: script_set_reg: cannot write instance variable ''killed', NPC not in a instance![Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Error]: script_set_reg: cannot write instance variable ''total', NPC not in a instance! Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted March 8, 2014 Just updated everthing in my server.. Still error exist. Everytime you go inside [Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''killed', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''total', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Error]: script_set_reg: cannot write instance variable ''round', NPC not in a instance![Error]: script_set_reg: cannot write instance variable ''killed', NPC not in a instance![Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Warning]: script_get_val: cannot access instance variable ''round', defaulting to 0[Error]: script_set_reg: cannot write instance variable ''total', NPC not in a instance! Try a fresh copy Bro. @btw mine is different now.. It works most of the time like 90% there are instances that when I enter I got automatically warp on save point.. but most of the time it works perfectly. Like 10:1 ratio. I'm deleting my files now on live server and redownload the fresh one. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 8, 2014 (edited) @karazu show me the screenshot of you trying to run the instance I bet your server doesn't have the "Memorial Dungeon" box come out EDIT: I'm getting more and more angry now if you still stubbornly DON'T WANT to show your edited script and keep claiming this script is bug (because you have edited it) I don't want to entertain you anymore @Hadeszeus if its just 1 second and warp you out, it should be the problem from instance_set_timeout try play around with that value like instance_set_timeout 60, 0, .@ins;instance_set_timeout 60, 1, .@ins;instance_set_timeout 0, 60, .@ins;and look at the "Memorial Dungeon" boxit should tells you when will be the time out the instance there is 1 reason that I don't want to rewrite this script as a countdown like rathena emulator did because the guild base instance doesn't have a timeout ... it only destroy when nobody inside... Edited March 8, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
0 karazu 33 Posted March 8, 2014 (edited) @karazu show me the screenshot of you trying to run the instance I bet your server doesn't have the "Memorial Dungeon" box come out EDIT: I'm getting more and more angry now if you still stubbornly DON'T WANT to show your edited script and keep claiming this script is bug (because you have edited it) I don't want to entertain you anymore @Hadeszeus if its just 1 second and warp you out, it should be the problem from instance_set_timeout try play around with that value like instance_set_timeout 60, 0, .@ins;instance_set_timeout 60, 1, .@ins;instance_set_timeout 0, 60, .@ins;and look at the "Memorial Dungeon" boxit should tells you when will be the time out the instance there is 1 reason that I don't want to rewrite this script as a countdown like rathena emulator did because the guild base instance doesn't have a timeout ... it only destroy when nobody inside... @annie Sorry then. I am using an un EDITED script. and there is a BOX coming out named Memorial Dungeon. and as Hadeszeus said @btw mine is different now.. It works most of the time like 90% there are instances that when I enter I got automatically warp on save point.. but most of the time it works perfectly. Like 10:1 ratio. I'm deleting my files now on live server and redownload the fresh one. NVM thanks for the script anyways Edited March 8, 2014 by karazu Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted March 8, 2014 @karazu show me the screenshot of you trying to run the instance I bet your server doesn't have the "Memorial Dungeon" box come out EDIT: I'm getting more and more angry now if you still stubbornly DON'T WANT to show your edited script and keep claiming this script is bug (because you have edited it) I don't want to entertain you anymore @Hadeszeus if its just 1 second and warp you out, it should be the problem from instance_set_timeout try play around with that value like instance_set_timeout 60, 0, .@ins;instance_set_timeout 60, 1, .@ins;instance_set_timeout 0, 60, .@ins;and look at the "Memorial Dungeon" boxit should tells you when will be the time out the instance there is 1 reason that I don't want to rewrite this script as a countdown like rathena emulator did because the guild base instance doesn't have a timeout ... it only destroy when nobody inside... DAMN! It works! If someone encounter the same problem like mine. just follow what Annie said. instance_set_timeout 60, 0, .@ins;instance_set_timeout 60, 1, .@ins;instance_set_timeout 0, 60, .@ins; Quote Share this post Link to post Share on other sites
0 karazu 33 Posted March 8, 2014 @karazu show me the screenshot of you trying to run the instance I bet your server doesn't have the "Memorial Dungeon" box come out EDIT: I'm getting more and more angry now if you still stubbornly DON'T WANT to show your edited script and keep claiming this script is bug (because you have edited it) I don't want to entertain you anymore @Hadeszeus if its just 1 second and warp you out, it should be the problem from instance_set_timeout try play around with that value like instance_set_timeout 60, 0, .@ins;instance_set_timeout 60, 1, .@ins;instance_set_timeout 0, 60, .@ins;and look at the "Memorial Dungeon" boxit should tells you when will be the time out the instance there is 1 reason that I don't want to rewrite this script as a countdown like rathena emulator did because the guild base instance doesn't have a timeout ... it only destroy when nobody inside... DAMN! It works! If someone encounter the same problem like mine. just follow what Annie said. instance_set_timeout 60, 0, .@ins;instance_set_timeout 60, 1, .@ins;instance_set_timeout 0, 60, .@ins; Ok so what are you actually using on those 3? Quote Share this post Link to post Share on other sites
0 REKT 10 Posted June 8, 2015 Seems interesting instances does anybody have the working script on this :3 Quote Share this post Link to post Share on other sites
Another very useful and very good script from Annie! Also thanks leloush
@Annie
One more question. Im trying to add a timetick to avoid multiple entries of the players who already joined or part of a party.
How to make it work.
split topic from http://hercules.ws/board/topic/4610-
Share this post
Link to post
Share on other sites