Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Bulletin Centre
    • Community News
    • Repository News
    • Ragnarok News
  • Hercules Development Centre
    • Development Discussion
    • Suggestions
    • Development Centre Archives
  • Support & Releases
    • General Server Support
    • Database
    • Scripting
    • Source
    • Plugin
    • Client-Side
    • Graphic Enhancements
    • Other Support & Releases
  • Hercules Community
    • General Discussion
    • Projects
    • Employment
    • Server Advertisement
    • Arts & Writings
    • Off Topic
  • 3CeAM Centre
    • News and Development
    • Community
  • International Communities
    • Filipino Community
    • Portuguese Community
    • Spanish Community
    • Other Communities

Categories

  • Client Resources
  • Graphic Resources
    • Sprites & Palettes
    • Maps & Textures
    • Other Graphics
  • Server Resources
    • Server Managers / Editors Releases
    • Script Releases
    • Source Modifications
    • Plugins
    • Pre-Compiled Server
  • Web Resources

Calendars

  • Community Calendar

Found 54 results

  1. View File [Event] Wheel of fortune Wheel of fortune Fun event, this particular version is set to accept Zeny as a payment for gambling. Would like to thank a lot @Myriad for Improving my code! Package contains: data.zip data folder to put into your GRF file or straight into data folder. wheel_of_fortune.txt the script itself. WheelOfFortune.psd the Photoshop source file, you can edit the prizes pictures if you like. This event can be configured to run automatically OnClock0800: OnClock1200: OnClock1600: OnClock2000: OnClock2200: just change this part of the script, at what time you want the script to run. Or, a GM can start this event by running this command : @wheel_of_fortune start As a reference, This is a version of the script using event points as a payment (in case you would like to take a look) https://pastebin.com/wN6ZjxM0 Submitter Habilis Submitted 06/14/18 Category Events & Games  
  2. script

    Download: 1.4 plugin tested with prontera mapflag noitem 0,4,5 prontera mapflag noitem IT_HEALING, IT_WEAPON, IT_ARMOR disable player from using healing items, and preventing equip weapon and armor. . prontera mapflag noitem Poring_Card prontera mapflag noitem 4001 disable player from using Poring Card
  3. Description: Adds the check_resist() script command to your script engine. With this command, you can retrieve elemental resistances for a character. check_resist(<type>{, <account id>}) e.g. check_resist(Ele_Water); check_resist(Ele_Wind, getcharid(CHAR_ID_ACCOUNT)); https://github.com/EyesOfAHawk/HPM-Plugins/blob/master/src/plugins/check_resist.c
  4. Status: Unavailable [2/2] Hello, I have been a part of this community for more than two years. I feel my skills have reached a point where I can offer them in a freelance manner. About Me I started scripting in 2016, as my server was in desperate need of developers. Over time, I branched into source. My specialties include editing skills, creating menu-based scripts, atcommands and script commands. Samples Below are some samples I created for the community. I believe they are proof of my ability and hopefully fill you with confidence to hire me. Scripts Function - Ordinal Suffix: Adds the ordinal suffix to a number. E.g. 1 -> 1st, 223 -> 223rd, 1000 -> 1000th, etc. Soul Link NPC: A basic NPC which allows players to pay for Soul Links. Wheel of Fortune: While not an original script idea of mine, the final version was revised and edited by me. Script Commands BUILDIN(getalliance): A script command which returns the Alliance and Opposition Guild IDs of the inputted Guild ID. Skill/Status Edits TF_BACKSLIDING: A plugin which re-enables Back Sliding's animation, the way it was in eAthena. Magic Rod Behavior: A pull request I made which allows you to configure Magic Rod to use its old eAthena behavior. SG_PARRYING_LOV: A plugin which gives a Star Gladiator the 'Lord of Vermilion' and 'Parrying' skills while Soul Linked. Services My specialties, the things you should absolutely hire me for: Atcommands. Script commands. Anything script related. Skill modification. Scripting: I consider myself proficient with the script engine. Pitch your idea to me, I'll make it work. Source Edits: When it comes to source edits, you should specify if you want it in plugin or diff/instruction form. In the case you want a plugin, I will investigate if it is feasible for the source to be in plugin format. Depending on my schedule (I am a University student) and the difficulty of the job, completion can take anywhere from 2-3 days to up to a week. When I agree to take on your job, I will usually inform you how long I believe it will take. I will only take on 2 jobs at any one time. Prices All prices start at $5, with the exception of scripts, which start at $3. Payment is only available through PayPal. No other methods will be accepted. Continued support after the completion of your job is free. Contact You can contact me via PM here on the Hercules forums or on Discord. I go by the same name 'Myriad' on the Hercules Discord. → I check these forums every 2-3 days. I have email alerts setup for my PMs, so if you message me here, I should get back to you in a day or two at the most. → I usually log into my Discord once or twice a day. It may take 24-48 hours to get a response from me, but in most cases it should be within 12 hours.
  5. Hi all, For the longest time I've been creating custom script commands simply so I can read a value from struct map_session_data{}. For example, I wanted to return the value of sd->state.showzeny, so I created a simple buildin just for that purpose.It would go something like this: BUILDIN(read_showzeny) { struct map_session_data *sd = script->rid2sd(st); if (sd != NULL) script_pushint(st, sd->state.showzeny); else script_pushint(st, -1); return true; } Seems not bad, right? But then it got me thinking. I'm creating all these script commands for one simple action. Surely there's a better way? That's when I stumbled across the getunitdata() command. Then it came to me - create a script command which can fetch this data for a player. The Goal Create a script command which can fetch the data which map_session_data provides. It would work similar to getunitdata(): *getplayerdata(<account id>, <DataType>{,<Variable>}) Maybe also setplayerdata()? Helped needed: The one thing is, not all the stuff in there is useful. Maybe it would be best to selectively choose what can be retrieved as data? I made a list for this stuff. Let me know what you think.
  6. Version 1.0.2

    608 downloads

    Wheel of fortune Fun event, this particular version is set to accept Zeny as a payment for gambling. Would like to thank a lot @Myriad for Improving my code! Package contains: data.zip data folder to put into your GRF file or straight into data folder. wheel_of_fortune.txt the script itself. WheelOfFortune.psd the Photoshop source file, you can edit the prizes pictures if you like. This event can be configured to run automatically OnClock0800: OnClock1200: OnClock1600: OnClock2000: OnClock2200: just change this part of the script, at what time you want the script to run. Or, a GM can start this event by running this command : @wheel_of_fortune start As a reference, This is a version of the script using event points as a payment (in case you would like to take a look) https://pastebin.com/wN6ZjxM0
  7. Version v10

    121 downloads

    This script provides various array manipulation functions, and more might be added in the future. All of those functions (except the arithmetic ones) work with both integer and string arrays. The start of the array is always implicitly index 0, unless an index is specified, ie @array[index] array_pad(<array>, <size>, <value>) pads the array left or right with <value> until it reaches <size> size. If <size> is negative it will pad left. > returns the number of added entries setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_pad([email protected], 8, 69); // => 3 // array is now: 1, 2, 3, 4, 5, 69, 69, 69 setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_pad([email protected], -8, 69); // => 3 // array is now: 69, 69, 69, 1, 2, 3, 4, 5 array_replace(<array>, <needle>, <replacement>{, <neq>}) finds every occurrence of <needle> within the array and replaces it with <replacement>. if <neq> is true, finds entries that do not match instead > returns the number of changed entries setarray([email protected], 1, 1, 3, 1, 5); // initialize the array array_replace([email protected], 1, 69); // => 3 // array is now: 69, 69, 3, 69, 5 array_find(<array>, <needle>{, <neq>}) finds the first occurrence of <needle> within the array. if <neq> is true, finds entries that do not match instead > returns the index, or if none is found returns -1 setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_find([email protected], 3); // => 2 array_find([email protected], 1); // => 0 array_find([email protected], 6); // => -1 array_rfind(<array>, <needle>{, <neq>}) like array_find, but finds the last occurrence. if <neq> is true, finds entries that do not match instead > returns the index, or if none is found returns -1 setarray([email protected], 1, 2, 3, 4, 3); // initialize the array array_rfind([email protected], 3); // => 4 array_rfind([email protected], 4); // => 3 array_rfind([email protected], 6); // => -1 array_exists(<array>, <needle>{, <neq>}) very similar to array_find() but it instead just checks if it exists or not. if <neq> is true, finds entries that do not match instead > returns true or false setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_exists([email protected], 3); // => true array_exists([email protected], 6); // => false array_count(<array>, <needle>{, <neq>}) similar to array_find() but iterates through the whole array. if <neq> is true, finds entries that do not match instead > returns the total number of occurrences of <needle> setarray([email protected], 1, 69, 3, 69, 5); // initialize the array array_count([email protected], 69); // => 2 array_entries(<array>) a wrapper around array_count(). behaves similarly to getaraysize() but does not count holes > returns the number of non-empty entries setarray([email protected], 1, 2, 0, 0, 5); // initialize the array getarraysize([email protected]); // => 5 array_entries([email protected]); // => 3 array_remove(<array>, <needle>{, <neq>}) finds and removes every occurrence of <needle> from the array, while shifting left. if <neq> is true, finds entries that do not match instead > returns the number of removed entries setarray([email protected], 1, 69, 3, 69, 5); // initialize the array array_remove([email protected], 69); // => 2 // array is now: 1, 3, 5 array_reverse(<array>) reverses the array > returns true setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_reverse([email protected]); // => true // array is now: 5, 4, 3, 2, 1 array_sum(<array>) iterates through the whole array to perform an arithmetic addition > returns the sum of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_sum([email protected]); // ((((1 + 2) + 3) + 4) + 5) => 15 array_difference(<array>) iterates through the whole array to perform an arithmetic subtraction > returns the difference of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_difference([email protected]); // ((((1 - 2) - 3) - 4) - 5) => -13 array_product(<array>) iterates through the whole array to perform an arithmetic multiplication > returns the product of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_product([email protected]); // ((((1 * 2) * 3) * 4) * 5) => 120 array_quotient(<array>) iterates through the whole array to perform an arithmetic division > returns the quotient of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_quotient([email protected]); // ((((1 / 2) / 3) / 4) / 5) => 0 array_shift(<array>) removes the first entry of the array, while shifting left > returns the value of the removed entry setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_shift([email protected]); // => 1 // array is now: 2, 3, 4, 5 array_unshift(<array>, <value>) adds <value> to the start of the array, while shifting right > returns the new size of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_unshift([email protected], 69); // => 6 // array is now: 69, 1, 2, 3, 4, 5 array_pop(<array>) removes the last entry of the array > returns the value of the removed entry setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_pop([email protected]); // => 5 // array is now: 1, 2, 3, 4 array_push(<array>, <value>) adds <value> to the end of the array > returns the new size of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_push([email protected], 69); // => 6 // array is now: 1, 2, 3, 4, 5, 69 array_shuffle(<array>) shuffles the array > returns true setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_shuffle([email protected]); // => true // array is now: 1, 4, 2, 3, 5 (example, unpredictable) array_unique(<array>{, <threshold>}) allows array entries to appear up to <threshold> times (1 by default) and removes the extraneous ones. useful to remove duplicate entries > returns the number of removed entries setarray([email protected], 1, 3, 3, 4, 5); // initialize the array array_unique([email protected]); // => 1 // array is now: 1, 3, 4, 5 array_diff(<base array>, <array>{, <array>...}, <result array>) compares the base array against one or more other arrays and fills the result array with the entries in base array that are not present in any of the other arrays > returns the number of entries not found in other arrays setarray([email protected], 1, 2, 3, 4, 5, 6, 7, 8); // initialize the base array // fill the arrays to compare with the base array: setarray([email protected], 2, 3, 4, 5, 6, 7, 8); // missing "1" setarray([email protected], 1, 2, 3, 4, 6, 7, 8); // missing "5" setarray([email protected], 1, 2, 3, 4, 5, 6, 7); // missing "8" // compare foo, bar and baz against base, and fill result: array_diff([email protected], [email protected], [email protected], [email protected], [email protected]); // => 3 // [email protected] is now: 1, 5, 8 array_filter(<array>, "<function>") filters the array using a function that is tested against every entries. if the function returns false, the relevant entry is removed and the array is shifted left > returns the number of removed entries function script is_prime { if (getarg(0) <= 1) return false; for ([email protected] = 2; [email protected] <= getarg(0) / 2; [email protected]) if ((getarg(0) % [email protected]) == 0) return false; return true; } setarray([email protected], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); array_filter([email protected], "is_prime"); // => 9 // array is now: 2, 3, 5, 7, 11, 13 array_sort(<array>) sorts the array in ascending order > returns true setarray([email protected], 2, 1, 8, 4, 5, 7, 6, 3); // initialize the array array_sort([email protected]); // => true // array is now: 1, 2, 3, 4, 5, 6, 7, 8 array_rsort(<array>) sorts the array in descending order > returns true setarray([email protected], 2, 1, 8, 4, 5, 7, 6, 3); // initialize the array array_rsort([email protected]); // => true // array is now: 8, 7, 6, 5, 4, 3, 2, 1 Requires Hercules of June 24 2017 or newer version -------------------------------------------------------------------------------------- This script was made by me, for The Mana World + Evol. License: public domain (CC0)
  8. Script

    File Name: Special Shop File Submitter: Dastgir File Submitted: 15 May 2013 File Category: Source Modifications As Per This Topic: http://herc.ws/board/topic/3204-special-shop/#entry21298 Example of usage: For using ItemID x for buying Items <map name>,<x>,<y>,<facing> itemshop <npc name> <spriteid>,<item_id><itemid>:<amount>,..... This shop will use item id mentioned in the NPC. For Using Variable for buying items <map name>,<x>,<y>,<facing> pointshop <npc name> <spriteid>,"<variable_name>":"<variable_description>",<itemid>:<amount>,..... Variable_Name will be deducted from your variable,and it will show variable_description when click npc. Please See ScreenShot for More information. NOTE: Please Do Not Share without Credit.Please Do not Share this as Paid Service. Click here to download this file
  9. View File Array manipulation functions This script provides various array manipulation functions, and more might be added in the future. All of those functions (except the arithmetic ones) work with both integer and string arrays. The start of the array is always implicitly index 0, unless an index is specified, ie @array[index] array_pad(<array>, <size>, <value>) pads the array left or right with <value> until it reaches <size> size. If <size> is negative it will pad left. > returns the number of added entries setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_pad([email protected], 8, 69); // => 3 // array is now: 1, 2, 3, 4, 5, 69, 69, 69 setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_pad([email protected], -8, 69); // => 3 // array is now: 69, 69, 69, 1, 2, 3, 4, 5 array_replace(<array>, <needle>, <replacement>{, <neq>}) finds every occurrence of <needle> within the array and replaces it with <replacement>. if <neq> is true, finds entries that do not match instead > returns the number of changed entries setarray([email protected], 1, 1, 3, 1, 5); // initialize the array array_replace([email protected], 1, 69); // => 3 // array is now: 69, 69, 3, 69, 5 array_find(<array>, <needle>{, <neq>}) finds the first occurrence of <needle> within the array. if <neq> is true, finds entries that do not match instead > returns the index, or if none is found returns -1 setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_find([email protected], 3); // => 2 array_find([email protected], 1); // => 0 array_find(.[email protected], 6); // => -1 array_rfind(<array>, <needle>{, <neq>}) like array_find, but finds the last occurrence. if <neq> is true, finds entries that do not match instead > returns the index, or if none is found returns -1 setarray([email protected], 1, 2, 3, 4, 3); // initialize the array array_rfind([email protected], 3); // => 4 array_rfind([email protected], 4); // => 3 array_rfind([email protected], 6); // => -1 array_exists(<array>, <needle>{, <neq>}) very similar to array_find() but it instead just checks if it exists or not. if <neq> is true, finds entries that do not match instead > returns true or false setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_exists([email protected], 3); // => true array_exists([email protected], 6); // => false array_count(<array>, <needle>{, <neq>}) similar to array_find() but iterates through the whole array. if <neq> is true, finds entries that do not match instead > returns the total number of occurrences of <needle> setarray([email protected], 1, 69, 3, 69, 5); // initialize the array array_count([email protected], 69); // => 2 array_entries(<array>) a wrapper around array_count(). behaves similarly to getaraysize() but does not count holes > returns the number of non-empty entries setarray([email protected], 1, 2, 0, 0, 5); // initialize the array getarraysize([email protected]); // => 5 array_entries([email protected]); // => 3 array_remove(<array>, <needle>{, <neq>}) finds and removes every occurrence of <needle> from the array, while shifting left. if <neq> is true, finds entries that do not match instead > returns the number of removed entries setarray([email protected], 1, 69, 3, 69, 5); // initialize the array array_remove([email protected], 69); // => 2 // array is now: 1, 3, 5 array_reverse(<array>) reverses the array > returns true setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_reverse([email protected]); // => true // array is now: 5, 4, 3, 2, 1 array_sum(<array>) iterates through the whole array to perform an arithmetic addition > returns the sum of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_sum([email protected]); // ((((1 + 2) + 3) + 4) + 5) => 15 array_difference(<array>) iterates through the whole array to perform an arithmetic subtraction > returns the difference of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_difference([email protected]); // ((((1 - 2) - 3) - 4) - 5) => -13 array_product(<array>) iterates through the whole array to perform an arithmetic multiplication > returns the product of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_product([email protected]); // ((((1 * 2) * 3) * 4) * 5) => 120 array_quotient(<array>) iterates through the whole array to perform an arithmetic division > returns the quotient of every entries of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_quotient([email protected]); // ((((1 / 2) / 3) / 4) / 5) => 0 array_shift(<array>) removes the first entry of the array, while shifting left > returns the value of the removed entry setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_shift([email protected]); // => 1 // array is now: 2, 3, 4, 5 array_unshift(<array>, <value>) adds <value> to the start of the array, while shifting right > returns the new size of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_unshift([email protected], 69); // => 6 // array is now: 69, 1, 2, 3, 4, 5 array_pop(<array>) removes the last entry of the array > returns the value of the removed entry setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_pop([email protected]); // => 5 // array is now: 1, 2, 3, 4 array_push(<array>, <value>) adds <value> to the end of the array > returns the new size of the array setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_push([email protected], 69); // => 6 // array is now: 1, 2, 3, 4, 5, 69 array_shuffle(<array>) shuffles the array > returns true setarray([email protected], 1, 2, 3, 4, 5); // initialize the array array_shuffle([email protected]); // => true // array is now: 1, 4, 2, 3, 5 (example, unpredictable) array_unique(<array>{, <threshold>}) allows array entries to appear up to <threshold> times (1 by default) and removes the extraneous ones. useful to remove duplicate entries > returns the number of removed entries setarray([email protected], 1, 3, 3, 4, 5); // initialize the array array_unique([email protected]); // => 1 // array is now: 1, 3, 4, 5 array_diff(<base array>, <array>{, <array>...}, <result array>) compares the base array against one or more other arrays and fills the result array with the entries in base array that are not present in any of the other arrays > returns the number of entries not found in other arrays setarray([email protected], 1, 2, 3, 4, 5, 6, 7, 8); // initialize the base array // fill the arrays to compare with the base array: setarray([email protected], 2, 3, 4, 5, 6, 7, 8); // missing "1" setarray([email protected], 1, 2, 3, 4, 6, 7, 8); // missing "5" setarray([email protected], 1, 2, 3, 4, 5, 6, 7); // missing "8" // compare foo, bar and baz against base, and fill result: array_diff([email protected], [email protected], [email protected], [email protected], [email protected]); // => 3 // [email protected] is now: 1, 5, 8 array_filter(<array>, "<function>") filters the array using a function that is tested against every entries. if the function returns false, the relevant entry is removed and the array is shifted left > returns the number of removed entries function script is_prime { if (getarg(0) <= 1) return false; for ([email protected] = 2; [email protected] <= getarg(0) / 2; [email protected]) if ((getarg(0) % [email protected]) == 0) return false; return true; } setarray([email protected], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); array_filter([email protected], "is_prime"); // => 9 // array is now: 2, 3, 5, 7, 11, 13 array_sort(<array>) sorts the array in ascending order > returns true setarray([email protected], 2, 1, 8, 4, 5, 7, 6, 3); // initialize the array array_sort([email protected]); // => true // array is now: 1, 2, 3, 4, 5, 6, 7, 8 array_rsort(<array>) sorts the array in descending order > returns true setarray([email protected], 2, 1, 8, 4, 5, 7, 6, 3); // initialize the array array_rsort([email protected]); // => true // array is now: 8, 7, 6, 5, 4, 3, 2, 1 Requires Hercules of June 24 2017 or newer version -------------------------------------------------------------------------------------- This script was made by me, for The Mana World + Evol. License: public domain (CC0) Submitter meko Submitted 05/29/17 Category Quest, Shops, Functions & Algorithms  
  10. View File Fire Area Hello guys! This is my first script in the Hercules. Basically, do you receive damage while stay stepping. Main configurations: (I'm using the last version of hercules) //Damage Options: .DMG_Type = 1; // Type of damage - [0 - Normal] | [1 - Percentage of maximum health] .DMG_Attack = 5; // Damage per attack (1 to 100 if percentage damage) .DMG_Speed = 250; // Damage speed. The smaller faster (milisseconds) .CAN_Die = 0; // The character can die burned? - [0 - No] | [1 - Yes] // Effects: .DMG_Effect = 49; //When receive damage (Alternatives: 50 , 255 ) Default: 49 .FIRE_Effect = 25; //Flow Effect (Alternatives: 634 , 728, 920, 962) Default: 25 .EFFECT_Speed = 300; //The speed of loop effect (Advanced option. Not recommended change): //Time Options .TIME_DURATION_ON = 3000; // The time that the fire stay enable (milisseconds) .TIME_DURATION_OFF = 2000;// The time that the fire stay disable (milisseconds) .TIME_Quit = 500; // Burning time after leave of the danger area, (milisseconds) Cells configurations: //Bellow, do you configure the cells (Do you can add more, if want) pay_dun00,161,46,0 duplicate(FireArea) #FireArea11 HIDDEN_WARP_NPC,0,0 pay_dun00,161,45,0 duplicate(FireArea) #FireArea12 HIDDEN_WARP_NPC,0,0 pay_dun00,161,44,0 duplicate(FireArea) #FireArea13 HIDDEN_WARP_NPC,0,0 pay_dun00,160,46,0 duplicate(FireArea) #FireArea21 HIDDEN_WARP_NPC,0,0 pay_dun00,160,45,0 duplicate(FireArea) #FireArea22 HIDDEN_WARP_NPC,0,0 pay_dun00,160,44,0 duplicate(FireArea) #FireArea23 HIDDEN_WARP_NPC,0,0 pay_dun00,159,46,0 duplicate(FireArea) #FireArea31 HIDDEN_WARP_NPC,0,0 pay_dun00,159,45,0 duplicate(FireArea) #FireArea32 HIDDEN_WARP_NPC,0,0 pay_dun00,159,44,0 duplicate(FireArea) #FireArea33 HIDDEN_WARP_NPC,0,0 pay_dun00,158,46,0 duplicate(FireArea) #FireArea41 HIDDEN_WARP_NPC,0,0 pay_dun00,158,45,0 duplicate(FireArea) #FireArea42 HIDDEN_WARP_NPC,0,0 pay_dun00,158,44,0 duplicate(FireArea) #FireArea43 HIDDEN_WARP_NPC,0,0 Sorry for my bad english... Enjoy it OBS: If do you use @reloadscript in this script, reload your character. Submitter luizragna Submitted 03/02/18 Category Script Releases  
  11. script Fire Area

    Version 1.0.0

    40 downloads

    Hello guys! This is my first script in the Hercules. Basically, do you receive damage while stay stepping. Main configurations: (I'm using the last version of hercules) //Damage Options: .DMG_Type = 1; // Type of damage - [0 - Normal] | [1 - Percentage of maximum health] .DMG_Attack = 5; // Damage per attack (1 to 100 if percentage damage) .DMG_Speed = 250; // Damage speed. The smaller faster (milisseconds) .CAN_Die = 0; // The character can die burned? - [0 - No] | [1 - Yes] // Effects: .DMG_Effect = 49; //When receive damage (Alternatives: 50 , 255 ) Default: 49 .FIRE_Effect = 25; //Flow Effect (Alternatives: 634 , 728, 920, 962) Default: 25 .EFFECT_Speed = 300; //The speed of loop effect (Advanced option. Not recommended change): //Time Options .TIME_DURATION_ON = 3000; // The time that the fire stay enable (milisseconds) .TIME_DURATION_OFF = 2000;// The time that the fire stay disable (milisseconds) .TIME_Quit = 500; // Burning time after leave of the danger area, (milisseconds) Cells configurations: //Bellow, do you configure the cells (Do you can add more, if want) pay_dun00,161,46,0 duplicate(FireArea) #FireArea11 HIDDEN_WARP_NPC,0,0 pay_dun00,161,45,0 duplicate(FireArea) #FireArea12 HIDDEN_WARP_NPC,0,0 pay_dun00,161,44,0 duplicate(FireArea) #FireArea13 HIDDEN_WARP_NPC,0,0 pay_dun00,160,46,0 duplicate(FireArea) #FireArea21 HIDDEN_WARP_NPC,0,0 pay_dun00,160,45,0 duplicate(FireArea) #FireArea22 HIDDEN_WARP_NPC,0,0 pay_dun00,160,44,0 duplicate(FireArea) #FireArea23 HIDDEN_WARP_NPC,0,0 pay_dun00,159,46,0 duplicate(FireArea) #FireArea31 HIDDEN_WARP_NPC,0,0 pay_dun00,159,45,0 duplicate(FireArea) #FireArea32 HIDDEN_WARP_NPC,0,0 pay_dun00,159,44,0 duplicate(FireArea) #FireArea33 HIDDEN_WARP_NPC,0,0 pay_dun00,158,46,0 duplicate(FireArea) #FireArea41 HIDDEN_WARP_NPC,0,0 pay_dun00,158,45,0 duplicate(FireArea) #FireArea42 HIDDEN_WARP_NPC,0,0 pay_dun00,158,44,0 duplicate(FireArea) #FireArea43 HIDDEN_WARP_NPC,0,0 Sorry for my bad english... Enjoy it OBS: If do you use @reloadscript in this script, reload your character.
  12. Hello! The following plugin will grant your server the getguildid("<Guild Name>") script command. It is quite self-explanatory. Simply enter the Guild Name for which you need the GID. Make sure you capture it too! Example: [email protected] = getguildid("My Pro Guild"); // [email protected] will now be equal to whatever the guild id of 'My Pro Guild' is. // example, can be used with flagemblem flagemblem([email protected]); Hopefully no errors and compiles first time ...and hopefully this will get added to source as I hadn't found a similar functionality to it yet in our existing commands. Download: https://pastebin.com/CpyT7WKm
  13. Hello pessoal... eu quero fazer um item custom no meu servidor... mas eu queria fazer um script como do galho seco e galho sangrento mas eu queria fazer o item sumonar um boss no mesmo nivel do player que usou ele... vc's consegue me ajuda???...Obrigado!!!!!!!
  14. Hello. Does anyone has a VIP BUFFER script? I want it to gives +6 all stats food, 40 atk & m.atk, and +100% EXP & JOB EXP for 5 hours. Thank you.
  15. Please someone help me! I need put a "erasequest" any quest before Reborn to transclass! //===== Criado Por: ============================================== //= Euphy //===== Compatível Com: ========================================== //= BRathena -- Tradução por: Julinhobrow //===== Descrição: =============================================== //= Troca sua classe sem necessidade de quest. //===== Comentários Adicionais: ================================== //= com classes 3rd //= administre no final do arquivo. //================================================================ prontera,147,189,6 script Mestra das Classes 4_F_NACORURI,{ function Job_Menu; function A_An; mes "[^8A2BE2Mestre das Classes^000000]"; if (Class > Job_Soul_Linker) { mes "Não existem mais expansões para sua classe?"; close; } if (checkfalcon() || checkcart() || checkmount() || hascashmount()) { mes "Por favor remova seu "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkmount() || hascashmount())?"mount":"") +" para continuar."; close; } if (.skill_point_check && SkillPoint > 0) { mes "Por favor use todos os seus pontos de habilidade para continuar."; close; } [email protected] = eaclass(); [email protected] = .third_classes ? roclass([email protected]&EAJ_UPPERMASK) : Class; if ([email protected] >= Job_Knight && [email protected] <= Job_Crusader2) { if (BaseLevel < .rebirth_blevel || JobLevel < .rebirth_jlevel) { [email protected] = .rebirth_blevel - BaseLevel; [email protected] = .rebirth_jlevel - JobLevel; mes "Você precisa de mais" + (BaseLevel < .rebirth_blevel ? ((.rebirth_blevel - BaseLevel) +" base levels "+ (JobLevel < .rebirth_jlevel ? "e " : "")) : "") + (JobLevel < .rebirth_jlevel ? (.rebirth_jlevel - JobLevel) +" job levels " : "") + "para continuar."; close; } if (Class > Job_Crusader2) { mes "Avançar para a Terceira Classe?"; next; Job_Menu(roclass([email protected]|EAJL_THIRD)); close; } while (true) { mes "Selecione uma opção."; next; [email protected] = select(" ~ ^0055FFRenascer^000000:"+(.third_classes ? " ~ ^FF0000Terceira Classe^000000" : "")+": ~ ^777777Sair^000000"); if ([email protected] == 3) close; mes "[^8A2BE2Mestre das Classes^000000]"; mes "Você tem certeza?"; next; if ([email protected] == 1) Job_Menu(Job_Novice_High); else Job_Menu(roclass([email protected]|EAJL_THIRD)); mes "[^8A2BE2Mestre das Classes^000000]"; } } [email protected] = roclass([email protected]|EAJL_2_1); [email protected] = roclass([email protected]|EAJL_2_2); if (([email protected]&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) { [email protected] = roclass([email protected]|EAJL_THIRD); [email protected]_jlevel = 99; } else if (Class == Job_Ninja || Class == Job_Gunslinger) { [email protected] = [email protected]; [email protected]_jlevel = 70; } if ([email protected] && .third_classes) { if (BaseLevel < .rebirth_blevel || JobLevel < [email protected]_jlevel) { mes "Você precisa de mais " + (BaseLevel < .rebirth_blevel ? ((.rebirth_blevel - BaseLevel) +" base levels "+ (JobLevel < [email protected]_jlevel ? "e " : "")) : "") + (JobLevel < [email protected]_jlevel ? ([email protected]_jlevel - JobLevel) +" job levels " : "") + "para continuar."; close; } mes "Mudar para "+jobname([email protected])+"?"; next; Job_Menu([email protected]); close; } if ([email protected]&EAJL_2) if ([email protected]&(EAJL_UPPER|EAJL_BABY) || roclass([email protected]|EAJL_UPPER) == -1) { mes "Não existem mais expansões para sua classe."; close; } if (([email protected]&EAJ_BASEMASK) == EAJ_NOVICE) { if (JobLevel < .jobchange_first) { mes "Um job level de "+.jobchange_first+" é necessário para mudar para 1st Classe."; } else if (Class == Job_Novice_High && .linear_jobchange && lastJob) { mes "Mudar de Classe agora?"; next; Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); } else if (Class == Job_Novice) { Job_Menu(Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief, Job_SuperNovice, Job_Taekwon, Job_Gunslinger, Job_Ninja, Job_Baby); } else if (Class == Job_Novice_High) { Job_Menu(Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High); } else if (Class == Job_Baby) { Job_Menu(Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer, Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief, Job_Super_Baby); } else { mes "Ocorreu um erro."; } close; } if (roclass([email protected]|EAJL_2_1) == -1 || roclass([email protected]|EAJL_2_2) == -1) { mes "No more jobs are available."; } else if (!([email protected]&EAJL_2) && JobLevel < .jobchange_second) { mes "É necessário possuir nível de classe "+.jobchange_second+" para mudar para a Segunda Classe."; } else if (.linear_jobchange && lastJob && ([email protected]&EAJL_UPPER)) { mes "Mudar de classe agora?"; next; Job_Menu(lastJob+Job_Novice_High); } else { Job_Menu([email protected], [email protected]); } close; function Job_Menu { while (true) { if (getargcount() > 1) { mes "Selecione uma classe."; [email protected]$ = ""; for ([email protected] = 0; [email protected] < getargcount(); [email protected]) [email protected]$ += " ~ "+jobname(getarg([email protected]))+":"; [email protected]$ += " ~ ^777777Cancelar^000000"; next; [email protected] = getarg(select([email protected]$)-1, 0); if ([email protected]) close; if (([email protected] == Job_SuperNovice || [email protected] == Job_Super_Baby) && BaseLevel < .supernovice_level) { mes "[^8A2BE2Mestre das Classes^000000]"; mes "É necessário possuir nível de classe "+.supernovice_level+" para tornar-se "+jobname([email protected])+"."; close; } mes "[^8A2BE2Mestre das Classes^000000]"; mes "Tem certeza?"; next; } else { [email protected] = getarg(0); } if (select(" ~ Mudar para classe ^0055FF"+jobname([email protected])+"^000000 : ~ ^777777"+(getargcount() > 1 ? "Voltar" : "Cancelar")+"^000000") == 1) { mes "[^8A2BE2Mestre das Classes^000000]"; mes "Agora você é "+A_An(jobname([email protected]))+"!"; if ([email protected] == Job_Novice_High && .linear_jobchange) lastJob = Class; // Note: This is incompatible with the Valkyrie rebirth script. jobchange [email protected]; if ([email protected] == Job_Novice_High) resetlvl(1); if ([email protected] == Job_Baby) { resetlvl(4); SkillPoint = 0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; if (.platinum) callsub Get_Platinum; close; } if (getargcount() == 1) return; mes "[^8A2BE2Mestre das Classes^000000]"; } end; } function A_An { setarray [email protected]$, "a", "e", "i", "o", "u"; [email protected]$ = strtolower(charat(getarg(0), 0)); for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]) { if ([email protected]$[[email protected]] == [email protected]$) return "an "+getarg(0); } return "a "+getarg(0); } Get_Platinum: skill NV_FIRSTAID, 1, 0; if (BaseClass == Job_Novice) { if (Class != Job_SuperNovice) skill NV_TRICKDEAD, 1, 0; } else if (BaseClass == Job_Swordman) { skill SM_MOVINGRECOVERY, 1, 0; skill SM_FATALBLOW, 1, 0; skill SM_AUTOBERSERK, 1, 0; } else if (BaseClass == Job_Mage) { skill MG_ENERGYCOAT, 1, 0; } else if (BaseClass == Job_Archer) { skill AC_MAKINGARROW, 1, 0; skill AC_CHARGEARROW, 1, 0; } else if (BaseClass == Job_Acolyte) { skill AL_HOLYLIGHT, 1, 0; } else if (BaseClass == Job_Merchant) { skill MC_CARTREVOLUTION, 1, 0; skill MC_CHANGECART, 1, 0; skill MC_LOUD, 1, 0; } else if (BaseClass == Job_Thief) { skill TF_SPRINKLESAND, 1, 0; skill TF_BACKSLIDING, 1, 0; skill TF_PICKSTONE, 1, 0; skill TF_THROWSTONE, 1, 0; } if (BaseJob == Job_Knight) { skill KN_CHARGEATK, 1, 0; } else if (BaseJob == Job_Priest) { skill PR_REDEMPTIO, 1, 0; } else if (BaseJob == Job_Wizard) { skill WZ_SIGHTBLASTER, 1, 0; } else if (BaseJob == Job_Blacksmith) { skill BS_UNFAIRLYTRICK, 1, 0; skill BS_GREED, 1, 0; } else if (BaseJob == Job_Hunter) { skill HT_PHANTASMIC, 1, 0; } else if (BaseJob == Job_Assassin) { skill AS_SONICACCEL, 1, 0; skill AS_VENOMKNIFE, 1, 0; } else if (BaseJob == Job_Crusader) { skill CR_SHRINK, 1, 0; } else if (BaseJob == Job_Monk) { skill MO_KITRANSLATION, 1, 0; skill MO_BALKYOUNG, 1, 0; } else if (BaseJob == Job_Sage) { skill SA_CREATECON, 1, 0; skill SA_ELEMENTWATER, 1, 0; skill SA_ELEMENTGROUND, 1, 0; skill SA_ELEMENTFIRE, 1, 0; skill SA_ELEMENTWIND, 1, 0; } else if (BaseJob == Job_Rogue) { skill RG_CLOSECONFINE, 1, 0; } else if (BaseJob == Job_Alchemist) { skill AM_BIOETHICS, 1, 0; } else if (BaseJob == Job_Bard) { skill BA_PANGVOICE, 1, 0; } else if (BaseJob == Job_Dancer) { skill DC_WINKCHARM, 1, 0; } return; OnInit: .rebirth_blevel = 99; // Minimum base level to reborn OR change to third class .rebirth_jlevel = 50; // Minimum base job level to reborn OR change to third class .jobchange_first = 10; // Minimum job level to turn into 1st class .jobchange_second = 40; // Minimum job level to turn into 2nd class .third_classes = 0; // Enable third classes/Extended Classes? (1: yes / 0: no) .supernovice_level = 45; // Minimum base level to turn into Super Novice .linear_jobchange = 1; // Enforce linear class changes? (1: yes / 0: no) .skill_point_check = 1; // Force player to use up all skill points? (1: yes / 0: no) .platinum = 1; // Get platinum skills automatically? (1: yes / 0: no) end; }
  16. Hello, I created this buildin which invites char id 2 to char id 1's party (CID1 must be online). It sends char id 2 an invite as if char id 1 clicked their name and invited them. What I want to know - is it possible to force join a character to a party without giving them the option to accept or decline? Thanks. /* *party_invite(<char id 1>, <char id 2>) Invites Char ID 2 to the party owned by Char ID 1. Char ID 1 must be online. Returns true on succession, false on failure. */ BUILDIN(party_invite) { struct map_session_data *sd = script->charid2sd(st, script_getnum(st, 2)); struct map_session_data *t_sd = script->charid2sd(st, script_getnum(st, 3)); if (sd == NULL || t_sd == NULL) return false; if (!script_hasdata(st, 2) && !script_hasdata(st, 2)) { ShowError("Both Char IDs must be supplied."); return true; } if (party->invite(sd, t_sd)) script_pushint(st, 1); else script_pushint(st, 0); return true; }
  17. View File Date and Time functions This script provides functions to easily calculate date and time. More functions will be added in the future. now() a shorthand function to get the current time > returns the number of seconds elapsed since the UNIX epoch now() // => 1497119219 (example, increments every second) time_from_ms(<delta>) calculates a UNIX timestamp relative to the current time > returns the number of seconds elapsed since the UNIX epoch, plus or minus <delta> ms time_from_ms(now()) // => 1497119219 (example, increments every second) time_from_ms(+1000) // => 1497119220 time_from_ms(-1000) // => 1497119218 time_from_seconds(<delta>) calculates a UNIX timestamp relative to the current time > returns the number of seconds elapsed since the UNIX epoch, plus or minus <delta> seconds time_from_seconds(now()) // => 1497119219 (example, increments every second) time_from_seconds(+1) // => 1497119220 time_from_seconds(-1) // => 1497119218 time_from_minutes(<delta>) calculates a UNIX timestamp relative to the current time > returns the number of seconds elapsed since the UNIX epoch, plus or minus <delta> minutes time_from_minutes(now()) // => 1497119219 (example, increments every second) time_from_minutes(+1) // => 1497119279 time_from_minutes(-1) // => 1497119159 time_from_hours(<delta>) calculates a UNIX timestamp relative to the current time > returns the number of seconds elapsed since the UNIX epoch, plus or minus <delta> hours time_from_hours(now()) // => 1497119219 (example, increments every second) time_from_hours(+1) // => 1497122819 time_from_hours(-1) // => 1497115619 time_from_days(<delta>) calculates a UNIX timestamp relative to the current time > returns the number of seconds elapsed since the UNIX epoch, plus or minus <delta> days time_from_days(now()) // => 1497119219 (example, increments every second) time_from_days(+1) // => 1497205619 time_from_days(-1) // => 1497032819 FuzzyTime(<unix timestamp>) converts a UNIX timestamp to a human-readable format > returns human-friendly relative time FuzzyTime(0) // => 47 years, 172 days, 18 hours, 52 minutes, and 28 seconds ago FuzzyTime(time_from_hours(+28)) // => in 1 day and 4 hours -------------------------------------------------------------------------------------- This script was made by me, for The Mana World + Evol. License: public domain (CC0) Submitter meko Submitted 06/10/17 Category Quest, Shops, Functions & Algorithms  
  18. Version v1

    33 downloads

    This script provides functions to easily calculate date and time. More functions might be added in the future. now() a shorthand function to get the current time > returns the number of seconds elapsed since the Unix epoch now() // => 1497119219 (example, increments every second) time_from_ms(<delta>) calculates a Unix timestamp relative to the current time > returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> ms time_from_ms(0) // => 1497119219 (example, increments every second) time_from_ms(+1000) // => 1497119220 time_from_ms(-1000) // => 1497119218 time_from_seconds(<delta>) calculates a Unix timestamp relative to the current time > returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> seconds time_from_seconds(0) // => 1497119219 (example, increments every second) time_from_seconds(+1) // => 1497119220 time_from_seconds(-1) // => 1497119218 time_from_minutes(<delta>) calculates a Unix timestamp relative to the current time > returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> minutes time_from_minutes(0) // => 1497119219 (example, increments every second) time_from_minutes(+1) // => 1497119279 time_from_minutes(-1) // => 1497119159 time_from_hours(<delta>) calculates a Unix timestamp relative to the current time > returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> hours time_from_hours(0) // => 1497119219 (example, increments every second) time_from_hours(+1) // => 1497122819 time_from_hours(-1) // => 1497115619 time_from_days(<delta>) calculates a Unix timestamp relative to the current time > returns the number of seconds elapsed since the Unix epoch, plus or minus <delta> days time_from_days(0) // => 1497119219 (example, increments every second) time_from_days(+1) // => 1497205619 time_from_days(-1) // => 1497032819 FuzzyTime(<unix timestamp>) converts a Unix timestamp to a human-readable format > returns human-friendly relative time FuzzyTime(0) // => 47 years, 172 days, 18 hours, 52 minutes, and 28 seconds ago FuzzyTime(time_from_hours(+28)) // => in 1 day and 4 hours -------------------------------------------------------------------------------------- This script was made by me, for The Mana World + Evol. License: public domain (CC0)
  19. I have a script command which fetches a character's name from the [email protected]_parameters$[] and displays them in a message. How do I get them to display in one line? Currently I can only get them to display if I print it one line at a time (using message()) - script Print Names FAKE_NPC,{ end; OnCommand: // If user inputs no parameters (i.e. character name) if ([email protected]_numparameters) { message(strcharinfo(PC_NAME), "Usage: @printname <name of player to print>"); message(strcharinfo(PC_NAME), "@printname failed."); end; } [email protected] = getarraysize([email protected]_parameters$); for ([email protected] = 0; [email protected] < [email protected]; [email protected]) { [email protected]$[[email protected]] = [email protected]_parameters$[[email protected]]; message(strcharinfo(PC_NAME), "" + [email protected]$[[email protected]] + ""); } end; OnInit: bindatcmd("printname", "Print Names::OnCommand", 10 ,96 , true); end; } If I typed @printname John Smith, it would appear like this: However, I would like it to be on the same line. Thank you for any help.
  20. This source modification adds a new mapflag: bg_consume, and adds an NPC (Telma) that sells consumable items which can only be used on maps with the 'bg_consume' mapflag. download and apply this diff patch: battlegroud.diff create a char named "Battleground" First you should check if that name exists:- delete their char, then create a new one use a different name use the existing char (WARNING: if they rename the char named "Battleground", it will rename the "Battleground's items" too! If they delete the char named "Battleground", they will become "Unknown's item".) When you are ready to create the char named "Battleground", use this SQL query: SQL INSERT INTO `char` (`name`) VALUES ('Battleground'); make note of the char_id (of the char named "Battleground") SQL SELECT char_id FROM `char` WHERE `name`='Battleground'; Write this down somewhere or remember it for the next steps. edit source - open /src/map/battleground.h CODE #define BG_CHARID 165100 // char named "Battleground" #define BG_TRADE 91 // trade mask of BG consumables - set BG_CHARID to the char_id from step #3 - set BG_TRADE to the trade mask (trade restrictions) you want for Battleground's consumables (trade bits are the same as /db/item_trade.txt) CODE // Trading mask values: // 1: Item can't be dropped // 2: Item can't be traded (nor vended) // 4: Wedded partner can override restriction 2. // 8: Item can't be sold to npcs // 16: Item can't be placed in the cart // 32: Item can't be placed in the storage // 64: Item can't be placed in the guild storage If you want BG potions to be ranked (ranked Condensed White Potions, ranked Blue Potions, etc.), open /src/map/pc.c and uncomment this: CODE // else if(BG_CHARID == char_id) // return 5; edit NPC script (Telma) - open /npc/battleground/bg_supplier.txt CODE set [email protected]_CHARID, 165100; // character named "Battleground" - (line 43) set [email protected]_CHARID to the char_id from step #3 - (lines 25-39) edit the menu/prices to your liking - (line 88) add the 'bg_consume' mapflag to any other maps you want to allow "Battleground's consumables" to be used on Save and close all files. Recompile. Compatible Hercules/rAthena/eAthena credits: The original idea is from someone else, I'm just not sure who. It started in 2009 when a player showed us screenshots (from another server) of the Telma NPC and asked if we could implement something similar--Battleground's consumables that could only be used in BG. Based on the screenshots, I came up with this. Since then, several people have asked about it on eAthena but I was too lazy to update it so I just linked them to our old SVN/Trac. Finally I updated it, and here it is! Thanks again to whoever came up with the idea!
  21. Hello everyone, I am new forum and I need a help in the script so I would like it to run just the command when someone clicks npc only when someone clicks OnInstanceInit: areamonster "[email protected]",7,351,17,387,"Metaling",1613,15,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",7,351,17,387,"Marin",1242,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",7,351,17,387,"Poporing",1031,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",7,351,17,387,"Drops",1113,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",7,351,17,387,"Mastering",1090,1,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",7,351,17,387,"Poring",1002,5,instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"; end; OnMyMobDead: set [email protected]_dead_num,mobcount("[email protected]",instance_npcname("#1F Controller", instance_id())+"::OnMyMobDead"); if ([email protected]_dead_num < 1) { instance_announce -1, "Todos os monstros no 1° andar foram derrotados.",bc_map,"0xffff00"; donpcevent instance_npcname("1FGate102tower", instance_id())+"::OnEnable"; //SetItemPartyInMap in_102floor 1 } else instance_announce -1, "Monstros vivos no 1° andar: " + [email protected]_dead_num,bc_map,"0x00ff99"; end;
  22. Hi guys! Just wondering how can i remove the timer and make it usable all the time? Thanks in advance! // ============================= /* Free for All: http://herc.ws/board/topic/13863-rlast-man-standing-pvp-with-prize/ ---------------------------- by: Legend compatible w/: Hercules ---------------------------- special thanks to: * Annieruru ---------------------------- Description: * Free for all event like last man standing * Can be activated through command "@ffa" * Also can be activated every hour * You can set your own number of winners * Configurable settings (npc name, maps, minimum level to participate, maximum recognized winners, rewards, restricted jobs.) * Significant mapflags were set */ // ============================= prontera,156,157,4 script Request#2 4_CAT_DOWN,{ doevent "Request#2::OnMenu"; end; OnActivate: // activated by the GM if (agitcheck()) || (agitcheck2()){ mes .npc$; mes "WoE is in progress."; close; } if (.checkffa > 0) { mes .npc$; mes "Event is in progress."; close; } OnMinute00: // activated every hour if (agitcheck()) || (agitcheck2()) end; if (.checkffa > 0) end; .checkffa = 1; announce .npc$+": Registration for the event is now open for 3 minutes!",bc_all; initnpctimer; end; OnTimer150000: announce .npc$+": 30 seconds left before the registration will be closed.",bc_all; end; OnTimer180000: .checkffa = 2; if ( .psize <= .maxwin) { announce .npc$+": The Event has been cancelled! Not enough participants.",bc_all; callsub Reset_evt_stats; end; } announce .npc$+": Registration is now closed!",bc_all; end; OnTimer185000: mapannounce .pvpmap$,.npc$+": The Event will occur in a few moments!",bc_blue; end; OnTimer187000: mapannounce .pvpmap$,.npc$+": Get ready in 3!",bc_blue; end; OnTimer188000: mapannounce .pvpmap$,.npc$+": 2!",bc_blue; end; OnTimer189000: mapannounce .pvpmap$,.npc$+": 1!",bc_blue; end; OnTimer190000: stopnpctimer; mapannounce .pvpmap$,.npc$+": Good luck everyone!",bc_blue; setmapflag .pvpmap$, mf_pvp_noguild; removemapflag .pvpmap$, mf_noskill; pvpon .pvpmap$; end; OnMenu: mes .npc$; mes "Good day "+strcharinfo(0)+"!"; mes "How may I help you?"; next; switch(select("Information:Join")){ case 1: mes .npc$; mes "Minimum Base Level: ^FF0000"+.minblvl+"^000000"; mes "Restricted Jobs:"; for( [email protected] = 0; [email protected] < .rjsize; [email protected]++ ) { mes ( [email protected] +1 ) +". ^FF0000"+jobname (.resjob[[email protected]])+"^000000"; } close; case 2: if (!.checkffa) { mes .npc$; mes "Event isn't activated, come back later."; close; } if (.checkffa == 2) { mes .npc$; mes "Event is in progress, come back later."; close; } if (BaseLevel < .minblvl) { mes .npc$; mes "You need to"; mes "have ^FF0000"+.minblvl+"^000000 Base level or more than"; mes "before you can participate."; close; } for( [email protected] = 0; [email protected] < .rjsize; [email protected]++ ) { if (Class == .resjob[[email protected]] ){ mes .npc$; mes "Your job is restricted to join this event."; close; } } sc_end SC_ALL; percentheal 100,100; warp .pvpmap$,0,0; .regaid[.psize] = getcharid(3); .psize++; end; } OnPCDieEvent: OnPCLogoutEvent: if (strcharinfo(3) != .pvpmap$) end; while (.regaid != getcharid(3) && [email protected] < .psize) [email protected]++; deletearray .regaid[[email protected]],1; .psize--; if (.psize > .maxwin) end; if (.checkffa > 0) { announce .npc$+": The Event is now over! We already have our winners!",bc_all; for ([email protected] = 0; [email protected] < .psize; [email protected]){ getitem .ritem,.rcount,.regaid[[email protected]]; } } callsub Reset_evt_stats; end; Reset_evt_stats: removemapflag .pvpmap$, mf_pvp_noguild; setmapflag .pvpmap$, mf_noskill; pvpoff .pvpmap$; .checkffa = 0; deletearray .regaid; .psize = 0; mapwarp .pvpmap$,.extmap$,.extx,.exty,0; end; OnInit: bindatcmd "ffa",strnpcinfo(3)+"::OnActivate",99,99; // CONFIGURATION .npc$ = "[ Free for All ]"; // NPC name .pvpmap$ = "pvp_n_1-5"; // Set your FFA Map .minblvl = 99; // Set minimum base level who can enter .maxwin = 2; // Set the maximum winners .ritem = 7227; // Set the item id of the reward .rcount = 5; // Set reward amount .extmap$ = "prontera"; // Set exit map .extx = 150; // Exit map "x" coordinate .exty = 150; // Exit map "y" coordinate setarray .resjob[0], 0,4001; // This list serves as the restricted jobs .rjsize = getarraysize (.resjob); // DO NOT TOUCH THIS // MAPFLAGS setmapflag .pvpmap$, mf_noskill; pvpoff .pvpmap$; //--- setmapflag .pvpmap$, mf_nowarpto; setmapflag .pvpmap$, mf_nocommand; setmapflag .pvpmap$, mf_nowarp; setmapflag .pvpmap$, mf_nosave; setmapflag .pvpmap$, mf_noteleport; setmapflag .pvpmap$, mf_nomemo; setmapflag .pvpmap$, mf_novending; setmapflag .pvpmap$, mf_nobranch; end; }
  23. Hi guys. just wondering how can i enable this npc all the time? so i won't have to manually enable it and players can use it anytime. thanks in advance! // -----------------------------// // ------- Free For All --------// // -------- By : Butch ---------// // A simple Free for all script // // -----------------------------// guild_vs5,48,51,6 script FFA Master 999,{ if(getmapusers("guild_vs5") != 1) { mes "[^FF0000FFA Master^000000]"; mes "Current players - ^FF0000"+ getmapusers("guild_vs5") +"^000000."; close; } else if(getmapusers("guild_vs5") == 1) { dispbottom "You are a winner of Event Free for all. Congratz!"; donpcevent "Free For All::OnStopEvent"; announce "Free for all winner : "+ strcharinfo(0) +"", bc_all, "0xFFCE00"; getitem 25002,1; // Reward warp "prontera", 156,149; end; } } // ------ FFA Warper -------// prontera,147,149,6 script Free For All 999,{ if (.start != 1) { mes "[^FF0000Agent Mil^000000]"; mes "Free for all is not available at the moment"; close; } mes "[^FF0000Agent Mil^000000]"; mes "What do you want?"; switch(select("Free for all")) { case 1: if( getcharid(1) ) { mes "Please leave your party."; close; } if( getcharid(2) ) { mes "Please leave your guild."; close; } else switch(rand(3)) { case 0: [email protected] = 18; [email protected] = 50; break; case 1: [email protected] = 50; [email protected] = 77; break; case 2: [email protected] = 81; [email protected] = 49; break; case 3: [email protected] = 49; [email protected] = 22; break; } warp "guild_vs5", [email protected],[email protected]; break; } close; OnStartEvent: OnClock1245: OnClock1645: OnClock2045: OnClock0045: OnClock0445: OnClock0845: .start = 1; disablenpc "FFA Master"; announce "Free for all will start in 5 minutes.", bc_all, "0x00b89d"; sleep 120000; announce "Free for all will start in 3 minutes.", bc_all, "0x00b89d"; sleep 120000; announce "Free for all will start in 1 minute.", bc_all, "0x00b89d"; sleep 60000; announce "Free for all has started!", bc_all, "0x00b89d"; .start = 2; enablenpc "FFA Master"; sleep 2000; if ( !getmapusers("guild_vs5") ) goto OnStopEvent; mapannounce "guild_vs5", "FFA starts in 5", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 4", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 3", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 2", bc_map; sleep 1000; mapannounce "guild_vs5", "FFA starts in 1", bc_map; sleep 1000; mapannounce "guild_vs5", "GO! Kill all!", bc_map; setmapflag "guild_vs5", mf_gvg; removemapflag "guild_vs5", mf_noskill; end; OnStopEvent: .start = 0; disablenpc "FFA Master"; removemapflag "guild_vs5", mf_gvg; setmapflag "guild_vs5", mf_noskill; end; OnInit: bindatcmd("startevent",strnpcinfo(1)+"::OnStartEvent",60,99); waitingroom "[Free For All]",0; end; } guild_vs5 mapflag partylock guild_vs5 mapflag guildlock guild_vs5 mapflag notrade guild_vs5 mapflag nodrop
  24. Hello! Can i ask a little help with this Party vs. Party Script please? i wanted to add an announce on it. After the match, i wanted the npc to announce that the match has ended, congratulate the winner then the npc is open for match registration again. Thanks in advance and godbless! - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,0; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion", "Yellow Potion", "White Potion", "Blue Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } if ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce [email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } }
  25. Heeey guys I have this party versus party script and i wanted to add an announcement after the match has ended like "The match has ended, party leaders can now register again" something like that? Thank you in advance :> - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,0; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion", "Yellow Potion", "White Potion", "Blue Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; if ( callfunc("party_has_duplicate_job") ) { mes "It seems that someone in the party has the same class than another member. Please check again the requirements..."; close; } if ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce [email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]ng_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } }