-
Posts
2044 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by AnnieRuru
-
LMAO !! but to me this script is very easy and me lazy to remove certain mobs I notice certain MVPs is being repeated in mini-boss, and lazy to find them out 1 by 1 hahaha maybe some other day when I think its time to update my old script, yeah this one might add to the collections currently trying to tackle this script
-
prontera,155,177,5 script Card Seller 100,{ mes "Welcome to card seller ... meh lazy to say"; next; if ( select ( "Normal Cards", "Mini-boss Cards", "MVP Cards" ) == 1 ) { .@s = select( .alphabet_menu$ ) -1; close2; callshop "card_mob#"+ .alphabet$[.@s], 1; end; } close2; callshop "card_mob#"+( ( @menu == 2 )? "miniboss":"MVP" ), 1; end; OnInit: freeloop 1; .@total = query_sql("select distinct left( name_japanese, 1 ) as aaa from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 group by name_japanese order by aaa", .alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = query_sql( "select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 and left( name_japanese, 1 ) = '"+ .alphabet$[.@i] +"' group by name_japanese order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 1000000; } .@nb = query_sql( "select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where mode & 32 and type = 6 and mexp = 0 group by item_db.id order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#miniboss", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#miniboss", .@id[.@i], 1000000; npcshopdelitem "card_mob#miniboss", 4147; // lol ... ok me lazy already .@nb = query_sql( "select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where mode & 32 and type = 6 and mexp != 0 group by item_db.id order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#MVP", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#MVP", .@id[.@i], 1000000; freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000 - shop card_mob#miniboss -1,501:1000 - shop card_mob#MVP -1,501:1000 just write for fun
-
http://rathena.org/board/topic/72571-battleground-system-without-waitingroom/ btw ... this kind of topic is more suited to ask in script support section ... I don't know what are the things that you want us to write x.x
-
Request for poring points exchanger vice versa
AnnieRuru replied to Mootie's question in Script Requests
@Arcenciel @Mootie lol I certainly show off too much lol xD I was trying to show certain kinds of scripting techniques that some members here never seen before and now ... I try to downgrade myself and write this beginner script haha ... remember back the time when I started out my scripting journey 6 years ago prontera,150,174,4 script Sample 100,{ mes "Hi "+strcharinfo(0)+", I can exchange your ^FF0000Poring Points^000000 for items."; next; mes "You have "+ Poring_Points +" Points. You've killed a total of "+ Poring_Points +" Poring."; mes "What would you like to exchange for ?"; next; menu "^000000Red Potion -^FF0000 1", L_red_potion, "^000000Orange Potion -^FF0000 2", L_orange_potion, "^000000Yellow Potion -^FF0000 3", L_yellow_potion; L_red_potion: mes "You have selected ^FF0000Red Potion^000000"; mes "[ Cost : 1 Points ] "; mes "2x Red Potion"; next; menu "Exchange",-,"Cancel", L_cancel; if ( Poring_Points < 1 ) goto L_not_enough; getitem 501, 1; set Poring_Points, Poring_Points - 1; close; L_orange_potion: mes "You have selected ^FF0000Orange Potion^000000"; mes "[ Cost : 2 Points ] "; mes "4x Orange Potion"; next; menu "Exchange",-,"Cancel", L_cancel; if ( Poring_Points < 2 ) goto L_not_enough; getitem 502, 2; set Poring_Points, Poring_Points - 2; close; L_yellow_potion: mes "You have selected ^FF0000Yellow Potion^000000"; mes "[ Cost : 3 Points ] "; mes "6x Orange Potion"; next; menu "Exchange",-,"Cancel", L_cancel; if ( Poring_Points < 3 ) goto L_not_enough; getitem 503, 6; set Poring_Points, Poring_Points - 3; close; L_cancel: mes "Please come again !"; close; L_not_enough: mes "But, you dont have enough Points..."; close; OnNPCKillEvent: if ( killedrid != 1002 ) end; set Poring_Points, Poring_Points + 2; dispbottom "[ Point Reward ] Gained 2 Points. Total : "+ Poring_Points +" Points."; end; } I hopefully sure you can make this level of script ... every one that has no script background like I used to 6 years ago, should start out their 1st script like this EDIT for below: @Peopleperson49, that's the spirit! -
in the script has query_sql("UPDATE `cp_v4p_voters` SET points=(points-"+.@usedPoints+") WHERE account_id='"+.@account_id+"'"); query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE account_id="+.@account_id+" LIMIT 1",.@points); so it can be guess that the table `cp_v4p_voters` has at least these 2 columns account_id | points so a simple way to understand this script is the following prontera,0,0,0 script kdsfksdjf 100,{ query_sql "select points from cp_v4p_voters where account_id = "+ getcharid(3), .@points; getitem 501, .@points; // get the items amount to the points query_sql "update cp_v4p_voters set points = 0 where account_id = "+ getcharid(3); end; } I'm sure you know how to expand this script yourself ...
-
http://www.eathena.ws/board/index.php?showtopic=274486 so do a setcell .. cell_basilica ... so players cannot hit each other on that cell, effectively make other players can pvp only on certain cells I assumed you already know how to write an event script if you are asking this question ...
-
battleground emperium with shuffle team players
AnnieRuru replied to Thanna's question in Script Requests
LMAO !! your edit there ... even much better than Emistry bg_emp_0.0.txt you know ... the more I test the script ... the more bugs I find .... anyway, if you use the rand__ function, remember to change my portal event script rand__ into rand__old ... replace all in that script ... that script still using the old ones the one in this topic is made by keyworld, better shuffling algorithm than mine perhaps someday I might update that script ... but not now -
Request for poring points exchanger vice versa
AnnieRuru replied to Mootie's question in Script Requests
didn't realize you put my name poring_points++; isn't this the variable ? -
Requesting 3v3 Event (Semi BG Type [Blue Team vs Red Team])
AnnieRuru replied to Aya's question in Script Requests
Thanna has convinced me that I should use waitingroom to trigger the event after all my setbgid script command will halt the script if the player logout too x.x prontera,149,167,5 script bg_pvp_register 100,{ if ( getgmlevel() < 80 ) end; else if ( .start == 0 ) { mes "start ?"; next; select "yeah"; .start = 1; announce strcharinfo(0) +" has hosted a "+ .min2start +"vs"+ .min2start +" battleground", 0; waitingroom "BG PVP", .min2start *2 +1, strnpcinfo(0)+"::onstart", .min2start *2; } else if ( .start == 1 ) { mes "abort ?"; next; select "yeah"; .start = 0; delwaitingroom strnpcinfo(0); } else { mes "a match is currently running now"; mes "abort ?"; next; select "yeah"; .start = 0; awake strnpcinfo(0); } close; Onstart: getmapxy .@map$, .@x, .@y, 1; warpwaitingpc .@map$, .@x, .@y; announce "event started", 0; .start = 2; callfunc "rand__", .min2start *2, $@rand; for ( .@i = 0; .@i < $@warpwaitingpcnum; .@i++ ) setbgid ( .@i % 2 )? .red : .blue, $@warpwaitingpc[ $@rand[.@i] ]; delwaitingroom strnpcinfo(0); bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; bg_updatescore "guild_vs3", 0,0; sleep .eventlasting * 1000; if ( .start == 2 ) { if ( .score[1] == .score[2] ) mapannounce "guild_vs3", "Draw !", 0; else if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", " Red side wins !", 0; callsub L_reward, .red; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", " Blue side wins !", 0; callsub L_reward, .blue; } } bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_kickall .red; bg_kickall .blue; .start = .score[1] = .score[2] = .register_num = 0; deletearray .register_aid; end; L_reward: getbgusers getarg(0); for ( .@i = 0; .@i < $@arenamembersnum; .@i++ ) getitem 501, 1, $@arenamembers[.@i]; // item reward return; Onredout: callsub L_out, 2; Onblueout: callsub L_out, 1; L_out: announce strcharinfo(0) +" is out from the match !", 1; bg_leave; warp "SavePoint", 0,0; .score[ getarg(0) ]++; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == .min2start ) awake strnpcinfo(0); end; OnInit: .red = 1; // red team bg ID .blue = 2; // blue team bg ID .eventlasting = 30; // how long would the event last or it auto-reset. 30 *60 = 30 mins .min2start = 1; // how many players require to start ? if 3vs3, set to 3 createbgid .red, "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onredout"; createbgid .blue, "guild_vs3", 86,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onblueout"; end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall something like this though I think your request was already solved here lol -
N>HELP Barricade Training Dummy Damage Test
AnnieRuru replied to mikecool2607's question in Script Requests
- script Punching Bag -1,{ OnInit: OnDummyKill: monster "prontera",160,180,"Punching Bag",1905,1,"Punching Bag::OnDummyKill"; end; OnPCAttackEvent: if ( !@test_punch ) end; @dps_damage += @damage; end; } prontera,157,180,5 script kjdhfksjdf 100,{ if ( @test_punch ) end; message strcharinfo(0), "Start punching !"; @test_punch = 1; sleep2 10000; message strcharinfo(0), "You've dealt a total of "+ callfunc( "int__", @dps_damage ) +" damages in 10 seconds"; @dps_damage = @test_punch = 0; end; } like this ? if write this with instance script like goddameit does perhaps better ? -
lol faction system so many members has tried to code it and release it in the past, all of them lost interest one after another... because our SVN is always on the update, a big modification like that sure get broken very fast I wont recommend having faction system in RO either ... usually this kind of modification is a paid job ... and need to upkeep with each SVN updates and make sure it wont break your server if you are talking about faction system respawn, you need to learn this script command don't abuse OnPCDieEvent like that lol
-
if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { if the source and the target are both human players struct map_session_data *sd = BL_CAST(BL_PC, s_bl); struct map_session_data *tsd = BL_CAST(BL_PC, t_bl); call out the data if ( !strcmp( mapindex_id2name(sd->mapindex), "prontera" ) ) the condition only apply in prontera map if ( pc_readglobalreg( sd, "pvpteam" ) == pc_readglobalreg( tsd, "pvpteam" ) ) return 0; if both of them having the same "pvpteam" variable, they can't hit each other so set your script set pvpteam, 1; // they assign to team no.1 set pvpteam, 2; // they assign to team no.2 those with same variable cannot hit each other
-
N>HELP Barricade Training Dummy Damage Test
AnnieRuru replied to mikecool2607's question in Script Requests
omg, even a core developer come here and play XD fulfill my promise from post#4 OnPCAttackEvent.patch - script Punching Bag -1,{ OnInit: OnDummyKill: monster "prontera",160,180,"Punching Bag",1905,1,"Punching Bag::OnDummyKill"; end; OnPCAttackEvent: message strcharinfo(0), "You have dealt "+ @damage +" damage to Punching Bag"; end; } -
erm .... is there any strcharinfo(4) in the 1st place ? BUILDIN_FUNC(strcharinfo) { TBL_PC *sd; int num; struct guild* g; struct party_data* p; sd=script_rid2sd(st); if (!sd) { //Avoid crashing.... script_pushconststr(st,""); return 0; } num=script_getnum(st,2); switch(num){ case 0: script_pushstrcopy(st,sd->status.name); break; case 1: if( ( p = party_search(sd->status.party_id) ) != NULL ) { script_pushstrcopy(st,p->party.name); } else { script_pushconststr(st,""); } break; case 2: if( ( g = guild_search(sd->status.guild_id) ) != NULL ) { script_pushstrcopy(st,g->name); } else { script_pushconststr(st,""); } break; case 3: script_pushconststr(st,map[sd->bl.m].name); break; default: ShowWarning("buildin_strcharinfo: unknown parameter.\n"); script_pushconststr(st,""); break; } return 0; } shouldn't be like ... the server throw error for you ? ShowWarning("buildin_strcharinfo: unknown parameter.\n");
-
haha, GmOcean, areapercentheal is just like areawarp, well if you have made certain kinds of event script, you sure know how to use areawarp command areapercentheal is just a 1 time healing, restore their hp/sp to x% in the define area in SVN custom battleground scripts, its use when a round has started, or when a round has ended https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/custom/battleground/bg_flavius_01.txt Thanna's method sounds like a hack to me @_@ lol, abusing loadevent mapflag ... I think just like this will do OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); // please, if this one comment out, the event wont end sleep2 1500; percentheal 100,100; end; lol maybe your script should change to callfunc or something, but oh well, looks custom to me @Aya, try this custom_bg0.2.txt
-
Request for poring points exchanger vice versa
AnnieRuru replied to Mootie's question in Script Requests
yeah I know many of you here know how to do this prontera,149,174,4 script kdjshfksdjf 100,{ mes "Hi "+ strcharinfo(0) +" I can exchange your poring points for item"; mes "you have "+ poring_points +" points."; next; .@pick = ( select( .menu$ ) -1 ) *2; mes "Are you sure you would like to exchange "+ .item[ .@pick +1 ] +" points for a "+ getitemname( .item[ .@pick ] ) +" ?"; next; if ( select ( "Yes:No" ) == 2 ) { mes "Come back some other times"; close; } if ( poring_points < .item[ .@pick +1 ] ) { mes "You don't have enough poring points for this item"; close; } poring_points = poring_points - .item[ .@pick +1 ]; getitem .item[ .@pick ], 1; mes "You've earn a "+ getitemname( .item[.@pick] ); close; OnInit: setarray .item, 501, 1, 502, 2, 503, 3; .@size = getarraysize( .item ); for ( .@i = 0; .@i < .@size; .@i += 2 ) .menu$ = .menu$ + getitemname( .item[.@i] ) +":"; end; OnNPCKillEvent: if ( killedrid == 1002 ) poring_points++; end; } but nope, this is not my standard xD I'll do like this prontera,149,170,5 script kdsjhfksjdf 100,{ if ( getgmlevel() == 99 ) { if ( select ( "setup a quest", "remove a quest", "normal player mode" ) == 1 ) { if ( ( .@size = getarraysize( .item ) ) == 40 ) { mes "too many already"; close; } mes "input item id"; next; if ( input( .@item_id, 501,32767 ) ) { mes "invalid range"; close; } if ( getitemname( .@item_id ) == "null" ) { mes "invalid item id"; close; } mes "input amount"; next; if ( input( .@amount, 1, 30000 ) ) { mes "invalid range"; close; } mes .@amount +"x "+ getitemname( .@item_id ) +" ?"; next; if ( select ( "Yes:No" ) == 2 ) close; setarray .item[ getarraysize( .item ) ], .@item_id, .@amount; .@size += 2; $item$ = ""; for ( .@i = 0; .@i < .@size; .@i++ ) $item$ = $item$ + .item[.@i] +"#"; mes "item added successfully"; close; } else if ( @menu == 2 ) { if ( $item$ == "" ) { mes "nothing added yet"; close; } .@size = getarraysize( .item ); for ( .@i = 0; .@i < .@size; .@i += 2 ) .@menu$ = .@menu$ + .item[ .@i +1 ] +"x "+ getitemname( .item[ .@i ] ) +":"; .@pick = select( .@menu$ ) -1; deletearray .item[ .@pick *2 ], 2; .@size -= 2; $item$ = ""; for ( .@i = 0; .@i < .@size; .@i++ ) $item$ = $item$ + .item[.@i] +"#"; mes "selected item removed successfully"; close; } } if ( $item$ == "" ) { mes "sry this board still doesn't have any available quests"; close; } mes "Hi "+ strcharinfo(0) +" I can exchange your poring points for item"; mes "you have "+ poring_points +" points."; next; .@size = getarraysize( .item ); for ( .@i = 0; .@i < .@size; .@i += 2 ) .@menu$ = .@menu$ + getitemname( .item[.@i] ) +":"; .@pick = ( select( .@menu$ ) -1 ) *2; mes "Are you sure you would like to exchange "+ .item[ .@pick +1 ] +" points for a "+ getitemname( .item[ .@pick ] ) +" ?"; next; if ( select ( "Yes:No" ) == 2 ) { mes "Come back some other times"; close; } if ( poring_points < .item[ .@pick +1 ] ) { mes "You don't have enough poring points for this item"; close; } poring_points = poring_points - .item[ .@pick +1 ]; getitem .item[ .@pick ], 1; mes "You've earn a "+ getitemname( .item[.@pick] ); close; OnNPCKillEvent: if ( killedrid == 1002 ) poring_points++; end; OnInit: if ( $item$ == "" ) end; explode .@item$, $item$, "#"; .@size = getarraysize( .@item$ ); for ( .@i = 0; .@i < .@size; .@i++ ) .item[.@i] = atoi( .@item$[.@i] ); end; } muahahaha ... the same technique I used in my mission board script let's see how many people here can crack this script <3 I think its about time I slowly reveal the tricks from my mission board script I started to see some members here have ambitions trying to rival my script's functionality EDIT: lol ... if everyone made script standard like this one, member no need ask anymore xD -
yeah lolright now I'm tackling a level3 event script type -> battleground scripts and now I look back how I fixed that devil square 5 years ago I laugh at myself XD right now, I could write them under 100 lines using setarray I'm sure after you finished learn how to write a pvp/gvg -> level2 type event scripts you also laugh back at yourself for writing such a simple script anyway on-topic its kinda weird... at least for me when I active, zero is inactive ... and when I inactive, zero is active ... ...
-
WAHAHAHA !!I felt the same like 6 years ago (lol) Yhn 'taught me a few things when i started as a scripter, really gave me a super boost' XD I found out to break this wall is to write pvp/gvg/battleground scriptsyeah I know what you meant I saw Euphy script release, his script standard now reminds me of myself back in 4 years ago (2008) that time I learn how to script about 1 year, and Euphy ... I guess the same XD I also did the same, used to write dynamic shops, job changer, woe setter, mvp room ... etc that I used to do 4 years ago but right now I no longer write them ... too easy xD LMAO somewhere in 2009, I also thought I had hit the wall, ( maybe same as you now ) then I try to approach writing custom pvp/gvg scripts, I can tell it immediately, just after finish writing 2 gvg scripts, I have level up ( I've successfully break the wall ) I'm sure you can tell it, the scripts that I made during 2008 can be read by many members here but the scripts that I made AFTER 2010 is at different level I'm sure you get what I mean pvp/gvg/battleground scripts are also in high demand now I am still interested to write them now you should try some of them too <3 right now I'm still learning how to write better battleground script ( higher level than pvp/gvg )
-
lol lol, it was STARTED by trancid 1st, then I followed( when your time joined, trancid was no longer active ) Z3R0 also seriously good, he is the 2nd one after terces able to understand my tricks years ago and added them into wiki btw this has nothing to do with script request so I move into Community > General Hey ... 4 years ago when I clean up scripting section order by admin I accidentally found this topic http://www.eathena.ws/board/index.php?showtopic=129958
-
battleground emperium with shuffle team players
AnnieRuru replied to Thanna's question in Script Requests
I have to split your post out, that topic you quoted is bg_pvp, and what you are asking is bg_emp please note, a battleground script WITH waitingroom and WITHOUT waitingroom is totally different script because I used totally different script commands you will also noticed that script only has 1 npc, but my bg_emp has 3 npcs ok, if you want my bg_emp without waitingroom, I could squeeze them into just having 1 waitingroom and use shuffling algorithm to shuffle them out into 2 teams randomly yes its possible, but you still have to explain how you want the system works EDIT: I can make them with only using 1 waitingroom, or use npc chat dialog box to display who had register, without registering using a waitingroom at all after all, that source modification is meant to be working that way -
Requesting for Disguise Item NPC and Aura changer NPC
AnnieRuru replied to agentbogz's question in Source Requests
both request require source edits topic move to source modification 1. http://www.eathena.ws/board/index.php?showtopic=271054 2. http://rathena.org/board/topic/64546-need-help-auraset/page__hl__auraset or http://www.eathena.ws/board/index.php?showtopic=144643&st=255 -
Requesting 3v3 Event (Semi BG Type [Blue Team vs Red Team])
AnnieRuru replied to Aya's question in Script Requests
source modification http://rathena.org/board/topic/72571-battleground-system-without-waitingroom/ global function - shuffling algorithm function script rand__ { .@range = getarg(0); .@count = getarg(2, 0); .@count = ( .@count == 0 || .@count > .@range )? .@range : ( .@count > 128 )? 128 : .@count; while ( .@i < .@count ) { .@r = .@save = rand( .@i, .@range -1 ) ; if ( getd(".@tmp1_"+ .@i ) == 0 ) { .@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r; setd ".@tmp2_"+ .@i, .@r; setd ".@tmp2_"+ .@save , .@i; setd ".@tmp1_"+ .@save , 1; set getelementofarray( getarg(1), .@i ), .@r; if ( .@save < .@count ) set getelementofarray( getarg(1), .@save ), .@i; } .@i++; } return .@count; } script prontera,149,167,5 script bg_pvp_register 100,{ if ( .start == 0 ) { if ( getgmlevel() >= 80 ) { mes "start ?"; next; select "yeah"; .start = 1; announce strcharinfo(0) +" has hosted a "+ .min2start +"vs"+ .min2start +" battleground", 0; close; } mes "no event now"; close; } else if ( .start == 2 ) { mes "a match is currently running now"; if ( getgmlevel() >= 80 ) { mes "abort ?"; next; select "yeah"; .start = 0; awake strnpcinfo(0); } close; } else if ( getgmlevel() >= 80 ) { if ( select( "register", "abort" ) == 2 ) { .start = .register_num = 0; deletearray .register_aid; close; } } for ( .@i = 0; .@i < .register_num; .@i++ ) { if ( .register_aid[.@i] == getcharid(3) ) { dispbottom "you already register"; close; } } .register_aid[ .register_num ] = getcharid(3); .register_num++; announce strcharinfo(0) +" has register for battleground", 0; if ( .register_num < .min2start *2 ) close; announce "event started", 0; .start = 2; callfunc "rand__", .min2start *2, $@rand; for ( .@i = 0; .@i < .register_num; .@i++ ) setbgid ( .@i % 2 )? .red : .blue, .register_aid[ $@rand[.@i] ]; bg_warp .red, "guild_vs3", 13,50; bg_warp .blue, "guild_vs3", 86,50; bg_updatescore "guild_vs3", 0,0; sleep .eventlasting * 1000; if ( .start == 2 ) { if ( .score[1] == .score[2] ) mapannounce "guild_vs3", "Draw !", 0; else if ( .score[1] > .score[2] ) { mapannounce "guild_vs3", "red side wins !", 0; callsub L_reward, .red; } else if ( .score[1] < .score[2] ) { mapannounce "guild_vs3", "blue side wins !", 0; callsub L_reward, .blue; } } bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_kickall .red; bg_kickall .blue; .start = .score[1] = .score[2] = .register_num = 0; deletearray .register_aid; end; L_reward: getbgusers getarg(0); for ( .@i = 0; .@i < $@arenamembersnum; .@i++ ) getitem 30000, 1, $@arenamembers[.@i]; // item reward return; Onredout: callsub L_out, 2; Onblueout: callsub L_out, 1; L_out: announce strcharinfo(0) +" is out from the match !", 1; bg_leave; warp "SavePoint", 0,0; .score[ getarg(0) ]++; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == .min2start ) awake strnpcinfo(0); end; OnInit: .red = 1; // red team bg ID .blue = 2; // blue team bg ID .eventlasting = 30 * 60; // how long would the event last or it auto-reset. 30 *60 = 30 mins .min2start = 3; // how many players require to start ? if 3vs3, set to 3 createbgid .red, "guild_vs3", 13,50, strnpcinfo(0)+"::Onredout", strnpcinfo(0)+"::Onredout"; createbgid .blue, "guild_vs3", 13,50, strnpcinfo(0)+"::Onblueout", strnpcinfo(0)+"::Onblueout"; end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall seriously, 1 of the easiest battleground script ever made break my own record = 40 mins to complete a battleground script XD EDIT: weird, I thought you want the user to get kick out if they got killed ? there's to auto-heal players inside battleground map -
Requesting 3v3 Event (Semi BG Type [Blue Team vs Red Team])
AnnieRuru replied to Aya's question in Script Requests
1 & 2 is bugged currently, it was made during eathena board time but I guess I can made simple fix like from this one to make it compatible with rathena maybe something like this 3 is here 4 is here yes, but still you have to explain how a team gain points to win .... otherwise it doesn't interest me -
my 1st instinct tells me, is having 2 next button http://www.eathena.ws/board/index.php?s=&showtopic=156925&view=findpost&p=863511 yes confirmed in latest rathena prontera,150,177,5 script npc1 100,{ mes "line 1"; doevent "npc2::Onaa"; close; } - script npc2 -1,{ Onaa: mes "line 2"; next; mes "cleared line"; close; }
-
change this line 210 while(getequiprefinerycnt(@typr)!=.@D)successrefitem @typr; into while(getequiprefinerycnt(@typr)<.@D)successrefitem @typr;