Jump to content

Winterfox

Members
  • Posts

    245
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Winterfox

  1. prontera,150,150,5 script HourTimer 111,{ end; OnInit: On7200000: initnpctimer; delwaitingroom; waitingroom("" + gettimestr("%H:%M:%S %p",15),0); }
  2. Can you show your fishing script?
  3. - script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); .reward_minutes = 60; bindatcmd("check", .npc_name$ + "::OnAtcommand"); end; OnAtcommand: dispbottom("Accumulated " + #daily_minute_count); end; OnPCLoginEvent: addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); end; OnUpdate: deltimer(.npc_name$ + "::OnUpdate"); addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); if (checkvending() & 2) { end; } #daily_minute_count += .reward_minutes; switch(#daily_minute_count) { case 60: // 60 minutes #CASHPOINT += 1; getitem 677,1; break; case 120: // 120 minutes #CASHPOINT += 1; getitem 677,1; break; case 180: // 180 minutes #CASHPOINT += 1; getitem 677,1; break; case 240: // 240 minutes #CASHPOINT += 1; getitem 677,1; break; case 300: // 300 minutes #CASHPOINT += 1; getitem 677,1; break; case 360: // 360 minutes #CASHPOINT += 1; getitem 677,1; break; case 420: // 420 minutes #CASHPOINT += 1; getitem 677,1; break; case 480: // 480 minutes #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // reset. break; default: break; } }
  4. You can use the nocommand mapflag, to disable the usage of atcommands on the map to prevent the usage of autoloot. izlude mapflag nocommand 80
  5. //================================================Name====================================================== // AntiBot (Official Release Name) //===============================================Version==================================================== // 1.0 //===============================================Author===================================================== // ____ _____ ______ __ __ __ _______ __ _____ __ __ _______ // | __ \ _ \| __ \| | \ | |/ ___ \ | | / / | \ | |/ ___ \ // | |__| | \ \ |__| | | \| | | _\_/ | |/ /| | \| | | _\_/ // | __/ | | /| | | | |_ \ | | | | | | | |_ \ // | |\ \_/ / |\ \| | |\ | \_/ | | |\ \| | |\ | \_/ | // |__| \_____/|__| \__\__|__| \__|\______/ |__| \__\__|__| \__|\______/ //----------------------------------------Script Last Update 2020------------------------------------------- //==============================================Changelog=================================================== // 1.0 * // - Initial Release //========================================================================================================== - script Anti Bot -1,{ OnNPCKillEvent: if(getgmlevel() > 0) end; @bot_check_kill_count++; if(@bot_check_kill_count >= rand(100,150)) goto Check; end; Check: setpcblock(PCBLOCK_ALL, true); setoption(0x2, 1); mes "[ ^FF7700Anti Bot^000000 ]"; mes "Bot checking time"; mes "Please input the number you see"; next; .@captcha_number = rand(1,5); switch(.@captcha_number) { case 1: mes "################^83F52C##^000000################"; mes "##############^83F52C####^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "##############^83F52C######^000000##############"; break; case 2: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#########^000000##############"; break; case 3: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "##################^83F52C##^000000##############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; break; case 4: mes "###################################"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C#########^000000##############"; mes "#################^83F52C##^000000###############"; mes "#################^83F52C##^000000###############"; break; case 5: mes "###########^83F52C########^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#######^000000################"; mes "#################^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C######^000000################"; break; } input @num; if(@num != .@captcha_number) { atcommand("@kick " + strcharinfo(0)); end; } next; mes "[ ^FF7700Anti Bot^000000 ]"; mes "Thank you for your patience, you can now move on."; setpcblock(PCBLOCK_ALL, false); setoption(0x2, 0); @bot_check_kill_count = 0; close; }
  6. //================================================Name====================================================== // AntiBot (Official Release Name) //===============================================Version==================================================== // 1.0 //===============================================Author===================================================== // ____ _____ ______ __ __ __ _______ __ _____ __ __ _______ // | __ \ _ \| __ \| | \ | |/ ___ \ | | / / | \ | |/ ___ \ // | |__| | \ \ |__| | | \| | | _\_/ | |/ /| | \| | | _\_/ // | __/ | | /| | | | |_ \ | | | | | | | |_ \ // | |\ \_/ / |\ \| | |\ | \_/ | | |\ \| | |\ | \_/ | // |__| \_____/|__| \__\__|__| \__|\______/ |__| \__\__|__| \__|\______/ //----------------------------------------Script Last Update 2020------------------------------------------- //==============================================Changelog=================================================== // 1.0 * // - Initial Release //========================================================================================================== - script Anti Bot -1,{ OnNPCKillEvent: if(getgmlevel() > 0) end; @bot_check_kill_count++; if(@bot_check_kill_count >= rand(100,150)) goto Check; end; Check: setpcblock(PCBLOCK_ALL, true); setoption(0x2, 1); mes "[ ^FF7700Anti Bot^000000 ]"; mes "Bot checking time"; mes "Please input the number you see"; next; .@captcha_number = rand(1,5); switch(.@captcha_number) { case 1: mes "################^83F52C##^000000################"; mes "##############^83F52C####^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "##############^83F52C######^000000##############"; break; case 2: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#########^000000##############"; break; case 3: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "##################^83F52C##^000000##############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; break; case 4: mes "###################################"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C#########^000000##############"; mes "#################^83F52C##^000000###############"; mes "#################^83F52C##^000000###############"; break; case 5: mes "###########^83F52C########^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#######^000000################"; mes "#################^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C######^000000################"; break; } input @num; if(@num != .@captcha_number) { atcommand("@kick " + strcharinfo(0)); end; } next; mes "[ ^FF7700Anti Bot^000000 ]"; mes "Thank you for your patience, you can now move on."; setpcblock(PCBLOCK_ALL, false); setoption(0x2, 0); @kill = 0; close; }
  7. //===== Thaddeus Scripts ================================== //= Simple Cool Anti-Bot //===== By: ================================================== //= Thaddeus //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= Hercules, rAthena, 3ceam, eAthena //===== Description: ========================================= // Improvise Simple Anti-Bot! from method of Brian. //===== Comments: ============================================ //= Change the % chance of triggering, change jail time. //===== Additional Comments: ================================= //= 1.00 Initial Release //===== Contact Info: ========================================= //= http://hercules.ws/board/user/457-thaddeus/ //============================================================ //===== Credits to: ========================================= //= Brian, //============================================================ - script ANTIBOT -1,{ function create_code_segment; OnInit: .code_segment_length = 4; .code_segment_count = 3; .jail_duration_days = 10; .max_error_treshold = 3; initnpctimer; end; OnPCLoginEvent: if(bot_check_error_count) { doevent("ANTIBOT::OnBotCheck"); } end; OnTimer1800000: initnpctimer; addrid(0); OnBotCheck: setpcblock(PCBLOCK_ALL, true); OnRetry: for(.@i = 0; .@i < .code_segment_count; .@i++) { .@code$[.@i] = create_code_segment(.code_segment_length); } mes "You Have 3 Chance to Type the Red Text Correctly"; mes "If you failed- You will be jailed"; mes "Input the ^FF0000RED COLOUR^000000 parts"; mes "^FF0000" + implode(.@code$, "^000000^0000FF-^000000^FF0000") + "^000000"; input .@input$; if(.@input$ != implode(.@code$, "")){ bot_check_error_count++; if (bot_check_error_count >= .max_error_treshold) { atcommand("@jailfor " + .jail_duration_days + "d " + strcharinfo(0)); announce("[Anti-BOT]: The user [" + strcharinfo(0) + "] has been jailed for " + .jail_duration_days + " days.", 0, 0xe80f0f); bot_check_error_count = 0; setpcblock(PCBLOCK_ALL, false); end; } mes("You entered the wrong code.."); next; goto OnRetry; } bot_check_error_count = 0; setpcblock(PCBLOCK_ALL, false); end; function create_code_segment { .@length = getarg(0); setarray(.@character_list$, "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "=", "/", "+"); for(.@i = 0; .@i < .@length; .@i++) { .@code$ += .@character_list$[rand(getarraysize(.@character_list$))]; } return .@code$; } } sec_pri mapflag pvp off
  8. - script GO_WRAPPER -1,{ OnInit: .map$ = "prontera"; .start_x = 150; .start_y = 150; .end_x = 160; .end_y = 160; bindatcmd("go", strnpcinfo(3) + "::OnGoWrapper"); end; OnGoWrapper: if(getmapxy(.@map$, .@x, .@y) < 0) end; if(.map$ == .@map$ && (.@x >= .start_x && .@x <= .end_x) && (.@y >= .start_y && .@y <= .end_y)) { dispbottom("You can't use @go in this area."); end; } atcommand("@go " + implode(.@atcmd_parameters$, " ")); end; }
  9. You could use bindatcmd to wrap a costum @go around the original and check in this if the player using it is in the PvP Cell and if he is, ignore the call of @go. If he isn't, you could simply call go with the parameters he used.
  10. - script SHOP_COIN_CONVERTER -1,{ OnInit: .exchange_item = 501; .conversion_rate = 1000; // 1000 to 1. initnpctimer; end; OnTimer1800000: // Reset the timer. initnpctimer; // Add all players on the server to the script. addrid(0); // Check if the player is autotrading and exit if not. if(!(checkvending(strcharinfo(0)) & 2)) end; // Convert .conversion_rate zeny into amount to exchange. .@exchange_amount = floor(Zeny / .conversion_rate, 1); // If the exchange amount is below 1 exit. if(.@exchange_amount < 1) end; // If the player can't carry all the items exit. if((getiteminfo(.exchange_item, ITEMINFO_WEIGHT) * .@exchange_amount + Weight) > MaxWeight) end; // Subtract zeny. Zeny -= .@exchange_amount * .conversion_rate; // Handout the item in .@exchange_amount. getitem(.exchange_item, .@exchange_amount); }
  11. You can use the last parameter of bindatcmd. The default of charcommand level is 100 so that it basically is disabled by default. If you set it to a group level someone has, you should be able to use that command like a char command. bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};
  12. if(BaseLevel >= 90) { if(Zeny < .@price) { message(strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny."); end; } Zeny -= .@price; } specialeffect2 EF_HEAL2; percentheal 100,100;
  13. That symbol and message is created by a status effect. You will need to add a new status effect to your client. Afterward, you can use the status effect id in a script as a parameter for sc_start to make it appear for players that you want to see it for the duration you would like them to see it.
  14. Winterfox

    Quest Shop

    You could create a copy of the item so that it has a unique id you can check for in the NPC that collects the quest requirement.
  15. That is something you need to change in the source, not via script.
  16. You could create a custom teleport, that only lets you enter without a party and use a mapflag to prevent the creation of new a party on the target map to make sure there are no partys on that map. prontera,150,150,4 script #nopartyteleport WARPNPC,3,3,{ end; OnTouch_: if(getcharid(1)) { dispbottom("Players with a party can't enter!"); end; } warp("izlude", 155, 155); } izlude mapflag partylock
  17. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt: *sc_start <effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}}; Optional value <rate> is the chance that the status will be invoked (100 = 1%). This is used primarily in item scripts. When used in an NPC script, a flag MUST be defined for the rate to work. sc_start SC_BOSSMAPINFO,600000,0,5000;
  18. Could you provide more information, like what problem happens when you many people at the same time use that script? Could you also provide the script we talk about?
  19. The solution depends on the payment method you want to use. If you want to use cashpoints or kafrapoints as currency, you can replace shop at the bottom with cashshop. If you want to use items as currency, you can use itemshop. Finally, if you want to use some variable where the currency is stored, you can use pointshop. There are other types of shops available: cashshop - use "cashshop" in place of "shop" to use the Cash Shop interface, allowing you to buy items with special points that are stored as account variables called #CASHPOINTS and #KAFRAPOINTS. This type of shop will not allow you to sell items at it, only make purchases. The layout used to define sale items still count, and "<price>" refers to how many points will be spent purchasing the them. "itemshop" and "pointshop" use the Shop interface, allowing you to buy items with a specific item or special points from a variable. 'pointshop' only supports permanent character variables, temporary character variables, permanent local account variables or permanent global account variables. These variables must be of integer type, not string. 'discount' flag is an optional value which makes the price at that shop become affected by discount skill.
  20. prontera,150,150,6 script Dev 123,{ // get player coordinates. getmapxy(.@map$, .@x, .@y); // clear array of mob ids and spawn the mobs at the players coordinates. cleararray($@mobid[0], 0, getarraysize($@mobid)); monster(.@map$, .@x, .@y, "", .mob_id, .mob_amount); // add the spawned mobs to the mob queue. for(.@i = 0; .@i < getarraysize($@mobid); .@i++) { .@next_index = getarraysize(.mob_queue); .mob_queue[.@next_index] = $@mobid[.@i]; .mob_queue[.@next_index + 1] = gettimetick(2); } end; OnInit: // config .mob_id = 1002; .mob_amount = 1; .timeout = 10; // start a infinite loop that.. freeloop(1); while(true) { // checks every second for mobs that have existed for .timeout seconds, kill them and remove them from the mob queue. for(.@i = 0; .@i < getarraysize(.mob_queue); .@i += 2) { if(gettimetick(2) - .mob_queue[.@i + 1] == .timeout) { unitkill(.mob_queue[.@i]); deletearray(.mob_queue[.@i], 2); .@i -= 2; } } sleep(1000); } freeloop(0); }
  21. function script randombox { setarray(.@box_items, 501, 505, 522); .@item = .@box_items[rand(getarraysize(.@box_items))]; getitem(.@item, 1); announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!"); return; }
  22. function script randombox { setarray(.@box_items, 501, 505, 522); .@item = .@box_items[rand(getarraysize(.@box_items))]; getitem(.@item, 1); announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!"); return; }
  23. #DAILYRENTREWARD is a global account variable, that means it is the same for all NPCs and all characters of one account. So if the cooldown is set, it will be set for all NPCs that check for it.
  24. prontera,142,173,5 script Recompensas Diarias 911,{ .@cd = 60 * 60 * 24; // 24 hrs .@time = gettimetick(2); if ( #DAILYRENTREWARD + .@cd > .@time ) { mes "Volte novamente em " + Time2Str(#DAILYRENTREWARD + .@cd) + " para pegar sua recompensa!"; close; } mes "Aqui está sua recompensa, aproveite-a!"; close2; // Pick one item index randomly as reference. .@reward_item_index = rand(getarraysize(.reward_items)); // Use the reference to get the item id and duration of the referenced item. rentitem(.reward_items[.@reward_item_index], .reward_item_durations[.@reward_item_index]); #DAILYRENTREWARD = .@time; end; OnInit: // Set the list of possible items and how long they should be rentable. setarray(.reward_items, 4302, 720); setarray(.reward_item_durations, 7200, 7200); }
  25. //===== rAthena Script ============================================ //= Party vs Party //===== By: ======================================================= //= AnnieRuru //===== Current Version: ========================================== //= 0.2 //===== Compatible With: ========================================== //= rathena 2020-09-23 //===== Description: ============================================== //= GM has to manually pick which 2 party to fight //===== Topic ===================================================== //= https://rathena.org/board/topic/125939-looking-for-a-tournament-npc-sytem-pt-vs-pt/ //===== Additional Comments: ====================================== //= came over to rathena forum for a while, glad to see potential members on the other side //================================================================= prontera,155,177,5 script PartyVsParty 100,{ goto OnWarStart; end; OnInit: .eventlasting = 60; // 60 seconds .partysize = 1; bindatcmd "startmatch", strnpcinfo(3)+"::OnWarStart", 99,99; setarray .available_type$, " ^00FF00Available^000000", " ^FF0000Unavailable^000000", " ^FF0000Offline^000000"; setmapflag "guild_vs3", mf_battleground, 2; setmapflag "guild_vs3", mf_nosave; setmapflag "guild_vs3", mf_nomemo; setmapflag "guild_vs3", mf_nowarp; setmapflag "guild_vs3", mf_nowarpto; setmapflag "guild_vs3", mf_noteleport; setmapflag "guild_vs3", mf_nopenalty; end; OnWarStart: if (.start) { mes "The match is in progress ..."; mes "The current score is "+ .partyAscore +":"+ .partyBscore; mes "Terminate ?"; next; if (select("No", "Yes") == 1) close; if (select("Yes", "No") == 2) close; .skip = true; awake strnpcinfo(0); close; } mes "Welcome, what do you want to do?"; callsub L_display_party_members, .partyA, "A"; callsub L_display_party_members, .partyB, "B"; next; switch(select("Set Party Size", "Select Party A", "Select Party B", "Start Match")) { case 1: mes "input exact party size"; mes "if 3vs3, input 3"; next; input .partysize, 1, 12; goto OnWarStart; case 2: .partyA = callsub(L_select_party, "A", .partyA, .partyB); goto OnWarStart; case 3: .partyB = callsub(L_select_party, "B", .partyB, .partyA); goto OnWarStart; case 4: .@conditions = 0; .@conditions += callsub(L_check_party_conditions, .partyA, "A"); .@conditions += callsub(L_check_party_conditions, .partyB, "B"); if (.@conditions < 2 || .start) goto OnWarStart; else goto L_start; } close; L_display_party_members: if (!getarg(0)) mes "Party "+ getarg(1) +" = ^FF0000None^000000"; else { getpartymember getarg(0), 0; getpartymember getarg(0), 1; getpartymember getarg(0), 2; .@origin = getcharid(3); .@online = .@unavailable = 0; for (.@i = 0; .@i < $@partymembercount; ++.@i) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { attachrid $@partymemberaid[.@i]; if (getmapflag(strcharinfo(3), mf_nowarp)) { .@type[.@i] = 1; ++.@online; ++.@unavailable; } else { .@type[.@i] = 0; ++.@online; } } else .@type[.@i] = 2; } attachrid .@origin; mes "Party "+ getarg(1) +" = ["+ getpartyname(.partyA) +"] "+( ($@partymembercount == .partysize && .@online == .partysize && !.@unavailable)? "^00FF00Ready": "^FF0000Not Qualify" )+"^000000"; mes "Online = "+ .@online +((.@unavailable)? ", Unavailable = "+ .@unavailable : ""); for (.@i = 0; .@i < $@partymembercount; ++.@i) mes "- "+ $@partymembername$[.@i] + .available_type$[.@type[.@i]]; } return; L_select_party: mes "input a player name"; input .@tmp$; if (getcharid(3, .@tmp$) == 0) { mes "player not available"; next; return getarg(1); } .@partyid = getcharid(1, .@tmp$); if (!.@partyid) { mes "that player doesn't have a party"; next; return getarg(1); } if (.@partyid == getarg(2)) { mes "that player is a member on the other party"; next; return getarg(1); } mes "are you sure you want the party"; mes getpartyname(.@partyid) +" as Party "+ getarg(0) +"?"; next; if (select("Yes","No") == 2) return getarg(1); return .@partyid; L_check_party_conditions: if (!getarg(0)) { mes "Party"+ getarg(1) +" hasn't been configure"; next; return false; } getpartymember getarg(0), 0; getpartymember getarg(0), 1; getpartymember getarg(0), 2; .@origin = getcharid(3); for (.@i = 0; .@i < $@partymembercount; ++.@i) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { attachrid $@partymemberaid[.@i]; ++.@online; if (getmapflag(strcharinfo(3), mf_nowarp)) .@index[.@c++] = .@i; } } attachrid .@origin; if ($@partymembercount != .partysize) { mes "Party"+ getarg(1) +" has changed its party size"; next; return false; } if (!.@online) { mes "Party"+ getarg(1) +" don't have any players online at the moment"; next; return false; } if (.@online != .partysize) { mes "Party"+ getarg(1) +" has a few members gone offline"; next; return false; } if (.@c > 0) { mes "Party"+ getarg(1) +" has "+ .@c +" party members not ready, still attending on other event maps"; for (.@i = 0; .@i < .@c; ++.@i) mes "- "+ $@partymembername$[.@index[.@i]]; next; return false; } return true; L_register_bg_party: getpartymember getarg(0), 1; getpartymember getarg(0), 2; for (.@i = 0; .@i < $@partymembercount; ++.@i) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { bg_join getarg(4), "guild_vs3", getarg(2), getarg(3), $@partymembercid[.@i]; set getarg(1), getarg(1) +1; } } return; L_start: .start = true; announce "Party Vs Party : ["+ getpartyname(.partyA) +"] VS ["+ getpartyname(.partyB) +"]", bc_all; .partyAid = bg_create( "guild_vs3", 13,50, strnpcinfo(0)+"::OnpartyAQuit", strnpcinfo(0)+"::OnpartyADead" ); .partyBid = bg_create( "guild_vs3", 86,50, strnpcinfo(0)+"::OnpartyBQuit", strnpcinfo(0)+"::OnpartyBDead" ); callsub L_register_bg_party, .partyA, .partyAscore, 13,50, .partyAid; callsub L_register_bg_party, .partyB, .partyBscore, 86,50, .partyBid; bg_updatescore "guild_vs3", .partyAscore, .partyBscore; setwall "guild_vs3", 19,55, 12, DIR_SOUTH, false, "partyvspartyA"; setwall "guild_vs3", 80,55, 12, DIR_SOUTH, false, "partyvspartyB"; sleep 3000; for (.@i = 5; .@i > 0; --.@i) { mapannounce "guild_vs3", "["+ .@i +"]", bc_map; if (!.skip) sleep 1000; } mapannounce "guild_vs3", "Start!", bc_map; delwall "partyvspartyA"; delwall "partyvspartyB"; if (!.skip) sleep .eventlasting * 1000; if ( .partyAscore > .partyBscore ) { mapannounce "guild_vs3", "Party ["+ getpartyname(.partyA) +"] is victorious!", bc_map; callsub L_Reward, .partyAid; } else if ( .partyBscore > .partyAscore ) { mapannounce "guild_vs3", "Party ["+ getpartyname(.partyB) +"] is victorious!", bc_map; callsub L_Reward, .partyBid; } else mapannounce "guild_vs3", "- The match has ended in a draw! -", bc_map; bg_warp .partyAid, "prontera",152,178; bg_warp .partyBid, "prontera",154,178; bg_destroy .partyAid; bg_destroy .partyBid; .start = .skip = false; .partyAscore = .partyBscore = 0; end; L_Reward: bg_get_data getarg(0), 1; for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) getitem 512, 1, $@arenamembers[.@i]; return; OnpartyADead: callsub L_Dead, .partyAscore; OnpartyBDead: callsub L_Dead, .partyBscore; L_Dead: set getarg(0), getarg(0) -1; bg_updatescore "guild_vs3", .partyAscore, .partyBscore; bg_leave; if (!getarg(0)) { .skip = true; awake strnpcinfo(0); } end; OnpartyAQuit: callsub L_Quit, .partyAscore; OnpartyBQuit: callsub L_Quit, .partyBscore; L_Quit: set getarg(0), getarg(0) -1; bg_updatescore "guild_vs3", .partyAscore, .partyBscore; percentheal 100, 100; if (!getarg(0)) { .skip = true; awake strnpcinfo(0); } end; }
×
×
  • Create New...