From 953aabf5a650d4eef506c1e620d81405f56863b6 Mon Sep 17 00:00:00 2001 From: Streusel Date: Mon, 20 May 2013 16:40:42 -0700 Subject: -Updated Izlude -Added new Novice Ground NPCs --- npc/jobs/novice/novice.txt | 76 ++ npc/re/cities/izlude.txt | 68 +- npc/re/jobs/novice/novice.txt | 2053 +---------------------------------------- npc/scripts_jobs.conf | 1 + 4 files changed, 149 insertions(+), 2049 deletions(-) create mode 100644 npc/jobs/novice/novice.txt diff --git a/npc/jobs/novice/novice.txt b/npc/jobs/novice/novice.txt new file mode 100644 index 000000000..4613ebe5d --- /dev/null +++ b/npc/jobs/novice/novice.txt @@ -0,0 +1,76 @@ +//===== Hercules Script ======================================= +//= New Novice Training Grounds +//===== By: ================================================== +//= Streusel +//===== Current Version: ===================================== +//= 1.0 +//===== Compatible With: ===================================== +//= Hercules +//===== Description: ========================================= +//= New Novice Training Grounds +//= [Hand Scripted (No Programs or AEGIS Scripts)] +//===== Additional Comments: ================================= +//= 1.0 First version. [Streusel] +//= Credits to whoever made Sprakki. +//============================================================ + +// Sprakki (Stard of Novice Training Ground, Outside Castle) +//============================================================ +- script ::Captain_Carew -1,{ + if(job_novice_q < 1) { + mes "[Captain Carew]"; + mes "Hello there! Welcome to the World of Ragnarok Online. My name is Captain Carew and I'm in charge of giving you basic gameplay tips."; + mes "Click on the [Next] button or press [Enter] to continue."; + next; + mes "[Captain Carew]"; + mes "First you need to learn the very basics of controlling your character."; + mes "All the basic ^4A4AFFmoves, selection of items, and attacks^000000 use the ^4A4AFFleft click of the mouse^000000."; + next; + cutin "tutorial01",3; + mes "-! Info !-"; + mes "Click on the ground to move the character."; + mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them."; + next; + cutin "",255; + mes "[Captain Carew]"; + mes "First off, try moving around."; + mes "Do you see that wooden bridge to the right?"; + next; + setquest 7117; + set job_novice_q,1; + mes "[Captain Carew]"; + mes "Walk over that bridge and there's a castle used as the Training Center."; + mes "I will be waiting for you inside of that Castle. Please come to the castle by yourself."; + next; + cutin "tutorial02",3; + mes "-! Info !-"; + mes "You've received a quest from Sprakki."; + mes "You can check the contents of the quest in the Quest Info Window."; + next; + mes "[Captain Carew]"; + mes "I will wait inside the Training Center across the bridge."; + next; + mes "-! Info !-"; + mes "You can open the Quest Info Window by pressing the ^4A4AFFALT + U^000000 keys at the same time."; + next; + cutin "",255; + mes "[Captain Carew]"; + mes "Have you checked the Quest Info Window?"; + mes "I'll be waiting in the castle across the bridge."; + close; + } + mes "[Carew]"; + mes "I'm not sure what's happening, I'm very shy."; + mes "Meet me in Izlude again."; + mes ""; + next; + mes "[Carew]"; + mes "I'm now heading to the local harbor of Izlude."; + mes "Now, sleep unti we arrive."; + close; +} + +//Official view id 639 +iz_int01,91,81,4 script ::Rumin 99,{ +close; +} \ No newline at end of file diff --git a/npc/re/cities/izlude.txt b/npc/re/cities/izlude.txt index e5b3d1df0..b328edbf8 100644 --- a/npc/re/cities/izlude.txt +++ b/npc/re/cities/izlude.txt @@ -11,20 +11,23 @@ //===== Additional Comments: ================================= //= 1.0 First Version. Still missing many new NPCs and their dialogues. [Masao] //= 1.1 Added bullet NPC duplicates. [Euphy] +//= 1.2 Added new NPCs, Captain Carew & coordinates [Streusel] +//= 1.3 Added some NPC locations [Streusel] //============================================================ izlude,197,205,1 duplicate(Sailor_izlude) Sailor#izlude 100 izlude,71,92,2 duplicate(Bonne_izlude) Bonne#izlude 90 izlude,172,215,4 duplicate(Charfri_izlude) Charfri#izlude 91 -izlude,127,175,4 duplicate(Cuskoal_izlude) Cuskoal#izlude 124 +izlude,174,164,3 duplicate(Cuskoal_izlude) Cuskoal#izlude 124 izlude,85,103,4 duplicate(Dega_izlude) Dega#izlude 84 -izlude,141,185,4 duplicate(Kylick_izlude) Kylick#izlude 97 +izlude,140,186,4 duplicate(Kylick_izlude) Kylick#izlude 97 izlude,56,156,2 duplicate(Red_izlude) Red#izlude 85 izlude,58,156,2 duplicate(Cebalis_izlude) Cebalis#izlude 98 izlude,165,156,2 duplicate(Soldier_izlude) Soldier#izlude 105 izlude,158,130,3 duplicate(bdt) Bullet Dealer Tony#iz 86 izlude,155,132,3 duplicate(mdk) Magazine Dealer Kenny 83 - +izlude,198,213,4 duplicate(Captain_Carew) Captain Carew#izlude 873 +izlude_in,57,92,3 duplicate(Dorian) Dorian#izlude 878 izlude,147,131,6 script Blacksmith#izlude 726,{ end; } @@ -34,3 +37,62 @@ prt_fild08,350,219,4 script Guard#izlude 105,{ mes "Welcome to Izlude."; close; } + +izlude,136,160,0 script Traces of Fish#izlude 111,{ + mes "There are signs of someone digging."; + close; +} + +izlude,207,167,3 script Arena#izlude 858,{ + mes ""; + close; +} + +izlude,45,94,3 script Milestone#izlude 858,{ + mes "==== Information ===="; + mes ""; + mes "Access to Prontera Field."; + mes "Prontera in the North."; + mes "If you wish got to Prontera."; + close; +} + +izlude,179,75,3 script Non-Process#izlude 858,{ + mes "====End of Path===="; + mes ""; + mes "Airshop to Rachel"; + mes ""; + mes "Feel free to explore, however be reminded that you are a guest."; + mes ""; + close; +} + +izlude,141,251,1 script Full-Grown Red Plant#iz 1078,{ + end; +} + +izlude,102,150,1 script Sinchon Helper#izlude 71,{ + end; +} + +izlude,205,155,2 script Nain#izlude 102,{ + mes "[Nine]"; + mes "Swords, no matter how strong"; + mes "they are once they strike you're"; + mes "a dead man. And though that's creepy,"; + mes "I just can't throw them away."; + close; +} + +izlude,143,205,7 script Magpies Adventurer#iz-01 703,{ + end; +} + + +izlude,146,205,7 script Magpies Adventurer#iz-02 706,{ + end; +} + +izlude,120,254,0 script Siege Monument#izlude 111,{ + end; +} \ No newline at end of file diff --git a/npc/re/jobs/novice/novice.txt b/npc/re/jobs/novice/novice.txt index ebefaff48..8d29ce2cc 100644 --- a/npc/re/jobs/novice/novice.txt +++ b/npc/re/jobs/novice/novice.txt @@ -1,2056 +1,17 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= New Novice Training Grounds //===== By: ================================================== -//= Kisuka +//= Streusel //===== Current Version: ===================================== -//= 1.4a +//= 1.0 //===== Compatible With: ===================================== -//= rAthena SVN +//= Hercules //===== Description: ========================================= //= New Novice Training Grounds //= [Hand Scripted (No Programs or AEGIS Scripts)] //===== Additional Comments: ================================= -//= 1.0 First version. [Kisuka] -//= 1.1 Updated warps, savepoints, NPC locations. [Kisuka] -//= 1.2 Cleaning. [Euphy] -//= 1.3 Fixed Eden Group Officer's level requirement. [Joseph] -//= 1.4 Fixed checkquest to check quest accordingly. [Joseph] -//= 1.4a Added 'npcskill' command. [Euphy] +//= 1.0 First version. [Streusel] //============================================================ -// Sprakki (Stard of Novice Training Ground, Outside Castle) -//============================================================ -new_1-1,53,114,4 script Sprakki#nv1 90,{ - if(job_novice_q < 1) { - mes "[Sprakki]"; - mes "Hello there! Welcome to the World of Ragnarok Online. My name is Sprakki and I'm in charge of giving you basic gameplay tips."; - mes "Click on the [Next] button or press [Enter] to continue."; - next; - mes "[Sprakki]"; - mes "First you need to learn the very basics of controlling your character."; - mes "All the basic ^4A4AFFmoves, selection of items, and attacks^000000 use the ^4A4AFFleft click of the mouse^000000."; - next; - cutin "tutorial01",3; - mes "-! Info !-"; - mes "Click on the ground to move the character."; - mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them."; - next; - cutin "",255; - mes "[Sprakki]"; - mes "First off, try moving around."; - mes "Do you see that wooden bridge to the right?"; - next; - setquest 7117; - set job_novice_q,1; - mes "[Sprakki]"; - mes "Walk over that bridge and there's a castle used as the Training Center."; - mes "I will be waiting for you inside of that Castle. Please come to the castle by yourself."; - next; - cutin "tutorial02",3; - mes "-! Info !-"; - mes "You've received a quest from Sprakki."; - mes "You can check the contents of the quest in the Quest Info Window."; - next; - mes "[Sprakki]"; - mes "I will wait inside the Training Center across the bridge."; - next; - mes "-! Info !-"; - mes "You can open the Quest Info Window by pressing the ^4A4AFFALT + U^000000 keys at the same time."; - next; - cutin "",255; - mes "[Sprakki]"; - mes "Have you checked the Quest Info Window?"; - mes "I'll be waiting in the castle across the bridge."; - close; - } - mes "[Sprakki]"; - mes "I will be waiting for you across the Bridge to the east."; - close; -} - -// Sprakki (Inside Castle) -//============================================================ -new_1-2,100,29,4 script Sprakki#nv2 90,{ - if(job_novice_q < 1) { - mes "[Sprakki]"; - mes "Hello there! Welcome to the World of Ragnarok Online. My name is Sprakki and I'm in charge of giving you basic gameplay tips."; - mes "Click on the [Next] button or press [Enter] to continue."; - next; - mes "[Sprakki]"; - mes "First you need to learn the very basics of controlling your character."; - mes "All the basic ^4A4AFFmoves, selection of items, and attacks^000000 use the ^4A4AFFleft click of the mouse^000000."; - next; - cutin "tutorial01",3; - mes "-! Info !-"; - mes "Click on the ground to move the character."; - mes "Attacking monsters and conversations with the people of this world can be done by simply clicking on them."; - next; - cutin "",255; - setquest 7117; - set job_novice_q,1; - mes "[Sprakki]"; - mes "Well then, I will give you a quest to talk to me."; - mes "After the conversation is over, talk to me again by left-clicking on me."; - next; - cutin "tutorial02",3; - mes "-! Info !-"; - mes "You've received a quest from Sprakki."; - mes "You can check the contents of the quest in the Quest Info Window by pressing the ^4A4AFFAlt + U^000000 keys at the same time."; - next; - cutin "",255; - mes "[Sprakki]"; - mes "Have you checked the Quest Info Window?"; - mes "Well, talk to me again."; - close; - } - if(job_novice_q == 1) { - getexp 300,0; - getexp 300,5; - completequest 7117; - set job_novice_q,2; - mes "[Sprakki]"; - mes "Great!"; - mes "Now you know how to move and talk to others, right?"; - next; - } - mes "[Sprakki]"; - mes "The training Center is prepared for novices just like you."; - mes "You are going to be trained to get used to the basics of the Game."; - next; - select("Begin Training."); - mes "[Sprakki]"; - mes "I will guide you to the Novice Training Center."; - mes "Inside, Instructor 'Brade' will be waiting to speak to you."; - next; - setquest 7118; - set job_novice_q,3; - mes "[Sprakki]"; - mes "Instructor 'Brade' will help you afterwards."; - mes "Please, Go see him."; - next; - mes "^4A4AFF- You received a quest 'Novice Training Ground-1' from Sprakki.^000000"; - mes "^4A4AFFPlease check the Quest Info Window.-^000000"; - close2; - savepoint "new_1-2",100,100; - warp "new_1-2",100,100; - end; -} - -// Instructor Brade -//============================================================ -new_1-2,100,105,4 script Brade#nv 733,{ - if(job_novice_q < 3) { - mes "[Instructor Brade]"; - mes "How did you get here?"; - close2; - warp "new_1-1",53,111; - end; - } - else if(job_novice_q == 3) { - getexp 300,0; - getexp 300,0; - getexp 300,10; - completequest 7118; - set job_novice_q,4; - mes "[Instructor Brade]"; - mes "Great."; - mes "You've completed the given quest successfully, so I will reward you with experience points."; - next; - mes "[Instructor Brade]"; - mes "Experience Points you've earned from hunting or finishing quests can be checked by tracking the EXP Bar, located at the upper-left side of the display."; - next; - mes "[Instructor Brade]"; - mes "Sigh... I will just talk roughly."; - mes "...I just can't get used to"; - mes "'politeness' you know."; - mes "Don't look at me like that!"; - next; - mes "[Instructor Brade]"; - mes "Ok look alive you maggot."; - mes "Next up is items and equipment."; - next; - mes "[Instructor Brade]"; - mes "First, take these."; - mes "These are very basic equipments and recovery potions."; - getitem 2352,1; // Novice_Plate - getitem 2510,1; // Novice_Hood - getitem 2414,1; // Novice_Boots - getitem 5055,1; // Novice_Egg_Cap - getitem 1243,1; // Novice_Knife - getitem 2112,1; // Novice_Guard - getitem 569,300; // Novice_Potion - setquest 7119; - set job_novice_q,5; - next; - mes "[Instructor Brade]"; - mes "In the upper left Basic Info Window, press the 'Item' icon to open the Item Window."; - mes "The item window has 3 sections..."; - next; - mes "[Instructor Brade]"; - mes "Consumable items, equipment, and other items."; - mes "If you want to use or equip items, double-click on the item or drag them into the Equipment Window."; - next; - mes "[Instructor Brade]"; - mes "You can see detailed info of each item by right-clicking on the item."; - mes "Do that and the info will pop-up in a separate window."; - next; - cutin "tutorial04",3; - mes "!- Info -!"; - mes "Double-click on the item to see the detailed information."; - next; - mes "!- Info -!"; - mes "Right-click on other players to show the Community Menu and you can join a party, request trades, etc."; - next; - cutin "",255; - mes "[Instructor Brade]"; - mes "Why don't you equip the items I gave you earlier?"; - mes "^4A4AFFDouble-Click^000000 on the item you want to equip. Let us continue after you are done gearing up."; - next; - cutin "tutorial03",3; - mes "!- Info -!"; - mes "Items can be easily equipped or used by simply clicking on them."; - mes "The Hot Key to open the Item Window is Alt + E."; - next; - mes "!- Info -!"; - mes "To check on the items that are currently equipped, use the hot key Alt + Q."; - mes "Or, drag the item on to the item slot you want the item to be equipped."; - next; - mes "!- Info -!"; - mes "Equip all of the equipment given by Instructor Brade."; - close2; - cutin "",255; - end; - } - else if(job_novice_q == 4) { - mes "[Instructor Brade]"; - mes "Uh... Where were we? Oh right, let's continue."; - mes "It's about items and equipments."; - next; - mes "[Instructor Brade]"; - mes "Take these."; - mes "Basic equipments and recovery potions."; - getitem 2352,1; // Novice_Plate - getitem 2510,1; // Novice_Hood - getitem 2414,1; // Novice_Boots - getitem 5055,1; // Novice_Egg_Cap - getitem 1243,1; // Novice_Knife - getitem 2112,1; // Novice_Guard - getitem 569,300; // Novice_Potion - setquest 7119; - set job_novice_q,5; - next; - mes "[Instructor Brade]"; - mes "In the upper left Basic Info Window, press the 'Item' icon to open the Item Window."; - mes "The item window is divided into..."; - next; - mes "[Instructor Brade]"; - mes "3 sections: consumable items, equipment and other items."; - mes "If you want to use or equip items, double-click on the item or drag them into the Equipment Window."; - next; - mes "[Instructor Brade]"; - mes "You can see detailed info of each item by right-clicking on the item."; - mes "Do that and the info will pop-up in a separate window."; - next; - cutin "tutorial04",3; - mes "!- Info -!"; - mes "Double-click on the item to see the detailed information."; - next; - mes "!- Info -!"; - mes "Right-click on other players to show the Community Menu and you can join a party, request trades, etc."; - next; - cutin "",255; - mes "[Instructor Brade]"; - mes "Why don't you equip the items I gave you earlier?"; - mes "^4A4AFFDouble-Click^000000 on the item you want to equip. Let us continue after you are done gearing up."; - next; - cutin "tutorial03",3; - mes "!- Info -!"; - mes "Items can be easily equipped or used by simply clicking on them."; - mes "The Hot Key to open the Item Window is Alt + E."; - next; - mes "!- Info -!"; - mes "To check on the items that are currently equipped, use the hot key Alt + Q."; - mes "Or, drag the item on to the item slot you want the item to be equipped."; - next; - mes "!- Info -!"; - mes "Equip all of the equipment given by Instructor Brade."; - close2; - cutin "",255; - end; - } - else if(job_novice_q == 5 || job_novice_q == 6) { - for(set .@i,1; .@i<7; set .@i,.@i+1) - if (getequipisequiped(.@i)) set .@EquipCheck, .@EquipCheck+1; - if(.@EquipCheck >= 4) { - if(job_novice_q == 5) { - mes "[Instructor Brade]"; - mes "You are all set."; - mes "You are coming along just fine."; - getexp 300,0; - getexp 300,0; - getexp 300,0; - getexp 300,15; - getitem 12323,50; // N_Fly_Wing - getitem 12324,20; // N_Butterfly_Wing - completequest 7119; - set job_novice_q,6; - next; - mes "[Instructor Brade]"; - mes "Here's some Fly Wings and Butterfly Wings as a reward."; - mes "You don't need these in the Training Ground, but they will come in handy later."; - next; - } - mes "[Instructor Brade]"; - mes "Next, are Hot Keys."; - mes "Press the ^4A4AFF12 key^000000 on your keyboard."; - mes "A box with 9 slots will pop up."; - next; - mes "[Instructor Brade]"; - mes "Drag on the right corner of the Hot Key Window and you will be able to see the other pages of the Hot Key."; - next; - mes "[Instructor Brade]"; - mes "The F1 to F9 keys are the designated hotkeys."; - mes "Just drag a skill or an item onto the Hot Key Window and press a corresponding key to use them right away."; - next; - cutin "tutorial05",3; - mes "!- Info -!"; - mes "You can register a skill or an item to the Hot Key Window by just dragging them onto the Hot Key Slot."; - next; - mes "!- Info -!"; - mes "Registered Skills or Items can be used/equipped by just pressing the corresponding key."; - next; - mes "!- Info -!"; - mes "You can customize the Hot Key to use any keys you please as the Hot Key by changing the Shortcut configuration in the options menu."; - next; - mes "!- Info -!"; - mes "Register skills and items that you use often so that you can use them easily"; - next; - cutin "",255; - mes "[Instructor Brade]"; - mes "The last part is how to use Skills."; - mes "But before that, you need to learn something first."; - next; - setquest 7120; - set job_novice_q,7; - mes "[Instructor Brade]"; - mes "Somewhere in this room, there's someone named ^4A4AFFJinha^000000."; - mes "Find Jinha and learn the ^4A4AFF[First Aid]^000000 skill from him."; - next; - mes "[Instructor Brade]"; - mes "Your lesson is after that."; - mes "Go find Jinha and learn the [First Aid] Skill. Then come back to me."; - close; - } - mes "[Instructor Brade]"; - mes "Try to put on at least 4 of the equipment I gave you."; - mes "Put those shoes on, wear those clothes, and arm yourself with that weapon you maggot."; - close; - } - else if(job_novice_q == 7) { - mes "[Instructor Brade]"; - mes "Somewhere in this room, there's someone named ^4A4AFFJinha^000000."; - mes "Find Jinha and learn the ^4A4AFF[First Aid]^000000 skill from him."; - close; - } - else if(job_novice_q == 8) { - mes "[Instructor Brade]"; - mes "Now you've learned the [First Aid] Skill."; - mes "Just as I told you before, by registering the First Aid Skill onto the Hot Key Window, you can use the skill fast and easy."; - next; - mes "[Instructor Brade]"; - mes "And that's it, that's all I can teach you."; - mes "You see that exit to the west?"; - mes "Move on to the next room and there will be another instructor waiting for you."; - next; - mes "[Instructor Brade]"; - mes "We will be seeing each other soon enough."; - mes "But for now, go to the room to the west and get more information."; - next; - mes "[Instructor Brade]"; - mes "You've come along fine this far."; - mes "This is not much, but that this as a reward."; - getitem 2393,1; // N_Adventurer's_Suit - completequest 7120; - set job_novice_q,9; - close; - } - else if(job_novice_q > 8) { - mes "[Instructor Brade]"; - mes "Next step of the Training is done in the room west of here."; - mes "If you are lost, I can send you there."; - next; - if(select("I can get there by myself.:Please, send me to the next room.") == 2) { - mes "[Instructor Brade]"; - mes "Oh well."; - mes "I think it's better than seeing you lost and wandering about."; - mes "Hahahaha..."; - close2; - warp "new_1-2",41,172; - end; - } - mes "[Instructor Brade]"; - mes "Good. That's the attitude you must have."; - mes "You can't just lean on others to help you."; - mes "Now, go ahead."; - close; - } - mes "[Instructor Brade]"; - mes "Why are you still here?"; - close2; - warp "prontera",156,90; - end; -} - -// Instructor Jinha -//============================================================ -new_1-2,115,120,4 script Jinha#nv 59,{ - if(job_novice_q < 7) { - mes "[Jinha]"; - mes "What can I help you with?"; - mes "Hmm? You haven't followed the curriculum correctly."; - next; - mes "[Jinha]"; - mes "You have to see Instructor Brade first before me. I will send you to Instructor Brade."; - close2; - warp "new_1-2",100,100; - end; - } - else if(job_novice_q == 7) { - mes "[Jinha]"; - mes "Hello!"; - mes "How can I help you?"; - next; - select("I want to learn the use the [First Aid] Skill."); - mes "[Jinha]"; - mes "That's right."; - mes "First Aid is the skill used to convert SP into HP when you are in danger."; - next; - specialeffect2 58; - specialeffect2 234; - mes "[Jinha]"; - mes "It's recovery amount is small."; - mes "Still, it will help you not to faint from a critical hit."; - next; - skill "NV_FIRSTAID",1,0; // NV_FIRSTAID - set job_novice_q,8; - mes "[Jinha]"; - mes "You can open the Skill Window by pressing the ^4A4AFFskill^000000 button in the Basic Window."; - mes "Hot Key is ^4A4AFFALT + S^000000."; - mes "Why don't you try the skill?"; - next; - mes "[Jinha]"; - mes "Good, now you know how to use the First Aid Skill, you have to move on to the next step."; - mes "Go back to Instructor Brade and show him what you've learned here."; - close; - } - else if(job_novice_q == 8) { - mes "[Jinha]"; - mes "Didn't you learn the First Aid Skill already?"; - mes "Have it checked by Instructor Brade."; - mes "If you don't know how to get to him, I will send you to him."; - next; - if(select("I'm good by myself.:Please, send me to him.") == 2) { - mes "[Jinha]"; - mes "I will send you to Instructor Brade."; - close2; - warp "new_1-2",100,100; - end; - } - mes "[Jinha]"; - mes "Very Good!"; - mes "That's the right attitude!"; - mes "You will be a great adventurer in the future."; - close; - } - else if(job_novice_q > 8) { - mes "[Jinha]"; - mes "What can I do for you?"; - mes "Next course will be continued in the West Room."; - mes "Go on to the west room."; - close; - } - mes "[Jinha]"; - mes "Why are you still here?"; - close2; - warp "prontera",156,90; - end; -} - -// People/Services in Ragnarok -//============================================================ -// ---------- Chocolat ---------- -new_1-2,32,172,4 script Chocolat#nv 96,{ - if(job_novice_q < 9) { - mes "[Chocolat]"; - mes "Hmm? Strange."; - mes "Let me see that Trainee ID for a sec."; - next; - mes "[Chocolat]"; - mes "You were still on the basic course."; - mes "You should go back to Instructor Brade or Jinha."; - next; - mes "[Chocolat]"; - mes "If you don't know how to find them, I can send you to Instructor Brade, How about it?"; - next; - if(select("I will go myself.:Will you do that for me?") == 2) { - mes "[Chocolat]"; - mes "Sure."; - mes "I will see you later."; - close2; - warp "new_1-2",100,100; - end; - } - mes "[Chocolat]"; - mes "Sure. Go out to the door to the right."; - close; - } - else if(job_novice_q == 9) { - mes "[Chocolat]"; - mes "I will tell you about the people you will be seeing in Town."; - mes "There are many kinds of people in town and some of them will be helpful to know."; - next; - mes "[Chocolat]"; - mes "There are a lot of people in town, but among them, these people are the most important to know."; - next; - mes "[Chocolat]"; - mes "They are [Kafra] Agents standing right behind me and their rival company the [Cool Event]."; - mes "When you visit a town for the first time, you should talk to Information [Soldier]."; - next; - mes "[Chocolat]"; - mes "Well then, let's hear from each of them."; - mes "Start by talking to the [Kafra] agent."; - setquest 7121; - set job_novice_q,10; - close; - } - else if(job_novice_q == 10) { - mes "[Chocolat]"; - mes "Here, talk to these guys standing behind me."; - mes "Start with the [Kafra] gal behind me."; - close; - } - else if(job_novice_q == 11) { - mes "[Chocolat]"; - mes "You've learned a lot about Kafra service huh?"; - mes "From now on, you can use the Kafra Server."; - next; - mes "[Chocolat]"; - mes "Next is Kafra's rival, [Cool Event] Staff!"; - mes "[Cool Event] Staff specialize in events."; - mes "Well, why don't you talk to him yourself?"; - close; - } - else if(job_novice_q == 12) { - mes "[Chocolat]"; - mes "After [Kafra] and [Cool Event], are the Information [Soldier]s."; - mes "They can seem insignificant but they can help you greatly when the time comes."; - next; - mes "[Chocolat]"; - mes "I've brought the Information Soldier from the City of Prontera."; - mes "Ask him what he actually does in town."; - close; - } - else if(job_novice_q == 13) { - mes "[Chocolat]"; - mes "How was the guide of the Information [Soldier]?"; - mes "Last is about using [Inn]s."; - mes "There's an Inn located in each town."; - next; - mes "[Chocolat]"; - mes "You can rest at Inns or Hotels for a small fee."; - mes "Your HP and SP will be recovered completely by resting there."; - mes "Can't hurt to use one, eh?"; - next; - mes "[Chocolat]"; - mes "Besides these guys, there's many merchants selling various kind of items, so go check them out."; - completequest 7121; - getexp 300,0; - getexp 300,0; - getexp 300,0; - getexp 300,0; - getexp 300,0; - getexp 300,20; - getitem 7059,20; // Cargo_Free_Ticket - getitem 7060,30; // Warp_Free_Ticket - set job_novice_q,14; - next; - mes "[Chocolat]"; - mes "You've completed all the quests I gave you."; - mes "As the reward, I will give you Free Tickets for Kafra Storage and Teleport Service."; - mes "They will come in handy."; - next; - mes "[Chocolat]"; - mes "That's all for me."; - mes "Now, it's time for real combat!"; - next; - mes "[Chocolat]"; - mes "Real Combat Training will be given by Instructor Brade. You met him earlier."; - mes "I will send you to the Real Combat Training Field."; - close2; - savepoint "new_1-3",96,21; - warp "new_1-3",96,21; - end; - } - else if(job_novice_q > 13) { - mes "[Chocolat]"; - mes "What can I do for you?"; - next; - select(""); - mes "[Chocolat]"; - mes "I will send you to the Real Combat Training Field right away."; - close2; - savepoint "new_1-3",96,21; - warp "new_1-3",96,21; - end; - } - mes "[Chocolat]"; - mes "Why are you still here?"; - close2; - warp "prontera",156,90; - end; -} - -// ---------- Kafra ---------- -new_1-2,29,176,4 script Kafra#nv 117,{ - if(job_novice_q < 10) { - mes "[Kafra Agent]"; - mes "Hello."; - mes "I don't think it's my turn yet."; - mes "Please talk to 'Chocolat' first."; - close; - } - else if(job_novice_q == 10) { - mes "[Kafra Agent]"; - mes "Hello."; - mes "I've been dispatched by the Kafra Head Office to help Trainees."; - mes "The Kafra Corporation is the world's largest company with a long and distinguished history on the Rune Midgard continent."; - mes "It's important for you adventurers to be close with us."; - next; - mes "[Kafra Agent]"; - mes "I will inform you about the Kafra Services which you will be using most frequently, [Save], [Storage], and [Teleport] Services."; - next; - mes "[Kafra Agent]"; - mes "When you talk to a Kafra Agent and ask for the Save Service, the location of where you will revive, after being defeated in battle, will be changed."; - next; - mes "[Kafra Agent]"; - mes "Your Respawn Point is always the last place where you have saved."; - mes "Using a Butterfly Wing will return you to the place where you last saved."; - mes "This service is free to use, so feel free to use the Save Service anytime you like."; - next; - mes "[Kafra Agent]"; - mes "Next is the Storage Service."; - mes "You can store and retrieve your items in any town at your convenience."; - next; - mes "[Kafra Agent]"; - mes "It's unreasonable to carry all of your items with you when you don't need them right away."; - mes "Please use our Storage and keep your items safe and secure."; - next; - mes "[Kafra Agent]"; - mes "Our convenient Storage Service is provided to our customers for a small fee which is different from town to town."; - mes "However, you must be at least ^4A4AFFBasic Skill Level 6^000000 to use the Storage."; - next; - mes "[Kafra Agent]"; - mes "There are 7 different item sections of the Storage into which items are organized: Consumable, Kafra (Item Mall), Armor, Weapons, Ammo, Cards, and Etc items."; - next; - mes "[Kafra Agent]"; - mes "There are a maximum of 600 Inventory Slots in Kafra Storage, meaning you can have up to 600 different kinds of total items in Storage."; - next; - mes "[Kafra Agent]"; - mes "If you have a Premium Subscription, the maximum Inventory Slots in Kafra Storage is 600!"; - mes "Remember though, that in the case of Equipment, each item takes up one Inventory Slot."; - mes "The maximum number of items that can be placed in Kafra Storage is 30,000."; - next; - mes "[Kafra Agent]"; - mes "Storage is shared by everyone character on one account."; - mes "Storage Fees can vary for each Town."; - mes "So please keep that in mind when you are using our storage service."; - next; - mes "[Kafra Agent]"; - mes "We also provide you with a Teleport Service to make your trips easier when you are trying to move a long distance."; - next; - mes "[Kafra Agent]"; - mes "With our veteran teleporter's skill, your trip will be safer and more comfortable."; - mes "Oh and remember that the places you can teleport to vary from town to town."; - next; - mes "[Kafra Agent]"; - mes "This is all for your never ending support. We are working hard to repay our debt to our customers."; - next; - mes "[Kafra Agent]"; - mes "Do you want to hear another explanation?"; - set job_novice_q,11; - next; - } - else { - mes "[Kafra Agent]"; - mes "Kafra Service at your service"; - mes "What can I do for you?"; - next; - select("About Kafra Service"); - mes "[Kafra Agent]"; - mes "I will explain about the Kafra Service."; - mes "Which service do you want to be informed about?"; - next; - } - - while(1) { - switch(select("About Save:About Storage:About Teleport:About Cart:No More.")) { - case 1: - mes "[Kafra Agent]"; - mes "When you are killed in battle, you can revive in the location you saved with this service."; - mes "If you save at a Kafra in a village, you can revive in the village you saved."; - next; - mes "[Kafra Agent]"; - mes "Saved location is always where you saved last, and by using a Butterfly Wing, you can teleport directly to your saved point."; - mes "So feel free to use this service."; - next; - break; - case 2: - mes "[Kafra Agent]"; - mes "Next is the Storage Service."; - mes "You can store and retrieve your items in any town at your convenience."; - next; - mes "[Kafra Agent]"; - mes "It's unreasonable to carry all of your items with you when you don't need them right away."; - mes "Please use our Storage and keep your items safe and secure."; - next; - mes "[Kafra Agent]"; - mes "Our convenient Storage Service is provided to our customers for a small fee which is different from town to town."; - mes "However, you must be at least ^4A4AFFBasic Skill Level 6^000000 to use the Storage."; - next; - mes "[Kafra Agent]"; - mes "There are 7 different item sections of the Storage into which items are organized: Consumable, Kafra (Item Mall), Armor, Weapons, Ammo, Cards, and Etc items."; - next; - mes "[Kafra Agent]"; - mes "There are a maximum of 600 Inventory Slots in Kafra Storage, meaning you can have up to 600 different kinds of total items in Storage."; - next; - mes "[Kafra Agent]"; - mes "If you have a Premium Subscription, the maximum Inventory Slots in Kafra Storage is 600!"; - mes "Remember though, that in the case of Equipment, each item takes up one Inventory Slot."; - mes "The maximum number of items that can be placed in Kafra Storage is 30,000."; - next; - mes "[Kafra Agent]"; - mes "Storage is shared by everyone character on one account."; - mes "Storage Fees can vary for each Town."; - mes "So please keep that in mind when you are using our storage service."; - next; - break; - case 3: - mes "[Kafra Agent]"; - mes "We also provide you with a Teleport Service to make your trips easier when you are trying to move a long distance."; - next; - mes "[Kafra Agent]"; - mes "With our veteran teleporter's skill, your trip will be safer and more comfortable."; - mes "Oh and remember that the places you can teleport to vary from town to town."; - next; - mes "[Kafra Agent]"; - mes "This is all for your never ending support. We are working hard to repay our debt to our customers."; - next; - break; - case 4: - mes "[Kafra Agent]"; - mes "The Kafra corporation provides Cart rental services to customers engaged in commercial business."; - mes "Originally this cart rental service had been only provided by the merchant guild in Alberta."; - next; - mes "[Kafra Agent]"; - mes "However, since we took over this service, our merchant customers have been able to rent carts from almost anywhere."; - mes "The cart rental service is available only for job classes engaged in commercial business such as ^4A4AFFMerchants, Blacksmiths, Alchemists, and Super Novices^000000."; - next; - mes "[Kafra Agent]"; - mes "Of course you should learn the 'Pushcart' skill beforehand, otherwise you will not be able to rent a cart from us."; - mes "The rental fee varies by town, please keep that in mind."; - next; - break; - case 5: - mes "[Kafra Agent]"; - mes "I hope you are satisfied with my explanation about the Kafra Service."; - close; - } - } -} - -// ---------- Cool Event Staff ---------- -new_1-2,32,176,4 script Cool Event Staff#nv 874,{ - if(job_novice_q < 11) { - mes "[Cool Event Staff]"; - mes "This is not my turn."; - mes "You finished talking to Kafra yet?"; - close; - } - else if(job_novice_q == 11) { - mes "[Cool Event Staff]"; - mes "Hello."; - mes "We are working hard to provide events on Rune Midgard similar to the Kafra service."; - next; - mes "[Cool Event Staff]"; - mes "Our staff is here to support you with [storage], [save], and [teleport] services."; - next; - mes "[Cool Event Staff]"; - mes "If there's no Kafra around you, we're around to help you."; - next; - mes "[Cool Event Staff]"; - mes "We are working hard on a network of Events to make your life better."; - mes "I hope that you can meet our staff in Alberta."; - next; - mes "[Cool Event Staff]"; - mes "Who knows, we might meet outside of this academy."; - next; - mes "[Cool Event Staff]"; - mes "Mostly all of us wear red coats in the places that the Kafra Staff don't work for."; - set job_novice_q,12; - close; - } - mes "[Cool Event Staff]"; - mes "Most of our services are similar to those of Kafra."; - close; -} - -// ---------- Soldier ---------- -new_1-2,35,176,4 script Soldier#nv 105,{ - if(job_novice_q < 12) { - mes "[Soldier]"; - mes "It isn't my turn yet."; - mes "Listen to Chocolat."; - close; - } - else if(job_novice_q == 12) { - mes "[Soldier]"; - mes "Soldiers are in each town to guide you to useful places."; - mes "Ask us where you want to go and we'll mark your mini maps with a ^4A4AFF+^000000."; - mes "Don't hesitate to ask us questions."; - next; - mes "[Soldier]"; - mes "We all don't look the same in every town but our roles are the same."; - mes "Take note of this whenever you go to a new town."; - next; - mes "[Soldier]"; - mes "If you want to go to your first town, you can do so once you have reached Base Level 11 in the training grounds."; - set job_novice_q,13; - close; - } - mes "[Soldier]"; - mes "What can I help you with?"; - mes "Need me to explain what I do again?"; - next; - if(select("Yes, I need an explanation.:Nope") == 2) { - mes "[Soldier]"; - mes "Ok well talk to Chocolat if you're done talking with us."; - close; - } - mes "[Soldier]"; - mes "Soldiers are in each town to guide you to useful places."; - mes "Ask us where you want to go and we'll mark your mini maps with a ^4A4AFF+^000000."; - mes "Don't hesitate to ask us questions."; - next; - mes "[Soldier]"; - mes "We all don't look the same in every town but our roles are the same."; - mes "Take note of this whenever you go to a new town."; - next; - mes "[Soldier]"; - mes "If you want to go to your first town, you can do so once you have reached Base Level 11 in the training grounds."; - close; -} - -// Instructor Brade (Real Combat Training) -//============================================================ -- script Brade#nv::NvBrade 733,{ - if(job_novice_q < 14) { - mes "[Brade]"; - mes "How did you get here?"; - close2; - warp "new_1-2",100,100; - end; - } - else if(job_novice_q == 14) { - mes "[Brade]"; - mes "Welcome."; - mes "Now this is real practice."; - mes "We can practice real battle here."; - next; - mes "[Brade]"; - mes "As I explained the first time, we can click on the monsters."; - mes "One attack per click."; - next; - mes "[Brade]"; - mes "For convenience,"; - mes "^4A4AFFIf you hold down the Ctrl key,^000000"; - mes "while attacking, you will automatically attack."; - next; - mes "[Brade]"; - mes "You can also set this mode before battle by typing ^4A4AFF[ /nc ]^000000."; - next; - mes "[Brade]"; - mes "Then, let's go Poring hunting."; - mes "Please hunt Poring's on Level 1 of the training grounds."; - setquest 7122; - set job_novice_q,15; - getitem 569,100; // Novice_Potion - next; - mes "^4A4AFF- You've received a quest from Instructor Brade.^000000"; - mes "^4A4AFFPlease check the quest information window. -^000000"; - close; - } - else if(job_novice_q == 15) { - if(checkquest(7122,HUNTING) == 2) { - mes "[Brade]"; - mes "You can see it is not so hard, right?"; - mes "Nice job."; - getitem 13040,1; // N_Cutter - getexp 1000,0; - getexp 1000,0; - getexp 1000,30; - completequest 7122; - set job_novice_q,16; - next; - mes "[Brade]"; - mes "Now all of the courses are almost done."; - mes "You are a Novice, and you can't get any jobs yet."; - next; - mes "[Brade]"; - mes "If you acquire all of basic skills with Job Level 10, you can change your job."; - next; - mes "[Brade]"; - mes "The first job classes are defined into 6 classes."; - next; - mes "[Brade]"; - mes "The 6 basic jobs are"; - mes "Swordman, Thief,"; - mes "Acolyte, Mage,"; - mes "Archer and Merchant."; - next; - mes "[Brade]"; - mes "Let's experience the basic 6 jobs, Swordman, Thief, Acolyte, Mage, Archer and Merchant and see what those jobs can do."; - next; - mes "[Brade]"; - mes "Behind me, there are people dispatched from each of the basic Job Guilds."; - mes "These people will give you instruction manuals that allow you to experience some limited skills of each job."; - next; - mes "[Brade]"; - mes "Equip a manual of the job which you want to experience, and you will be able to use some basic skills of that corresponding job."; - mes "Try those skills and decide which job to choose."; - close; - } - mes "[Brade]"; - mes "Kill enough Porings."; - mes "Porings are easy to deal with, so cheer up."; - mes "Try again."; - npcskill "AL_HEAL",10,99,60; - close; - } - mes "[Brade]"; - mes "Have you tried the skills in the Manuals?"; - mes "If you want to hear information about each job, talk to the people dispatched by the Job Guilds."; - next; - mes "[Brade]"; - mes "I think you've learned enough, if you want to learn more, then speak to the Eden Group girl next to the Trainers."; - next; - mes "[Brade]"; - mes "Try using the job manuals to find out the characteristics of each job's skills."; - mes "I will restore your HP and SP... Keep it up."; - npcskill "AL_HEAL",10,99,60; - close; -} - -new_1-3,96,30,4 duplicate(NvBrade) Brade#nv1 733 -new_2-3,96,30,4 duplicate(NvBrade) Brade#nv2 733 -new_3-3,96,30,4 duplicate(NvBrade) Brade#nv3 733 -new_4-3,96,30,4 duplicate(NvBrade) Brade#nv4 733 -new_5-3,96,30,4 duplicate(NvBrade) Brade#nv5 733 - -// Job Guides (Real Combat Training) -//============================================================ -// --------------------------- Deletion Function ------------------------------ -function script F_NvErase { - if (getarg(0,0)) { - if (checkquest(7123) == 0 || checkquest(7123) == 1) erasequest 7123; - if (checkquest(7124) == 0 || checkquest(7124) == 1) erasequest 7124; - if (checkquest(7126) == 0 || checkquest(7126) == 1) erasequest 7126; - if (checkquest(7127) == 0 || checkquest(7127) == 1) erasequest 7127; - } - nude; - if (countitem(2819)) delitem 2819,1; // Swordsman_Manual - if (countitem(2820)) delitem 2820,1; // Thief_Manual - if (countitem(2821)) delitem 2821,1; // Acolyte_Manual - if (countitem(2822)) delitem 2822,1; // Archer_Manual - if (countitem(2823)) delitem 2823,1; // Merchant_Manual - if (countitem(2824)) delitem 2824,1; // Mage_Manual - return; -} - -// ---------------------------- Swordman Guide ------------------------------- -- script Swordman Guide#nv::NvSwd 728,{ - if(job_novice_q < 16) { - mes "[Swordman Guildsman]"; - mes "I won't help you until you finish Brade's instructions."; - close; - } - mes "[Swordman Guildsman]"; - mes "Can I help you?"; - next; - switch(select("About Swordman Class.:Job change to Swordman.:Got any quests?:Cancel.")) { - case 1: - mes "[Swordman Guildsman]"; - mes "Literally, Swordman means one, who is specialized in wielding swords."; - mes "But they can also choose to use spears if they so choose."; - next; - mes "[Swordman Guildsman]"; - mes "We possess strong physical strength."; - mes "So naturally we can equip heavy armors and weapons."; - mes "Most weapon classes, except for bows and rods, are equippable by our class."; - next; - mes "[Swordman Guildsman]"; - mes "The only weakness of the Swordman class is that they cannot use magic spells."; - mes "But we've compensated for that by using elemental weapons."; - next; - mes "[Swordman Guildsman]"; - mes "The merits of being a Swordman is the enormous amount of HP we have."; - mes "Most of us can bear the grunt of our enemies' attacks with relative ease."; - next; - mes "[Swordman Guildsman]"; - mes "And we are unrivaled when it comes to one-on-one melee combat."; - next; - mes "[Swordman Guildsman]"; - mes "Anyone who chooses to be a Swordman will likely play the role of the tank. It is our duty to protect the weak."; - next; - mes "[Swordman Guildsman]"; - mes "As a Swordman you can advance to a ^8C2121Knight^000000 or ^8C2121Crusader^000000 class as your 2nd class profession."; - mes "And just recently third professions have been discovered."; - if(countitem(2819) == 0 && (getequipid(EQI_ACC_L) != 2819 || getequipid(EQI_ACC_R) != 2819)) { - next; - mes "[Swordman Guildsman]"; - mes "If you're interested in being a Swordman, I'll offer you this manual."; - mes "Do you want to try the skills of a Swordman?"; - next; - if(select("I'll try the Swordman skills.:No Thanks.") == 2) { - mes "[Swordman Guildsman]"; - mes "Hum. Do you think so?"; - mes "Ok, I agree with you. Choosing a job is very important in our lives."; - mes "Just talk to me whenever you want to experience Swordman skills."; - close; - } - mes "[Swordman Guildsman]"; - mes "Here is the Swordman manual."; - mes "I'll just take any manuals from any other classes you have."; - callfunc "F_NvErase"; - getitem 2819,1; // Swordsman_Manual - next; - mes "[Swordman Guildsman]"; - mes "After equipping the Manual, open your Skill menu by pressing ALT+S."; - mes "Make sure to minimize your Skill tree by clicking the '-' button on the top right corner of the Skill Tree Window."; - } - close; - case 2: - mes "[Swordman Guildsman]"; - mes "Do you really want to change your job to Swordman?"; - mes "If you want to be a Swordman, I'll send you to the Swordman Guild immediately."; - next; - mes "[Swordman Guildsman]"; - mes "I think you have enough job levels, of course, right?"; - mes "Do you want to stop your training now and go to the Swordman Guild?"; - next; - if(select("I'll consider it again.:I'll go to the Swordman Guild.") == 2) { - mes "[Swordman Guildsman]"; - mes "I see."; - mes "Then I'll end your training process and send you to the Swordman Guild."; - close2; - callfunc "F_NvErase",1; - savepoint "izlude",94,103; - warp "izlude_in",74,167; - end; - } - mes "[Swordman Guildsman]"; - mes "Please try enough instruction manuals from each job class and consider it carefully."; - mes "Of course, you're always welcomed."; - close; - case 3: - set .@quest, checkquest(7123); - if (.@quest == -1) { - mes "[Swordman Guildsman]"; - mes "You want me to give you a quest?"; - mes "Umm. Let me see."; - mes "Ok! Hunt a couple of Picky monsters around here."; - next; - mes "^4d4dffYou received a hunting request from a staff of the Swordman Guild."; - mes "You can check the contents of the quest from the quest information window.^000000"; - setquest 7123; - next; - mes "[Swordman Guildsman]"; - mes "Use the 'Bash' skill in the Swordman manual."; - mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available Swordman skills."; - next; - mes "[Swordman Guildsman]"; - mes "Talk to Trainer Brutus if you want to fight stronger monsters."; - mes "I'll wait for you here."; - mes "Wish you a good luck."; - close; - } - else if (.@quest == 1) { - if (checkquest(7123,HUNTING) == 2) { - mes "[Swordman Guildsman]"; - mes "Great."; - mes "I think that you're good enough to be a Swordman."; - mes "I'll give you some potions as a reward."; - completequest 7123; - getitem 569,200; // Novice_Potion - getexp 5000,100; - close; - } - mes "[Swordman Guildsman]"; - mes "Hunt two Picky monsters."; - mes "You can find them in the more difficult training grounds by talking to Trainer Brutus."; - close; - } - else if (.@quest == 2) { - mes "[Swordman Guildsman]"; - mes "I think you finished that quest already, right?"; - mes "You'll experience more of these quests as you grow as an adventurer in the world."; - next; - mes "[Swordman Guildsman]"; - mes "Your training is now complete."; - mes "If you choose to become a Swordman I wish you goodluck."; - close; - } - mes "[Swordman Guildsman]"; - mes "I'm sorry but I don't have any quests to give you right now."; - close; - case 4: - mes "[Swordman Guildsman]"; - mes "If you have any questions about the Swordman class, please ask me."; - mes "The Swordman Guild is waiting for novices like you."; - close; - } -} - -new_1-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv1 728 -new_2-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv2 728 -new_3-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv3 728 -new_4-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv4 728 -new_5-3,97,41,4 duplicate(NvSwd) Swordman Guide#nv5 728 - -// ---------------------------- Mage Guide ---------------------------------- -- script Mage Guide#nv::NvMag 123,{ - if(job_novice_q < 16) { - mes "[Mage Guild Member]"; - mes "You are still in the process of training with Instructor Brade."; - close; - } - mes "[Mage Guild Member]"; - mes "What can I help you with?"; - next; - switch(select("Tell me about Mages:I want to be a Mage:Give me a Quest:Cancel")) { - case 1: - mes "[Mage Guild Member]"; - mes "Mages are those who can use magic when they need to protect their friends."; - mes "Mages can curse enemies using the elements of fire, water, earth and thunder magic."; - next; - mes "[Mage Guild Member]"; - mes "However they cannot equip other weapons but staffs and books."; - mes "Because they are too delicate to carry heavy weapons."; - next; - mes "[Mage Guild Member]"; - mes "But they can cover this weakness by their remarkable magic skills."; - mes "That is why many people want to become a Mage!"; - next; - mes "[Mage Guild Member]"; - mes "Mages have to be in their guild for guild's power and honor."; - mes "This is one of the reasons why Mages are popular in any parties and guilds."; - mes "Why don't you become a Mage?"; - next; - mes "[Mage Guild Member]"; - mes "^8C2121Mages can transform to Wizards or Sages as their second job.^000000"; - if(countitem(2824) == 0 && (getequipid(EQI_ACC_L) != 2824 || getequipid(EQI_ACC_R) != 2824)) { - next; - mes "[Mage Guild Member]"; - mes "Do you want to register to experience how it is to be a Mage?"; - mes "Would you like to test Mage skills?"; - next; - if(select("I want to test Mage skills.:I don't want to test it.") == 2) { - mes "[Mage Guild Member]"; - mes "Hum. Do you think so."; - mes "Ok, I agree with you. Choosing a job is very important in our life."; - mes "Just talk to me whenever you want to experience Mage skills."; - close; - } - mes "[Mage Guild Member]"; - mes "Here is the Mage Manual."; - mes "I will take the other job registration forms and manuals from you."; - next; - mes "[Mage Guild Member]"; - mes "Here is the Mage Manual."; - mes "I will take the other job registration forms and manuals from you."; - callfunc "F_NvErase"; - getitem 2824,1; // Mage_Manual - next; - mes "[Mage Guild Member]"; - mes "After equipping the Manual, open your Skill menu by pressing ALT+S."; - mes "Make sure to minimize your Skill tree by clicking the '-' button on the top right corner of the Skill Tree Window."; - } - close; - case 2: - mes "[Mage Guild Member]"; - mes "You want to be a Mage?"; - mes "Ok, then, I will send you to the Mage Guild union in Geffen right away."; - next; - mes "[Mage Guild Member]"; - mes "Wait, have you checked your Job level?"; - mes "Do you want to complete your Novice training and go straight to the Mage Guild's union?"; - next; - if(select("I will think about it again.:Yes, complete my training.") == 2) { - mes "[Mage Guild Member]"; - mes "Welcome!!"; - mes "I will send you to the Mage Guilds union after you complete your Novice training."; - close2; - callfunc "F_NvErase",1; - savepoint "geffen",119,38; - warp "geffen_in",163,98; - end; - } - mes "[Mage Guild Member]"; - mes "Please test what Mage skills are all about before you decide."; - mes "We are always welcome to have you!"; - close; - case 3: - set .@quest, checkquest(7124); - if (.@quest == -1) { - mes "[Mage Guild Member]"; - mes "Huh? Quest?"; - mes "Hmm... What would be suited for you...?"; - mes "Would you like to hunt Lunatics by using Bolt skills?"; - next; - mes "^4d4dffYou have received a Hunting quest from the Mage Guide."; - mes "You can get more information about the quest from the quest window.^000000"; - setquest 7124; - next; - mes "[Mage Guild Member]"; - mes "You are able to use 'Fire Bolt' skill that is shown on the Mage manual."; - mes "I will wait for you here."; - mes "Good luck!"; - close; - } - else if (.@quest == 1) { - if (checkquest(7124,HUNTING) == 2) { - mes "[Mage Guild Member]"; - mes "You have done excellent job."; - mes "So, did you find any interests about Mages?"; - mes "Alright. I will give something..."; - mes "Here are Novice Butterfly Wings, please take them."; - completequest 7124; - getitem 12324, 30; // N_Butterfly_Wing - getexp 5000,100; - close; - } - mes "[Mage Guild Member]"; - mes "The quest is that you have to"; - mes "hunt Lunatics and bring 5 clovers."; - close; - } - else if (.@quest == 2) { - mes "[Mage Guild Member]"; - mes "You have already completed the quest."; - mes "Once you enter the main world, you can get various exciting quests there!"; - next; - mes "[Mage Guild Member]"; - mes "This should be enough for your training."; - close; - } - mes "[Mage Guild Member]"; - mes "I'm sorry but I don't have any quests to give you right now."; - close; - case 4: - mes "[Mage Guild Member]"; - mes "If you have any questions about Mages, feel free to ask me."; - mes "I think you could be a intelligent Mage..."; - close; - } -} - -new_1-3,101,41,4 duplicate(NvMag) Mage Guide#nv1 123 -new_2-3,101,41,4 duplicate(NvMag) Mage Guide#nv2 123 -new_3-3,101,41,4 duplicate(NvMag) Mage Guide#nv3 123 -new_4-3,101,41,4 duplicate(NvMag) Mage Guide#nv4 123 -new_5-3,101,41,4 duplicate(NvMag) Mage Guide#nv5 123 - -// ---------------------------- Thief Guide --------------------------------- -- script Thief Guide#nv::NvThf 118,{ - if(job_novice_q < 16) { - mes "[Thief Guild Member]"; - mes "You look like you are not done with Instructor Brade's lessons."; - close; - } - mes "[Thief Guild Member]"; - mes "How can I help you?"; - next; - switch(select("About the Thief Class.:I want to be a Thief.:Got any Quests?:Cancel.")) { - case 1: - mes "[Thief Guild Member]"; - mes "Thieves are experts at using Dagger class weapons."; - mes "They strike quickly and easily evade attacks from their enemies."; - next; - mes "[Thief Guild Member]"; - mes "Thieves can learn skills that allow them to hide from their enemies or steal items from monsters."; - mes "They are also feared for their use of poison, which slowly weakens their enemies."; - next; - mes "[Thief Guild Member]"; - mes "In jeopardy, or in the case that thieves do not want to reveal themselves, they can use their skill to hide themselves easily."; - next; - mes "[Thief Guild Member]"; - mes "Thieves can change their jobs to ^8C2121Assassins^000000 or ^8C2121Rogues.^000000"; - if(countitem(2820) == 0 && (getequipid(EQI_ACC_L) != 2820 || getequipid(EQI_ACC_R) != 2820)) { - next; - mes "[Thief Guild Member]"; - mes "If you want, I'll give you a Thief skill manual."; - mes "Would you like to experience the skills of a Thief?"; - next; - if(select("Yes, I would.:No, I don't.") == 2) { - mes "[Thief Guild Member]"; - mes "Oh, are you sure?"; - mes "Class selection is very important so please consider it carefully."; - mes "If you want to ask about Thieves, please talk to me any time."; - close; - } - mes "[Thief Guild Member]"; - mes "Here, please take the Thief manual."; - mes "I'll just take the other class manuals while I'm at it."; - next; - mes "[Thief Guild Member]"; - mes "Here, please take the Thief manual."; - mes "I'll just take the other class manuals while I'm at it."; - callfunc "F_NvErase"; - getitem 2820,1; // Thief_Manual - next; - mes "[Thief Guild Member]"; - mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window."; - mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available skills."; - } - close; - - case 2: - mes "[Thief Guild Member]"; - mes "Do you really want to be a Thief?"; - mes "If so, I will send you to the Thief Guild immediately."; - next; - mes "[Thief Guild Member]"; - mes "You already reached the required job level, didn't you?"; - mes "Do you want to finish the Novice training and go to the Thief Guild?"; - next; - if(select("Let me consider it again.:Yes, I do.") == 2) { - mes "[Thief Guild Member]"; - mes "Ok, I see."; - mes "Welcome. Then your Novice training is totally complete and you will be sent to the Thief Guild immediately."; - close2; - callfunc "F_NvErase",1; - savepoint "morocc",150,100; - warp "moc_prydb1",99,185; - end; - } - mes "[Thief Guild Member]"; - mes "Have you tried all of the class manuals yet?"; - mes "If you're undecided what job to take on I suggest you try talking to all the Guides first."; - close; - case 3: - set .@quest, checkquest(7127); - if (.@quest == -1) { - mes "[Thief Guild Member]"; - mes "Quests?"; - mes "Hmm, what will be good for you?"; - mes "How about hunting some Willows."; - next; - mes "[Thief Guild Member]"; - mes "You can't cheat this so make sure to kill 5 Willows. When you're done come and talk to me again."; - mes "If you talk to Trainer Brutus, he can send you to a more difficult training ground where there are Willows to hunt."; - setquest 7127; - next; - mes "[Thief Guild Member]"; - mes "If you equip the Thief manual, you can have the effect of the skill, Double Attack."; - mes "Double Attack and Hide are the main skills of the Thief."; - close; - } - else if (.@quest == 1) { - if (checkquest(7127,HUNTING) == 2) { - mes "[Thief Guild Member]"; - mes "You are very strong."; - mes "These are not many but let me give you a reward for your effort."; - completequest 7127; - getitem 12323, 50; // N_Fly_Wing - getexp 5000,100; - close; - } - mes "[Thief Guild Member]"; - mes "Hunt 5 Willows and then come talk to me to finish your quest."; - close; - } - else if (.@quest == 2) { - mes "[Thief Guild Member]"; - mes "I think you finished that quest already, right?"; - mes "You'll experience more of these quests as you grow as an adventurer in the world."; - next; - mes "[Thief Guild Member]"; - mes "Your training is now complete."; - mes "If you choose to become a Thief I wish you goodluck."; - close; - } - mes "[Thief Guild Member]"; - mes "I'm sorry but I don't have any quests to give you right now."; - close; - case 4: - mes "[Thief Guild Member]"; - mes "If you have something to ask about the Thief job, feel free to ask me."; - close; - } -} - -new_1-3,105,41,4 duplicate(NvThf) Thief Guide#nv1 118 -new_2-3,105,41,4 duplicate(NvThf) Thief Guide#nv2 118 -new_3-3,105,41,4 duplicate(NvThf) Thief Guide#nv3 118 -new_4-3,105,41,4 duplicate(NvThf) Thief Guide#nv4 118 -new_5-3,105,41,4 duplicate(NvThf) Thief Guide#nv5 118 - -// ---------------------------- Merchant Guide ------------------------------ -- script Merchant Guide#nv::NvMer 97,{ - if(job_novice_q < 16) { - mes "[Merchant Guildsman]"; - mes "You are still in the process of training with sir Brade."; - close; - } - mes "[Merchant Guildsman]"; - mes "What can I help you with?"; - next; - switch(select("Tell me about Merchants:I want to be a Merchant.:Give me a Quest.:Cancel")) { - case 1: - mes "[Merchant Guildsman]"; - mes "Merchant? Simply put, they sell goods and make money."; - mes "That's the main focus for any Merchant."; - next; - mes "[Merchant Guildsman]"; - mes "We have special skills for making money."; - mes "We can buy goods at a lower price and sell them at a higher price."; - next; - mes "[Merchant Guildsman]"; - mes "Also Merchants can have Carts that we can store lots of items in."; - next; - mes "[Merchant Guildsman]"; - mes "^8C2121Merchants can transform to a Blacksmith or an Alchemist^000000 as their second job."; - if(countitem(2823) == 0 && (getequipid(EQI_ACC_L) != 2823 || getequipid(EQI_ACC_R) != 2823)) { - next; - mes "[Merchant Guildsman]"; - mes "Do you wan to see what it's like to be a Merchant?"; - next; - if(select("I want to test Merchant skills.:I don't want to test it.") == 2) { - mes "[Merchant Guildsman]"; - mes "Hum. Do you think so?"; - mes "Ok, I agree with you. Choosing a job is very important in our life."; - mes "Just talk to me whenever you want to experience Merchant skills."; - close; - } - mes "[Merchant Guildsman]"; - mes "Here is the Merchant skill manual."; - mes "I will take other job manuals from you while I'm at it."; - next; - mes "[Merchant Guildsman]"; - mes "Here is the Merchant skill manual."; - mes "I will take other job manuals from you while I'm at it."; - callfunc "F_NvErase"; - getitem 2823,1; // Merchant_Manual - next; - mes "[Merchant Guildsman]"; - mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window."; - mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available skills."; - } - close; - - case 2: - mes "[Merchant Guildsman]"; - mes "You want to be a Merchant?"; - mes "Ok, then, I will send you to the Merchant Guild's union right away."; - next; - mes "[Merchant Guildsman]"; - mes "Wait, have you checked your Job level?"; - mes "Do you want to complete your Novice training and go straight to the Merchant Guild's union?"; - next; - if(select("I will think about it again.:Yes, I want to go to the Merchant Guild's union.") == 2) { - mes "[Merchant Guildsman]"; - mes "Welcome!!"; - mes "I will send you to the Merchant Guild's union after you complete your Novice training."; - close2; - callfunc "F_NvErase",1; - savepoint "alberta",29,231; - warp "alberta_in",62,44; - end; - } - mes "[Merchant Guildsman]"; - mes "Ok, I hope you consider being a Merchant."; - mes "We are always welcome to have you!"; - close; - case 3: - set .@quest, checkquest(7126); - if (.@quest == -1) { - mes "[Merchant Guildsman]"; - mes "Huh? Quest??"; - mes "Humm... What would be suited for you...?"; - mes "Ok, then bring me ^5d5dff300 zeny^000000 by selling some of your items to the Potato Merchant."; - next; - mes "[Merchant Guildsman]"; - mes "If you equipped the Merchant manual you have the ability to use the 'Overcharge' and 'Discount' skills."; - setquest 7126; - next; - mes "I will wait for you here."; - mes "Good luck!"; - close; - } - else if (.@quest == 1) { - if (Zeny > 299) { - mes "[Merchant Guildsman]"; - mes "Excellent!"; - mes "Zeny is the currency of Rune-Midgard."; - mes "You can make zeny by selling loot as well as through making smart business decisions."; - next; - mes "[Merchant Guildsman]"; - mes "We can use extremely powerful skills with zeny!"; - mes "Mammonite! That is our ultimate attack skill!!"; - mes "We basically paste money on the weapon and then strike the enemy. Death by Zeny! Nyahahahaha!"; - next; - mes "[Merchant Guildsman]"; - mes "By the way, you have done an excellent job. So, I should give you something... What would be good?"; - mes "Alright! What about Phracon?"; - mes "Phracon is a metallic element which you can use for refining weapons."; - completequest 7126; - getitem 1010,7; // Phracon - getexp 5000,100; - close; - } - mes "[Merchant Guildsman]"; - mes "Zeny is the currency of Rune-Midgard."; - mes "You can make zeny by selling loot as well as through making smart business decisions."; - next; - mes "[Merchant Guildsman]"; - mes "You can get loot by killing monsters. After hunting monsters, you can sell those loot to make a profit!"; - mes "What a valuable job it is! Isn't it?"; - next; - mes "[Merchant Guildsman]"; - mes "Why don't you try to be a Merchant? Making money is not easy but it will be a great experience!"; - close; - } - else if (.@quest == 2) { - mes "[Merchant Guildsman]"; - mes "You have already completed the quest."; - mes "Once you enter the main world, you can get various exciting quests there!"; - next; - mes "[Merchant Guildsman]"; - mes "I think you're strong enough now to change your job right? Hahahaha don't waste too much time here Novice."; - close; - } - mes "[Merchant Guildsman]"; - mes "I'm sorry but I don't have any quests to give you right now."; - close; - case 4: - mes "[Merchant Guildsman]"; - mes "If you have any questions about Merchants, feel free to ask me."; - mes "I think you could be a rich Merchant. AhHahaha."; - close; - } -} - -new_1-3,109,41,4 duplicate(NvMer) Merchant Guide#nv1 97 -new_2-3,109,41,4 duplicate(NvMer) Merchant Guide#nv2 97 -new_3-3,109,41,4 duplicate(NvMer) Merchant Guide#nv3 97 -new_4-3,109,41,4 duplicate(NvMer) Merchant Guide#nv4 97 -new_5-3,109,41,4 duplicate(NvMer) Merchant Guide#nv5 97 - -// ---------------------------- Archer Guide -------------------------------- -- script Archer Guide#nv::NvArc 727,{ - if(job_novice_q < 16) { - mes "[Archer Guide]"; - mes "You are still in the process of training with sir Brade."; - close; - } - mes "[Archer Guide]"; - mes "What can I help you with?"; - next; - switch(select("Tell me about Archers:I want to be an Archer:Cancel")) { - case 1: - mes "[Archer Guide]"; - mes "Archers have specialized skills by using a Bow and have a variety of powerful skills."; - mes "Archers are good at staying back and picking off their targets."; - next; - mes "[Archer Guide]"; - mes "Archers don't have great vitality so they have to keep their distance from enemies."; - next; - mes "[Archer Guide]"; - mes "On the other hand, Archers are attentive and have incredibly accurate eyes."; - mes "So once they are ready to attack, they can kill enemies before they're even aware of their presence."; - next; - mes "[Archer Guide]"; - mes "^8C2121Archers can transform to many second jobs like a Hunter.^000000"; - mes "^8C2121Besides Hunters, Archers can transform to a Bard, if they are male.^000000"; - mes "^8C2121They can transform to a Dancer, if they are female.^000000"; - if(countitem(2822) == 0 && (getequipid(EQI_ACC_L) != 2822 || getequipid(EQI_ACC_R) != 2822)) { - next; - mes "[Archer Guide]"; - mes "Do you want to register to test skill experience?"; - mes "Would you like to test Archer skills?"; - next; - if(select("I want to test Archer skills.:I don't want to test it.") == 2) { - mes "[Archer Guide]"; - mes "Hum. Do you think so."; - mes "Ok, I agree with you. Choosing a job is very important in our life."; - mes "Just talk to me whenever you want to experience Archer skills."; - close; - } - mes "[Archer Guide]"; - mes "Here is the Archer manual."; - mes "I will take the other job manuals from you while you test the Archer manual out."; - next; - mes "[Archer Guide]"; - mes "I will take the other job manuals from you while you test the Archer manual out."; - callfunc "F_NvErase"; - getitem 2822,1; // Archer_Manual - next; - mes "[Archer Guide]"; - mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window."; - mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimize the window by pressing the '-' button on the top right corner of the window to see the available skills."; - } - close; - case 2: - mes "[Archer Guide]"; - mes "You want to be an Archer?"; - mes "Ok, then, I will send you to the Archer Guild right away."; - next; - mes "[Archer Guide]"; - mes "Wait, have you checked your Job level?"; - mes "Do you want to complete the Novice training arena and go to the Archer Guild right now?"; - next; - if(select("I will think about it again.:Yes, I want to go to the Archer Guild's union.") == 2) { - mes "[Archer Guide]"; - mes "Welcome!!"; - mes "I will send you to the Archer Guild after you complete your Novice training."; - close2; - callfunc "F_NvErase",1; - savepoint "payon",256,242; - warp "payon_in02",64,65; - end; - } - mes "[Archer Guide]"; - mes "Test out all the jobs if you have to but choose Archer because we're the best."; - mes "We are always welcome to have you!"; - close; - case 3: - mes "[Archer Guide]"; - mes "If you have any questions about Archers, feel free to ask me."; - mes "I think you could be a strong Archer young Novice."; - close; - } -} - -new_1-3,113,41,4 duplicate(NvArc) Archer Guide#nv1 727 -new_2-3,113,41,4 duplicate(NvArc) Archer Guide#nv2 727 -new_3-3,113,41,4 duplicate(NvArc) Archer Guide#nv3 727 -new_4-3,113,41,4 duplicate(NvArc) Archer Guide#nv4 727 -new_5-3,113,41,4 duplicate(NvArc) Archer Guide#nv5 727 - -// ---------------------------- Acolyte Guide ------------------------------- -- script Acolyte Guide#nv::NvAco 95,{ - if(job_novice_q < 16) { - mes "[Prontera Acolyte]"; - mes "You look like you are not done with Instructor Brade's lessons."; - close; - } - mes "[Prontera Acolyte]"; - mes "What can I do for you?"; - next; - switch(select("What is an Acolyte?:Job change to Acolyte:Cancel")) { - case 1: - mes "[Prontera Acolyte]"; - mes "An Acolyte is someone who worships the goddess Freya sacrificing themselves to help others."; - next; - mes "[Prontera Acolyte]"; - mes "Acolytes use supportive skills to make combat easier."; - mes "It is essential to have an Acolyte in any successful party."; - next; - mes "[Prontera Acolyte]"; - mes "^8C2121As an Acolyte, you can upgrade your future job to Priest or Monk.^000000"; - next; - mes "[Prontera Acolyte]"; - if(countitem(2821) == 0 && (getequipid(EQI_ACC_L) != 2821 || getequipid(EQI_ACC_R) != 2821)) { - next; - mes "[Prontera Acolyte]"; - mes "If you want, I can give you a skill manual to experience what it is like to be an Acolyte."; - mes "Would you like to experience the skills of an Acolyte?"; - next; - if(select("Yes, please.:No I'm not interested.") == 2) { - mes "[Prontera Acolyte]"; - mes "Hum. Do you think so."; - mes "Ok, I agree with you. Choosing a job is very important in our life."; - mes "Just talk to me whenever you want to know about Acolytes."; - close; - } - mes "[Prontera Acolyte]"; - mes "Here you go, the instruction manual of an Acolyte."; - mes "I will take away those other job's manuals while you study this one."; - next; - mes "[Prontera Acolyte]"; - mes "Here you go, the instruction manual of an Acolyte."; - mes "I will take away those other job's manuals while you study this one."; - callfunc "F_NvErase"; - getitem 2821,1; // Acolyte_Manual - next; - mes "[Prontera Acolyte]"; - mes "Make sure to equip the Skill Manual by double-clicking it in the Inventory Window."; - mes "Open your Skill Tree by pressing ^4A4AFFAlt + S^000000 and minimizing the window by pressing the '-' button on the top right corner of the window to see the available skills."; - } - close; - case 2: - mes "[Prontera Acolyte]"; - mes "Of course, I assume you have enough job levels to become an Acolyte right?"; - mes "Would you like to quit the Training Process and go to the Cathedral of Prontera?"; - next; - if(select("Let me reconsider.:I will go to the Cathedral.") == 2) { - mes "[Prontera Acolyte]"; - mes "That's great."; - mes "Then I will completely end the Training Process and send you to the Cathedral of Prontera."; - close2; - callfunc "F_NvErase",1; - savepoint "prontera",117,72; - warp "prt_church",172,19; - end; - } - mes "[Prontera Acolyte]"; - mes "You should try out each job's manuals."; - mes "Go through them throughly and decide carefully."; - mes "Of course, I will welcome you anytime."; - close; - case 3: - mes "[Prontera Acolyte]"; - mes "If you have any questions about Acolytes, please ask me anytime."; - mes "Our God, Odin awaits adventurers like you"; - close; - } -} - -new_1-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv1 95 -new_2-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv2 95 -new_3-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv3 95 -new_4-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv4 95 -new_5-3,117,41,4 duplicate(NvAco) Acolyte Guide#nv5 95 - -// ---------------------------- Bruce (Extended Jobs) ----------------------- -- script Bruce#nv::NvBruce 57,{ - mes "[Bruce]"; - mes "Hello?"; - mes "I'm here to guide you about extra jobs and special classes."; - next; - mes "[Bruce]"; - mes "For special classes, there are Taekwon, Ninja, Super Novice, and Gunslinger."; - mes "Which job description do you want to hear?"; - next; - while(1) { - switch(select("Taekwon:Ninja:Super Novice:Gunslinger:End the conversation.")) { - case 1: - mes "[Bruce]"; - mes "It's a job that usually uses a lot of kicking skills."; - mes "It belongs to special class and later you can change your job into Taekwon Master which has much stronger attack skills."; - next; - mes "[Bruce]"; - mes "There is a secondary class to choose from called Soul Linker which also has strong attacks."; - mes "You can decide that later when you get stronger."; - next; - break; - case 2: - mes "[Bruce]"; - mes "Ninja's specialty is rapid movement."; - mes "They specialize in using throwing weapons."; - next; - mes "[Bruce]"; - mes "Ninjas are kind of a hybrid class that can use various dodge skills with the capability of both physical and magical attacks depending on their preference."; - next; - break; - case 3: - mes "[Bruce]"; - mes "The biggest attraction of the stronger Novice, called Super Novice, is their pull to mediocrity."; - mes "They are the proverbial Jack-of-all-Trades but Master of none."; - next; - mes "[Bruce]"; - mes "Super Novices can learn most of the 1st job class skills."; - mes "If you become a Super Novice, you cannot change your job, which is too bad, but you can grow as a very individual character."; - next; - break; - case 4: - mes "[Bruce]"; - mes "You can job change directly from Novice to a special class which is optimized for a long-distance attack with guns."; - next; - mes "[Bruce]"; - mes "Gunslingers use all kinds of guns made in 'Einbroch', the city of steel."; - mes "I recommend this for those who want to become powerful sharpshooters."; - next; - break; - case 5: - mes "[Bruce]"; - mes "If you need more information, you can always go to"; - mes "'iro.ragnarokonline.com'"; - close; - } - } -} - -new_1-3,121,41,4 duplicate(NvBruce) Bruce#nv1 57 -new_2-3,121,41,4 duplicate(NvBruce) Bruce#nv2 57 -new_3-3,121,41,4 duplicate(NvBruce) Bruce#nv3 57 -new_4-3,121,41,4 duplicate(NvBruce) Bruce#nv4 57 -new_5-3,121,41,4 duplicate(NvBruce) Bruce#nv5 57 - -//============================================================================ -// Eden Group Officer (Real Combat Training) -//============================================================================ -- script Eden Group Officer#nv::NvEdn -1,{ - if(BaseLevel < 10) { - mes "[Eden Group Officer]"; - mes "Hello, I am a representative of the Eden Group."; - mes "We are here to assist adventurers in Rune Midgard."; - next; - mes "[Eden Group Officer]"; - mes "We have agents all over the world waiting to send you to our secret headquarters where you can get some useful quests."; - next; - mes "[Eden Group Officer]"; - mes "If you take our quests we even give you weapons and equipment so be sure to visit us once you are done with your training."; - next; - mes "[Eden Group Officer]"; - mes "Speak to me again once you have reached Base Level 10 and I will send you out of the training grounds."; - mes "Have you taken the quests from all of the Guides yet?"; - close; - }else{ - mes "[Eden Group Officer]"; - mes "Great! You are ready to take on the challenges of the world."; - mes "What would you like to do?"; - next; - switch(select("I want to leave the training grounds:Tell me about the towns.:Cancel")) { - case 1: - mes "[Eden Group Officer]"; - mes "Looks like you are ready."; - mes "I guess you have made up your mind, huh?"; - next; - mes "[Eden Group Officer]"; - mes "If you know what job you want to change to, you should ask the ^4A4AFFJob Guides^000000 to send you out of the training grounds."; - mes "What town would you like to go to?"; - next; - switch(select("Prontera:Morocc:Payon:Alberta:Geffen:Cancel")) { - case 1: - mes "[Eden Group Officer]"; - mes "Prontera, the Capital city of the Rune-Midgarts Kingdom."; - mes "Take care and may Freya bless you on your journey."; - callsub S_Warp,"prontera",121,77,121,76; - case 2: - mes "[Eden Group Officer]"; - mes "The desert city of Morocc was recently destroyed."; - mes "I will send you to the camp where the survivors are."; - callsub S_Warp,"moc_ruins",71,157,70,158; - case 3: - mes "[Eden Group Officer]"; - mes "Just north of Payon you'll find the Archer Village."; - mes "Good luck on your journeys."; - callsub S_Warp,"payon",167,68,172,111; - case 4: - mes "[Eden Group Officer]"; - mes "Alberta, the Port City."; - mes "It's the main hub of all trades."; - mes "If you want to travel to other civilizations, Alberta is the only outlet."; - callsub S_Warp,"alberta",115,57,116,58; - case 5: - mes "[Eden Group Officer]"; - mes "Geffen, is known as the Magical City of Rune Midgard."; - mes "I will send you near the Fountains."; - mes "Goddess Freya bless you."; - callsub S_Warp,"geffen",118,36,128,66; - case 6: - mes "[Eden Group Officer]"; - mes "If you're still not sure what job you want, talk to the Job Guides for more help."; - close; - } - case 2: - mes "[Eden Group Officer]"; - mes "Prontera is the main capital of the Rune-Midgard Kingdom. Here you will find Merchants selling their items and is a favorite gathering point of adventurers."; - next; - mes "[Eden Group Officer]"; - mes "The Acolyte Guild is here at the Prontera Church located to the northwest. The Swordman Guild can be found at Izlude, a town just southeast of Prontera."; - next; - mes "[Eden Group Officer]"; - mes "Morocc is a city located in the desert that was recently destroyed due to an evil monster named Satan Morroc. The Thief Guild has been working to restore it to it's former glory."; - next; - mes "[Eden Group Officer]"; - mes "Payon is where the Archer Guild has made it's home. You can also find the Kafra Shop Employees selling their Item Mall items near the center of this city."; - next; - mes "[Eden Group Officer]"; - mes "Alberta is the trading hub of Rune Midgard. The Merchant Guild is located here and the docks have ships that will take you to different island cities."; - next; - mes "[Eden Group Officer]"; - mes "Geffen is known as the magical city of Rune Midgard. The Mage Guild is located here and research for new magic is always being conducted at their headquarters."; - next; - mes "[Eden Group Officer]"; - mes "If you wish to be sent directly to the Job Guilds, then speak to the Job Guides and tell them that you want to change your job."; - close; - case 3: - close; - } - } - -S_Warp: - close2; - callfunc "F_NvErase",1; - savepoint getarg(0),getarg(1),getarg(2); - warp getarg(0),getarg(3),getarg(4); - end; - -OnTouch: - emotion e_gasp; - end; -} - -new_1-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv1 729,5,5 -new_2-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv2 729,5,5 -new_3-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv3 729,5,5 -new_4-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv4 729,5,5 -new_5-3,97,50,4 duplicate(NvEdn) Eden Group Officer#nv5 729,5,5 - -// Merchant (Real Combat Training) -//============================================================ -- shop Merchant#nv::NvPotato 93,516:15 - -new_1-3,100,50,4 duplicate(NvPotato) Merchant#nv1 93 -new_2-3,100,50,4 duplicate(NvPotato) Merchant#nv2 93 -new_3-3,100,50,4 duplicate(NvPotato) Merchant#nv3 93 -new_4-3,100,50,4 duplicate(NvPotato) Merchant#nv4 93 -new_5-3,100,50,4 duplicate(NvPotato) Merchant#nv5 93 - -// Trainer (Real Combat Training) -//============================================================ -- script Level 1 Trainer#nv::NvBrutus 84,{ - mes "[Trainer Brutus]"; - mes "These monsters are all weak and easy to kill. But be careful, a lot of them are aggressive and out for blood!"; - next; - mes "[Trainer Brutus]"; - mes "If you think monsters here are too weak for you, I can send you to another training ground where the monsters are stronger than the ones over here."; - next; - mes "[Trainer Brutus]"; - mes "So would you like to try?"; - next; - switch(select("Send me to another Level:What monsters are there?:Cancel")) { - case 1: - mes "[Trainer Brutus]"; - mes "I see, then let me guide you to another level. Which level do you want to go to?"; - next; - for(set .@i,1; .@i<6; set .@i,.@i+1) { - if (!compare(strnpcinfo(2),"nv"+.@i)) - set .@menu$, .@menu$+"Send me to Level "+.@i; - set .@menu$, .@menu$+":"; - } - set .@i, select(.@menu$+"Cancel"); - if (.@i < 7) warp "new_"+.@i+"-3",96,21; - close; - case 2: - mes "[Trainer Brutus]"; - mes "You seem eager to fight."; - mes "The monster levels increase with each level of the training grounds."; - next; - mes "[Trainer Brutus]"; - mes "Level 1 has the weakest monsters."; - mes "There you'll find Poring, Drops, Lunatics, Fabres, and Chonchons."; - next; - mes "[Trainer Brutus]"; - mes "Level 2 is more challenging."; - mes "There you'll find Condors, Pickys, Willows, Fabres, and Roda Frogs."; - next; - mes "[Trainer Brutus]"; - mes "Level 3 is pretty much the same as Level 2."; - mes "There you'll find Condors, Pickys, Willows, Fabres, and Roda Frogs."; - next; - mes "[Trainer Brutus]"; - mes "Level 4 has stronger monsters."; - mes "There you'll find Rockers, Spores, and Fabres."; - next; - mes "[Trainer Brutus]"; - mes "Level 5 is the same as Level 4."; - mes "There you'll find Rockers, Spores, and Fabres."; - close; - case 3: - mes "[Trainer Brutus]"; - mes "Hmm...?"; - mes "Are you worried about going to more challenging places? That's understandable, since you're still a new adventurer. Good luck~"; - close; - } -} - -new_1-3,103,50,4 duplicate(NvBrutus) Level 1 Trainer#nv1 84 -new_2-3,103,50,4 duplicate(NvBrutus) Level 2 Trainer#nv2 84 -new_3-3,103,50,4 duplicate(NvBrutus) Level 3 Trainer#nv3 84 -new_4-3,103,50,4 duplicate(NvBrutus) Level 4 Trainer#nv4 84 -new_5-3,103,50,4 duplicate(NvBrutus) Level 5 Trainer#nv5 84 - -// Random Stuff (Guards & Bulletin Board) -//============================================================ -new_1-1,66,114,4 script Bulletin Board#nv 111,{ - mes "^FF0000=================================^000000"; - mes "^FF0000 ^000000 ^E40CAA[Welcome]^CC0000 to ^FF9000Novice^7FFF00 Training ^00FF00Grounds ^E40CAA[Welcome]^FF0000^000000"; - mes "^FF0000=================================^000000"; - close; -} - -new_1-1,144,116,2 script Guard#nv1 105,{ - mes "[Training Grounds Guard]"; - mes "Welcome to the Training Grounds."; - mes "You are now in the outer court yard. Please go inside the castle to begin your training."; - close; -} - -new_1-1,144,107,2 script Guard#nv2 105,{ - mes "[Training Grounds Guard]"; - if(rand(2)) { - mes "Come in!"; - mes "I would like to welcome you to the Training Grounds!"; - next; - mes "[Training Grounds Guard]"; - mes "In here, you can prepare yourself for your future adventures throughout the Ragnarok world!"; - } - else { - mes "Go, Novice, go!"; - mes "Fight, and grow stronger! Look towards a brighter tomorrow!"; - } - close; -} - -new_1-2,161,182,5 script Instructor#nv 92,{ - mes "[Edwin]"; - mes "Eh? Why are you still here?"; - mes "There are no more courses that you need to take."; - next; - mes "[Edwin]"; - mes "Well, I will let you out of here."; - mes "Go find the instructor, Brade."; - close2; - warp "new_1-2",100,100; - end; -} - -// Real Combat Training Mobs -//============================================================ -new_1-3,0,0,0,0 monster ChonChon 1011,10,0,0,0 -new_1-3,0,0,0,0 monster Drops 1113,10,0,0,0 -new_1-3,0,0,0,0 monster Fabre 1184,5,0,0,0 -new_1-3,0,0,0,0 monster Lunatic 1063,10,0,0,0 -new_1-3,0,0,0,0 monster Poring 1002,10,0,0,0 -new_2-3,0,0,0,0 monster Condor 1009,10,0,0,0 -new_2-3,0,0,0,0 monster Fabre 1184,5,0,0,0 -new_2-3,0,0,0,0 monster Picky 1050,10,0,0,0 -new_2-3,0,0,0,0 monster Roda Frog 1012,10,0,0,0 -new_2-3,0,0,0,0 monster Willow 1010,10,0,0,0 -new_3-3,0,0,0,0 monster Condor 1009,10,0,0,0 -new_3-3,0,0,0,0 monster Fabre 1184,5,0,0,0 -new_3-3,0,0,0,0 monster Picky 1050,10,0,0,0 -new_3-3,0,0,0,0 monster Roda Frog 1012,10,0,0,0 -new_3-3,0,0,0,0 monster Willow 1010,10,0,0,0 -new_4-3,0,0,0,0 monster Fabre 1184,5,0,0,0 -new_4-3,0,0,0,0 monster Rocker 1052,10,0,0,0 -new_4-3,0,0,0,0 monster Spore 1014,10,0,0,0 -new_4-3,0,0,0,0 monster Thief Bug 1051,10,0,0,0 -new_4-3,0,0,0,0 monster Thief Bug 1053,10,0,0,0 -new_5-3,0,0,0,0 monster Fabre 1184,5,0,0,0 -new_5-3,0,0,0,0 monster Rocker 1052,10,0,0,0 -new_5-3,0,0,0,0 monster Spore 1014,1,0,0,0 -new_5-3,0,0,0,0 monster Thief Bug 1051,1,0,0,0 -new_5-3,0,0,0,0 monster Thief Bug 1053,1,0,0,0 \ No newline at end of file +iz_int01,100,91,4 duplicate(Captain_Carew) Captain Carew#iz_int 873 +iz_int01,91,81,4 duplicate(Rumin) Rumin#iz_int01 99 \ No newline at end of file diff --git a/npc/scripts_jobs.conf b/npc/scripts_jobs.conf index 61191700e..966f9fbfa 100644 --- a/npc/scripts_jobs.conf +++ b/npc/scripts_jobs.conf @@ -43,6 +43,7 @@ npc: npc/jobs/2-2a/Stalker.txt npc: npc/jobs/2-2e/SoulLinker.txt // - Novice npc: npc/jobs/novice/supernovice.txt +npc: npc/jobs/novice/novice.txt // - Transcended Quest (2-x -> High Novice) npc: npc/jobs/valkyrie.txt -- cgit v1.2.3-70-g09d2 From cc6defd0abcf3a544489732255c96efdde781550 Mon Sep 17 00:00:00 2001 From: Shaktoh Date: Wed, 22 May 2013 17:25:46 +0300 Subject: Update packet.h (Ragexe ver 2013 05 22) Thx to Yommy for the packet extractor tool --- src/map/packets.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/map/packets.h b/src/map/packets.h index 60ee8c7ca..555f45c19 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -2121,4 +2121,39 @@ packet(0x020d,-1); // Shuffle End #endif +//2013-05-22Ragexe (Shakto) +#if PACKETVER >= 20130522 + // Shuffle Start + packet(0x08A2,7,clif->pActionRequest,2,6); + packet(0x095C,10,clif->pUseSkillToId,2,4,6); + packet(0x0360,5,clif->pWalkToXY,2); + packet(0x07EC,6,clif->pTickSend,2); + packet(0x0925,5,clif->pChangeDir,2,4); + packet(0x095E,6,clif->pTakeItem,2); + packet(0x089C,6,clif->pDropItem,2,4); + packet(0x08A3,8,clif->pMoveToKafra,2,4); + packet(0x087E,8,clif->pMoveFromKafra,2,4); + packet(0x0811,10,clif->pUseSkillToPos,2,4,6,8); + packet(0x0964,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); + packet(0x08A6,6,clif->pGetCharNameRequest,2); + packet(0x0369,6,clif->pSolveCharName,2); + packet(0x093E,12,clif->pSearchStoreInfoListItemClick,2,6,10); + packet(0x08AA,2,clif->pSearchStoreInfoNextPage,0); + packet(0x095B,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); + packet(0x0952,-1,clif->pReqTradeBuyingStore,2,4,8,12); + packet(0x0368,6,clif->pReqClickBuyingStore,2); + packet(0x086E,2,clif->pReqCloseBuyingStore,0); + packet(0x0874,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); + packet(0x089B,41,clif->pPartyBookingRegisterReq,2,4); + //packet(0x0965,8); // CZ_JOIN_BATTLE_FIELD + packet(0x086A,-1,clif->pItemListWindowSelected,2,4,8); + packet(0x08A9,19,clif->pWantToConnection,2,6,10,14,18); + packet(0x0950,26,clif->pPartyInvite2,2); + //packet(0x08AC,4); // CZ_GANGSI_RANK + packet(0x0362,26,clif->pFriendsListAdd,2); + packet(0x0926,5,clif->pHomMenu,2,4); + packet(0x088E,36,clif->pStoragePassword,0); + // Shuffle End +#endif + #endif /* _PACKETS_H_ */ -- cgit v1.2.3-70-g09d2 From d0c501816214cd604e7f7efddb8debff03c514e8 Mon Sep 17 00:00:00 2001 From: jaBote Date: Fri, 24 May 2013 00:55:00 +0200 Subject: Edited doc/script_commands.txt: - Now lines will have up to 75 characters, no more (this does not affect functions or example codes, except most comments). - Some random lines have been shortened up a bit in order to fit wherever possible, in a way that doesn't affect quality of explanation. - Removed any references to past eA/rA revisions, changed SVN references to Git (except in get_revision), and removed most references to past devs of *Athena: this text is informative, not for credits. - Removed any references to TXT servers. - Removed any references to mob control suite. - Improved a bit the part on how to obtain a GID. - Slight improvements on some commands explanations. - Corrected mes script command definition as it can show more than 1 string at once. - Improved set script command to tell the abridged method: a = 7; - Removed reference to an unused parameter (flag) in source, in guildskill script command. - Corrected an error in the rate of autobonus command (100% is 10000, not 1000 as it was before). - Added ways to get a monster's GID through 'monster' and 'areamonster' script commands. - rAthena reference removed in sprintf and sscanf functions. - Please remove cell_basilica references in sercell function if it doesn't work anymore, as said in http://hercules.ws/board/topic/546-how-to-put-safe-zone-on-some-pvp-map/?hl=cell_basilica - Removed "Whew. That's about all of them." at end of the document. Edited src/map/script.c: - Added modification to 'monster' and 'areamonster' to return GID of summoned monster. Signed-off-by: jaBote --- doc/script_commands.txt | 5000 +++++++++++++++++++++++++---------------------- src/map/script.c | 9 +- 2 files changed, 2657 insertions(+), 2352 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 269e02745..c5212d4d1 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -1,4 +1,4 @@ -//===== Hercules Documentation =============================== +//===== Hercules Documentation =============================== //= Hercules Script Commands //===== By: ================================================== //= Hercules Dev Team @@ -7,22 +7,24 @@ //= Commands are sorted depending on their functionality. //============================================================ -This document is a reference manual for all the scripting commands and functions -available in current Hercules GIT. It is not a simple tutorial. When people tell -you to "Read The F***ing Manual", they mean this. - -The information was mostly acquired through looking up how things actually work -in the source code of the server, which was written by many people over time, -and lots of them don't speak English and never left any notes - or are otherwise -not available for comments. As such, anything written in here might not be -correct, it is only correct to the best of our knowledge, which is limited. - -This is not a place to teach you basic programming. This document will not teach -you basic programming by itself. It's more of a reference for those who have at -least a vague idea of what they want to do and want to know what tools they have -available to do it. We've tried to keep it as simple as feasible, but if you -don't understand it, getting a clear book on programming in general will help -better than yelling around the forum for help. +This document is a reference manual for all the scripting commands and +functions available in current Hercules GIT. It is not a simple tutorial. +When people tell you to "Read The F***ing Manual", they mean this. + +The information was mostly acquired through looking up how things actually +work in the source code of the server, which was written by many people +over time, and lots of them don't speak English and never left any notes - +or are otherwise not available for comments. As such, anything written in +here might not be correct, it is only correct to the best of our +knowledge, which is limited. + +This is not a place to teach you basic programming. This document will not +teach you basic programming by itself. It's more of a reference for those +who have at least a vague idea of what they want to do and want to know +what tools they have available to do it. We've tried to keep it as simple +as feasible, but if you don't understand it, getting a clear book on +programming in general will help better than yelling around the forum for +help. A little learning never caused anyone's head to explode. @@ -35,53 +37,55 @@ The commands and functions are listed in no particular order: Descriptive text - Small example if possible. Will usually be incomplete, it's there just to - give you an idea of how it works in practice. + Small example if possible. Will usually be incomplete, it's there just + to give you an idea of how it works in practice. To find a specific command, use Ctrl+F, (or whatever keys call up a search -function in whatever you're reading this with) put an * followed by the command -name, and it should find the command description for you. +function in whatever you're reading this with) put an * followed by the +command name, and it should find the command description for you. -If you find anything omitted, please respond. :) +If you find anything omitted, please tell us. :) Syntax ------ -Throughout this document, wherever a command wants an argument, it is given in -. This doesn't mean you should type the angle brackets. :) If an -argument of a command is optional, it is given in {curly brackets}. You've -doubtlessly seen this convention somewhere, if you didn't, get used to it, -that's how big boys do it. If a command can optionally take an unspecified -number of arguments, you'll see a list like this: +Throughout this document, wherever a command wants an argument, it is +given in . This doesn't mean you should type the angle +brackets. :) If an argument of a command is optional, it is given in +{curly brackets}. You've doubtlessly seen this convention somewhere, if +you didn't, get used to it, that's how big boys do it. If a command can +optionally take an unspecified number of arguments, you'll see a list like +this: command {,...} This still means they will want to be separated by commas. -Where a command wants a string, it will be given in "quotes", if it's a number, -it will be given without them. Normally, you can put an expression, like a bunch -of functions or operators returning a value, in (round brackets) instead of most -numbers. Round brackets will not always be required, but they're often a good -idea. +Where a command wants a string, it will be given in "quotes", if it's a +number, it will be given without them. Normally, you can put an +expression, like a bunch of functions or operators returning a value, in +(round brackets) instead of most numbers. Round brackets will not always +be required, but they're often a good idea. -Wherever you refer to a map name, it's always 'mapname' or 'mapname.gat' +Wherever you refer to a map name, it's always 'mapname' or 'mapname.gat' (Please, don't use .gat suffix anymore. It's useless.) Script loading structure ------------------------ -Scripts are loaded by the map server as referenced in the 'conf/map-server.conf' -configuration file, but in the default configuration, it doesn't load any script -files itself. Instead, it loads the file 'npc/scripts_main.conf' which itself -contains references to other files. The actual scripts are loaded from txt -files, which are linked up like this: +Scripts are loaded by the map server as referenced in the +'conf/map-server.conf' configuration file, but in the default +configuration, it doesn't load any script files itself. Instead, it loads +the file 'npc/scripts_main.conf' which itself contains references to other +files. The actual scripts are loaded from txt files, which are linked up +like this: npc: -Any line like this, invoked, ultimately, by 'map-server.conf' will load up the -script contained in this file, which will make the script available. No file -will get loaded twice, to prevent possible errors. +Any line like this, invoked, ultimately, by 'map-server.conf' will load up +the script contained in this file, which will make the script available. +No file will get loaded twice, to prevent possible errors. Another configuration file option of relevance is: @@ -90,14 +94,14 @@ delnpc: This will unload a specified script filename from memory, which, while seemingly useless, may sometimes be required. -Whenever '//' is encountered in a line upon reading, everything beyond this on -that line is considered to be a comment and is ignored. This works wherever you -place it. +Whenever '//' is encountered in a line upon reading, everything beyond +this on that line is considered to be a comment and is ignored. This works +wherever you place it. // This line will be ignored when processing the script. -Block comments can also be used, where you can place /* and */ between any text you -wish Hercules to ignore. +Block comments can also be used, where you can place /* and */ between any +text you wish Hercules to ignore. Example: /* This text, @@ -105,23 +109,25 @@ Example: * is ignored, until the following * symbol is encountered: */ -The asterisks (*) in front of each line is a personal preference, and is not required. - -Upon loading all the files, the server will execute all the top-level commands -in them. No variables exist yet at this point, no commands can be called other -than those given in this section. These commands set up the basic server script -structure - create NPC objects, spawn monster objects, set map flags, etc. No -code is actually executed at this point except them. The top-level commands the -scripting are pretty confusing, since they aren't structured like you would -expect commands, command name first, but rather, normally start with a map name. - -What's more confusing about the top-level commands is that most of them use a -tab symbol to divide their arguments. - -To prevent problems and confusion, the tab symbols are written as '%TAB%' or '' -throughout this document, even though this makes the text a bit less readable. -Using an invisible symbol to denote arguments is one of the bad things about -this language, but we're stuck with it for now. :) +The asterisks (*) in front of each line is a personal preference, and is +not required. + +Upon loading all the files, the server will execute all the top-level +commands in them. No variables exist yet at this point, no commands can be +called other than those given in this section. These commands set up the +basic server script structure - create NPC objects, spawn monster objects, +set map flags, etc. No code is actually executed at this point except +them. The top-level commands the scripting are pretty confusing, since +they aren't structured like you would expect commands, command name first, +but rather, normally start with a map name. + +What's more confusing about the top-level commands is that most of them +use a tab symbol to divide their arguments. + +To prevent problems and confusion, the tab symbols are written as '%TAB%' +or '' throughout this document, even though this makes the text a bit +less readable. Using an invisible symbol to denote arguments is one of the +bad things about this language, but we're stuck with it for now. :) Here is a list of valid top-level commands: @@ -129,55 +135,57 @@ Here is a list of valid top-level commands: %TAB%mapflag%TAB% -This will, upon loading, set a specified map flag on a map you like. These are -normally in files inside 'conf/mapflag' and are loaded first, so by the time the -server's up, all the maps have the flags they should have. Map flags determine -the behavior of the map regarding various common problems, for a better -explanation, see 'setmapflag'. +This will, upon loading, set a specified map flag on a map you like. These +are normally in files inside 'npc/mapflag' and are loaded first, so by the +time the server's up, all the maps have the flags they should have. Map +flags determine the behavior of the map regarding various common problems, +for a better explanation, see 'setmapflag'. ** Create a permanent monster spawn: ,,,,%TAB%monster%TAB%%TAB%,,,,{,,} -Map name is the name of the map the monsters will spawn on. x,y are the -coordinates where the mob should spawn. If xs and ys are non-zero, they -specify the 'radius' of a spawn-rectangle area centered at x,y. -Putting zeros instead of these coordinates will spawn the monsters randomly. -Note this is only the initial spawn zone, as mobs random-walk, they are free -to move away from their specified spawn region. - -Monster name is the name the monsters will have on screen, and has no relation -whatsoever to their names anywhere else. It's the mob id that counts, which -identifies monster record in 'mob_db.txt' database of monsters. If the mob name -is given as "--ja--", the 'japanese name' field from the monster database is -used, (which, in Hercules, actually contains an English name) if it's "--en--", -it's the 'english name' from the monster database (which contains an uppercase -name used to summon the monster with a GM command). +Map name is the name of the map the monsters will spawn on. x,y are the +coordinates where the mob should spawn. If xs and ys are non-zero, they +specify the 'radius' of a spawn-rectangle area centered at x,y. Putting +zeros instead of these coordinates will spawn the monsters randomly. Note +this is only the initial spawn zone, as mobs random-walk, they are free to +move away from their specified spawn region. + +Monster name is the name the monsters will have on screen, and has no +relation whatsoever to their names anywhere else. It's the mob id that +counts, which identifies monster record in 'mob_db.txt' database of +monsters. If the mob name is given as "--ja--", the 'japanese name' field +from the monster database is used, (which, in Hercules, actually contains +an English name) if it's "--en--", it's the 'english name' from the +monster database (which contains an uppercase name used to summon the +monster with a GM command). Amount is the amount of monsters that will be spawned when this command is executed, it is affected by spawn rates in 'battle.conf'. -Delay1 and delay2 control monster respawn delays - the first one is the fixed -base respawn time, and the second is random variance on top of the base time. -Both values are given in milliseconds (1000 = 1 second). -Note that the server also enforces a minimum respawn delay of 5 seconds. +Delay1 and delay2 control monster respawn delays - the first one is the +fixed base respawn time, and the second is random variance on top of the +base time. Both values are given in milliseconds (1000 = 1 second). Note +that the server also enforces a minimum respawn delay of 5 seconds. -You can specify a custom level to use for the mob different from the one of -the database by adjoining the level after the name with a comma. eg: +You can specify a custom level to use for the mob different from the one +of the database by adjoining the level after the name with a comma. eg: "Poring,50" for a name will spawn a monster with name Poring and level 50. -Event is a script event to be executed when the mob is killed. The event must -be in the form "NPCName::OnEventName" to execute, and the event name label -should start with "On". As with all events, if the NPC is an on-touch NPC, the -player who triggers the script must be within 'trigger' range for the event to -work. +Event is a script event to be executed when the mob is killed. The event +must be in the form "NPCName::OnEventName" to execute, and the event name +label should start with "On". As with all events, if the NPC is an +on-touch NPC, the player who triggers the script must be within 'trigger' +range for the event to work. -There are two optional fields for monster size and AI. Size can be 0 (medium), -1 (small), or 2 (big). AI can be 0 (default), 1 (attack/friendly), 2 (sphere), -3 (flora), or 4 (zanzou). +There are two optional fields for monster size and AI. Size can be 0 +(medium), 1 (small), or 2 (big). AI can be 0 (default), 1 +(attack/friendly), 2 (sphere), 3 (flora), or 4 (zanzou). -Alternately, a monster spawned using 'boss_monster' instead of 'monster' is able -to be detected on the map with the SC_BOSSMAPINFO status (used by Convex Mirror). +Alternately, a monster spawned using 'boss_monster' instead of 'monster' +is able to be detected on the map with the SC_BOSSMAPINFO status (used by +Convex Mirror, item ID# 12214). ** NPC names @@ -187,13 +195,14 @@ NPC names are kinda special and are formatted this way: {::} -All NPCs need to have a unique name that is used for identification purposes. -When you have to identify a NPC by it's name, you should use . -If is not provided, use instead. +All NPCs need to have a unique name that is used for identification +purposes. When you have to identify a NPC by it's name, you should use +. If is not provided, use +instead. -The client has a special feature when displaying names: -if the display name contains a '#' character, it hides that part of the name. -ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter' +The client has a special feature when displaying names: if the display +name contains a '#' character, it hides that part of the name. +Ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter' must be at most 24 characters in length. must be at most 24 characters in length. @@ -202,16 +211,16 @@ ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter' ,,,%TAB%warp%TAB%%TAB%,,,, -This will define a warp NPC that will warp a player between maps, and while most -arguments of that are obvious, some deserve special mention. +This will define a warp NPC that will warp a player between maps, and +while most arguments of that are obvious, some deserve special mention. -SpanX and SpanY will make the warp sensitive to a character who didn't step -directly on it, but walked into a zone which is centered on the warp from -coordinates and is SpanX in each direction across the X axis and SpanY in each -direction across the Y axis. +SpanX and SpanY will make the warp sensitive to a character who didn't +step directly on it, but walked into a zone which is centered on the warp +from coordinates and is SpanX in each direction across the X axis and +SpanY in each direction across the Y axis. -Warp NPC objects also have a name, because you can use it to refer to them later -with 'enablenpc'/'disablenpc' +Warp NPC objects also have a name, because you can use it to refer to them +later with 'enablenpc'/'disablenpc'. Facing of a warp object is irrelevant, it is not used in the code and all current scripts have a zero in there. @@ -221,41 +230,42 @@ current scripts have a zero in there. ,,,%TAB%script%TAB%%TAB%,{} ,,,%TAB%script%TAB%%TAB%,,,{} -This will place an NPC object on a specified map at the specified location, and -is a top-level command you will use the most in your custom scripting. The NPCs -are triggered by clicking on them, and/or by walking in their trigger area, if -defined, see that below. - -Facing is a direction the NPC sprite will face in. Not all NPC sprites have -different images depending on the direction you look from, so for some facing -will be meaningless. Facings are counted counterclockwise in increments of 45 -degrees, where 0 means facing towards the top of the map. (So to turn the sprite -towards the bottom of the map, you use facing 4, and to make it look southeast -it's facing 5.) - -Sprite id is the sprite number used to display this particular NPC. For a full -list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml You may -also use a monster's ID number instead to display a monster sprite for this NPC. -It is possible to use a job sprite as well, but you must first define it as a -monster sprite in 'mob_avail.txt', a full description on how to do this is not -in the scope of this manual. +This will place an NPC object on a specified map at the specified +location, and is a top-level command you will use the most in your custom +scripting. The NPCs are triggered by clicking on them, and/or by walking +in their trigger area, if defined. See that below. + +Facing is a direction the NPC sprite will face in. Not all NPC sprites +have different images depending on the direction you look from, so for +some facing will be meaningless. Facings are counted counterclockwise in +increments of 45 degrees, where 0 means facing towards the top of the map. +(So to turn the sprite towards the bottom of the map, you use facing 4, +and to make it look southeast it's facing 5.) + +Sprite id is the sprite number used to display this particular NPC. For a +full list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml +You may also use a monster's ID number instead to display a monster sprite +for this NPC. It is possible to use a job sprite as well, but you must +first define it as a monster sprite in 'mob_avail.txt', a full description +on how to do this is not in the scope of this manual. A '-1' sprite id will make the NPC invisible (and unclickable). -A '111' sprite id will make an NPC which does not have a sprite, but is still -clickable, which is useful if you want to make a clickable object of the 3D -terrain. +A '111' sprite id will make an NPC which does not have a sprite, but is +still clickable, which is useful if you want to make a clickable object of +the 3D terrain. TriggerX and triggerY, if given, will define an area, centered on NPC and spanning triggerX cells in every direction across X and triggerY in every direction across Y. Walking into that area will trigger the NPC. If no -'OnTouch:' special label is present in the NPC code, the execution will start -from the beginning of the script, otherwise, it will start from the 'OnTouch:' -label. Monsters can also trigger the NPC, though the label 'OnTouchNPC:' is -used in this case. +'OnTouch:' special label is present in the NPC code, the execution will +start from the beginning of the script, otherwise, it will start from the +'OnTouch:' label. Monsters can also trigger the NPC, though the label +'OnTouchNPC:' is used in this case. The code part is the script code that will execute whenever the NPC is -triggered. It may contain commands and function calls, descriptions of which -compose most of this document. It has to be in curly brackets, unlike elsewhere -where we use curly brackets, these do NOT signify an optional parameter. +triggered. It may contain commands and function calls, descriptions of +which compose most of this document. It has to be in curly brackets, +unlike elsewhere where we use curly brackets, these do NOT signify an +optional parameter. ** Define a 'floating' NPC object. @@ -263,30 +273,30 @@ where we use curly brackets, these do NOT signify an optional parameter. This will define an NPC object not triggerable by normal means. This would normally mean it's pointless since it can't do anything, but there are -exceptions, mostly related to running scripts at specified time, which is what -these floating NPC objects are for. More on that below. +exceptions, mostly related to running scripts at specified time, which is +what these floating NPC objects are for. More on that below. ** Define a shop/cashshop NPC. -%TAB%shop%TAB%%TAB%,:{,:...} ,,,%TAB%shop%TAB%%TAB%,:{,:...} -This will define a shop NPC, which, when triggered (which can only be done by -clicking) will cause a shop window to come up. No code whatsoever runs in shop -NPCs and you can't change the prices otherwise than by editing the script -itself. (No variables even exist at this point of scripting, so don't even -bother trying to use them.) - -The item id is the number of item in the 'item_db.txt' database. If Price is set -to -1, the 'buy price' given in the item database will be used. Otherwise, the -price you gave will be used for this item, which is how you create differing -prices for items in different shops. - -You can alternatively use "cashshop" in place of "shop" to use the Cash Shop -interface, allowing you to buy items with special points (Currently stored as -account vars in global_reg #CASHPOINTS and #KAFRAPOINTS). -This type of shop will not allow you to sell items at it, you may only -purchase items here. The layout used to define sale items still count, and +This will define a shop NPC, which, when triggered (which can only be done +by clicking) will cause a shop window to come up. No code whatsoever runs +in shop NPCs and you can't change the prices otherwise than by editing the +script itself (no variables even exist at this point of scripting, so +don't even bother trying to use them). + +The item id is the number of item in the 'item_db.txt' database. If Price +is set to -1, the 'buy price' given in the item database will be used. +Otherwise, the price you gave will be used for this item, which is how you +create differing prices for items in different shops. + +You can alternatively use "cashshop" in place of "shop" to use the Cash +Shop interface, allowing you to buy items with special points (Currently +stored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS). This +type of shop will not allow you to sell items at it, you may only purchase +items here. The layout used to define sale items still count, and "" refers to how many points will be spent purchasing the them. ** Define an warp/shop/cashshop/NPC duplicate. @@ -301,25 +311,25 @@ This will duplicate an warp/shop/cashshop/NPC referred to by 'label'. Warp duplicates inherit the target location. Shop/cashshop duplicates inherit the item list. NPC duplicates inherit the script code. -The rest (name, location, facing, sprite ID, span/trigger area) -is obtained from the definition of the duplicate (not inherited). +The rest (name, location, facing, sprite ID, span/trigger area) is +obtained from the definition of the duplicate (not inherited). ** Define a function object function%TAB%script%TAB%%TAB%{} -This will define a function object, callable with the 'callfunc' command (see -below). This object will load on every map server separately, so you can get at -it from anywhere. It's not possible to call the code in this object by -anything other than the 'callfunc' script command. - -The code part is the script code that will execute whenever the function is -called with 'callfunc'. It has to be in curly brackets, unlike elsewhere where -we use curly brackets, these do NOT signify an optional parameter. +This will define a function object, callable with the 'callfunc' command +(see below). This object will load on every map server separately, so you +can get at it from anywhere. It's not possible to call the code in this +object by anything other than the 'callfunc' script command. +The code part is the script code that will execute whenever the function +is called with 'callfunc'. It has to be in curly brackets, unlike +elsewhere where we use curly brackets, these do NOT signify an optional +parameter. Once an object is defined which has a 'code' field to it's definition, it -contains script commands which can actually be triggered and executed. +contains script commands which can actually be triggered and executed. ~ RID? GID? ~ @@ -328,82 +338,83 @@ What a RID is and why do you need to know Most scripting commands and functions will want to request data about a character, store variables referenced to that character, send stuff to the -client connected to that specific character. Whenever a script is invoked by a -character, it is passed a so-called RID - this is the account ID number of a -character that caused the code to execute by clicking on it, walking into it's -OnTouch zone, or otherwise. - -If you are only writing common NPCs, you don't need to bother with it. However, -if you use functions, if you use timers, if you use clock-based script -activation, you need to be aware of all cases when a script execution can be -triggered without a RID attached. This will make a lot of commands and functions -unusable, since they want data from a specific character, want to send stuff to -a specific client, want to store variables specific to that character, and they -would not know what character to work on if there's no RID. - -Unless you use 'attachrid' to explicitly attach a character to the script first. +client connected to that specific character. Whenever a script is invoked +by a character, it is passed a so-called RID - this is the account ID +number of a character that caused the code to execute by clicking on it, +walking into it's OnTouch zone, or otherwise. + +If you are only writing common NPCs, you don't need to bother with it. +However, if you use functions, if you use timers, if you use clock-based +script activation, you need to be aware of all cases when a script +execution can be triggered without a RID attached. This will make a lot of +commands and functions unusable, since they want data from a specific +character, want to send stuff to a specific client, want to store +variables specific to that character, and they would not know what +character to work on if there's no RID. + +Unless you use 'attachrid' to explicitly attach a character to the script +first (see player-related commands). Whenever we say 'invoking character', we mean 'the character who's RID is -attached to the running script. The script function "playerattached" can be -used to check which is the currently attached player to the script (it will -return 0 if the there is no player attached or the attached player no longer -is logged on to the map-server). +attached to the running script. The script function "playerattached" can +be used to check which is the currently attached player to the script (it +will return 0 if the there is no player attached or the attached player no +longer is logged on to the map-server). But what about GID? --- ---- ----- ---- -GID stands for the Game ID of something, this can either be the GID obtained -through mobspawn (mob control commands) or the account ID of a character. -Another way would be to right click on a mob, -NPC or char as GM sprited char to view the GID. - -This is mostly used for the new version of skill and the mob control commands -implemented (but NEVER documented by Lance. Shame on you...). +GID stands for the Game ID of something, this can either be the GID of a +mob obtained through the monster script command (if only summoned one), +the GID of a NPC obtained through the getnpcid script command or the +account ID of a character (same as its RID). Another way would be to right +click on a mob, NPC or char as GM sprited char to view its GID. Item and pet scripts -------------------- -Each item in the item database has three special fields - Script , OnEquip_Script -and OnUnequip_Script. The first is script code run every time a character equips the item, -with the RID of the equipping character. Every time they unequip an item, all -temporary bonuses given by the script commands are cleared, and all the scripts -are executed once again to rebuild them. This also happens in several other -situations (like upon login) but the full list is currently unknown. +Each item in the item database has three special fields - Script, +OnEquip_Script and OnUnequip_Script. The first is script code run every +time a character equips the item, with the RID of the equipping character. +Every time they unequip an item, all temporary bonuses given by the script +commands are cleared, and all the scripts are executed once again to +rebuild them. This also happens in several other situations (like upon +login) but the full list is currently unknown. -OnEquip_Script is a piece of script code run whenever the item is used by a character -by double-clicking on it. OnUnequip_Script runs whenever the -equipment is unequip by a character +OnEquip_Script is a piece of script code run whenever the item is used by +a character by double-clicking on it. OnUnequip_Script runs whenever the +equipment is unequipped by a character. -Not all script commands work properly in the item scripts. Where commands and -functions are known to be meant specifically for use in item scripts, they are -described as such. +Not all script commands work properly in the item scripts. Where commands +and functions are known to be meant specifically for use in item scripts, +they are described as such. Every pet in the pet database has a PetScript field, which determines pet -behavior. It is invoked wherever a pet of the specified type is spawned. -(hatched from an egg, or loaded from the char server when a character who had -that pet following them connects) This may occur in some other situations as -well. Don't expect anything other than commands definitely marked as usable in -pet scripts to work in there reliably. +behavior. It is invoked wherever a pet of the specified type is spawned +(hatched from an egg, or loaded from the char server when a character who +had that pet following them connects). This may occur in some other +situations as well. Don't expect anything other than commands definitely +marked as usable in pet scripts to work in there reliably. Numbers ------- -Beside the common decimal numbers, which are nothing special whatsoever (though -do not expect to use fractions, since ALL numbers are integer in this language), -the script engine also handles hexadecimal numbers, which are otherwise -identical. Writing a number like '0x' will make it recognized as a -hexadecimal value. Notice that 0x10 is equal to 16. Also notice that if you try -to 'mes 0x10' it will print '16'. +Beside the common decimal numbers, which are nothing special whatsoever +(though do not expect to use fractions, since ALL numbers are integer in +this language), the script engine also handles hexadecimal numbers, which +are otherwise identical. Writing a number like '0x' will make +it recognized as a hexadecimal value. Notice that 0x10 is equal to 16. +Also notice that if you try to 'mes 0x10' it will print '16'. This is not used much, but it pays to know about it. Variables --------- -The meat of every programming language is variables - places where you store -data. +The meat of every programming language is variables - places where you +store data. -In the Hercules scripting language, variable names are not case sensitive. +In Hercules scripting language, variable names are not case sensitive. Variables are divided into and uniquely identified by the combination of: prefix - determines the scope and extent (or lifetime) of the variable @@ -423,51 +434,45 @@ permanent - They still exist when the server resets. temporary - They cease to exist when the server resets. Prefix: scope and extent -nothing - A permanent variable attached to the character, the default variable - type. They are stored with all the account data in "save\athena.txt" - in TXT versions and in the SQL versions in the `global_reg_value` - table using type 3. -"@" - A temporary variable attached to the character. - SVN versions before 2094 revision and RC5 version will also treat - 'l' as a temporary variable prefix, so beware of having variable - names starting with 'l' if you want full backward compatibility. -"$" - A global permanent variable. - They are stored in "save\mapreg.txt" or database table `mapreg`, - depending on server type. +nothing - A permanent variable attached to the character, the default + variable type. They are stored with all the account data in the + `global_reg_value` table using type 3. +"@" - A temporary variable attached to the character. + They disappear when the character logs out. +"$" - A global permanent variable. + They are stored in database table `mapreg`. "$@" - A global temporary variable. - This is important for scripts which are called with no RID + Thhey are important for scripts which are called with no RID attached, that is, not triggered by a specific character object. "." - A NPC variable. - They exist in the NPC and disappear when the server restarts or the - NPC is reloaded. Can be accessed from inside the NPC or by calling - 'getvariableofnpc'. Function objects can also have .variables which - are accessible from inside the function, however 'getvariableofnpc' - does NOT work on function objects. + They exist in the NPC and disappear when the server restarts or + the NPC is reloaded. Can be accessed from inside the NPC or by + calling 'getvariableofnpc'. Function objects can also have + .variables which are accessible from inside the function, + however 'getvariableofnpc' does NOT work on function objects. ".@" - A scope variable. - They are unique to the instance and scope. Each instance has it's - own scope that ends when the script ends. Calling a function with - callsub/callfunc starts a new scope, returning from the function - ends it. When a scope ends, it's variables are converted to values - ('return .@var;' returns a value, not a reference). -"'" - An instance variable - These are used with the instancing system, and are unique to each - party's instance. + They are unique to the instance and scope. Each instance has + its own scope that ends when the script ends. Calling a + function with callsub/callfunc starts a new scope, returning + from the function ends it. When a scope ends, it's variables + are converted to values ('return .@var;' returns a value, not a + reference). +"'" - An instance variable. + These are used with the instancing system, and are unique to + each party's instance. "#" - A permanent local account variable. - They are stored with all the account data in "save\accreg.txt" in - TXT versions and in the SQL versions in the 'global_reg_value' - table using type 2. -"##" - A permanent global account variable stored by the login server. - They are stored in "save\account.txt" and in the SQL versions in the - 'global_reg_value' table, using type 1. The only difference you will - note from normal # variables is when you have multiple char-servers - connected to the same login server. The # variables are unique to - each char-server, while the ## variables are shared by all these - char-servers. + They are stored in the 'global_reg_value' table using type 2. +"##" - A permanent global account variable stored by the login server. + They are stored in the 'global_reg_value' table, using type 1. + The only difference you will note from normal # variables is + when you have multiple char-servers connected to the same + login-server. The # variables are unique to each char-server, + while the ## variables are shared by all these char-servers. Postfix: integer or string -nothing - integer variable, can store positive and negative numbers, but only - whole numbers (so don't expect to do any fractional math) -'$' - string variable, can store text +nothing - integer variable, can store positive and negative numbers, but + only whole numbers (so don't expect to do any fractional math). +'$' - string variable, can store text. Examples: name - permanent character integer variable @@ -490,14 +495,15 @@ $@name$ - temporary global string variable If a variable was never set, it is considered to equal zero for integer variables or an empty string ("", nothing between the quotes) for string variables. Once you set it to that, the variable is as good as forgotten -forever, and no trace remains of it even if it was stored with character or -account data. +forever, and no trace remains of it even if it was stored with character +or account data. -Some variables are special, that is, they are already defined for you by the -scripting engine. You can see the full list somewhere in 'db/const.txt', which -is a file you should read, since it also allows you to replace lots of numbered -arguments for many commands with easier to read text. The special variables most -commonly used are all permanent character-based variables: +Some variables are special, that is, they are already defined for you by +the scripting engine. You can see the full list somewhere in +'db/const.txt', which is a file you should read, since it also allows you +to replace lots of numbered arguments for many commands with easier to +read text. The special variables most commonly used are all permanent +character-based variables: Zeny - Amount of Zeny. Hp - Current amount of hit points. @@ -510,48 +516,51 @@ BaseLevel - Character's base level. JobLevel - Character's job level. BaseExp - Amount of base experience points. JobExp - Amount of job experience points. -NextBaseExp - Amount of base experience points needed to reach the next level. -NextJobExp - Amount of job experience points needed to reach the next level. +NextBaseExp - Amount of base experience points needed to reach next level. +NextJobExp - Amount of job experience points needed to reach next level. Weight - Amount of weight the character currently carries. MaxWeight - Maximum weight the character can carry. Sex - 0 if female, 1 if male. Class - Character's job. -Upper - 0 if the character is a normal class, 1 if advanced, 2 if baby. +Upper - 0 if the character is normal class, 1 if advanced, 2 if baby. BaseClass - The character's 1-1 'normal' job, regardless of Upper value. - For example, this will return Job_Acolyte for Acolyte, Priest/Monk, - High Priest/Champion, and Arch Bishop/Sura. If the character has not - reached a 1-1 class, it will return Job_Novice. + For example, this will return Job_Acolyte for Acolyte, + Priest/Monk, High Priest/Champion, and Arch Bishop/Sura. + If the character has not reached a 1-1 class, it will return + Job_Novice. BaseJob - The character's 'normal' job, regardless of Upper value. For example, this will return Job_Acolyte for Acolyte, Baby Acolyte, and High Acolyte. -Karma - The character's karma. Karma system is not fully functional, but - this doesn't mean this doesn't work at all. Not tested. -Manner - The character's manner rating. Becomes negative if the player - utters words forbidden through the use of 'manner.txt' client-side - file. - -While these behave as variables, do not always expect to just set them - it is -not certain whether this will work for all of them. Whenever there is a command -or a function to set something, it's usually preferable to use that instead. The -notable exception is Zeny, which you can and often will address directly - -setting it will make the character own this number of Zeny. -If you try to set Zeny to a negative number, the script will be terminated with an error. +Karma - The character's karma. Karma system is not fully functional, + but this doesn't mean this doesn't work at all. Not tested. +Manner - The character's manner rating. Becomes negative if the + player utters words forbidden through the use of + 'manner.txt' client-side file. + +While these behave as variables, do not always expect to just set them - +it is not certain whether this will work for all of them. Whenever there +is a command or a function to set something, it's usually preferable to +use that instead. The notable exception is Zeny, which you can and often +will address directly - setting it will make the character own this number +of Zeny. If you try to set Zeny to a negative number, the script will be +terminated with an error. Assigning variables --------- --------- -Variables can be accessed and assigned values directly without the use of the built-in -'set' function. This means that variables can be accessed and modified much like other -programming languages. +Variables can be accessed and assigned values directly without the use of +the built-in 'set' function. This means that variables can be accessed and +modified much like other programming languages. @x = 100; @x = @y = 100; -Support for modifying variable values using 'set' is still supported (and required -to exist for this new method to work) so previous scripts will continue to work. +Support for modifying variable values using 'set' is still supported (and +required to exist for this method to work) so previous scripts will +continue working. -When assigning values, all operator methods are supported which exist in the below -'Operators' section. For instance: +When assigning values, all operator methods are supported which exist in +the below 'Operators' section. For instance: @x += 100; @x -= 100; @@ -561,58 +570,59 @@ When assigning values, all operator methods are supported which exist in the bel @x >>= 2; @x <<= 2; -Will all work. For more information on available operators, see the Operators section -described below. All operators listed there may be placed in-front of the '=' sign -when modifying variables to perform the action as required. +Will all work. For more information on available operators, see the +Operators section described below. All operators listed there may be +placed in-front of the '=' sign when modifying variables to perform the +action as required. Note: - !! Currently the scripting engine does not support directly copying array variables. - !! In order to copy arrays between variables the use of 'copyarray' function is still - !! required. + !! Currently the scripting engine does not support directly copying array + !! variables. In order to copy arrays between variables the use of + !! 'copyarray' function is still required. Strings ------- -To include symbol '"' in a string you should use prefix '\"' +To include symbol '"' in a string you should use prefix '\"'. Arrays ------ -Arrays (in Hercules at least) are essentially a set of variables going under the -same name. You can tell between the specific variables of an array with an -'array index', a number of a variable in that array: +Arrays (in Hercules at least) are essentially a set of variables going +under the same name. You can tell between the specific variables of an +array with an 'array index', a number of a variable in that array: [] -Variables stored in this way, inside an array, are also called 'array elements'. -Arrays are specifically useful for storing a set of similar data (like several -item IDs for example) and then looping through it. You can address any array -variable as if it was a normal variable: +Variables stored in this way, inside an array, are also called 'array +elements'. Arrays are specifically useful for storing a set of similar +data (like several item IDs for example) and then looping through it. You +can address any array variable as if it was a normal variable: set @arrayofnumbers[0],1; -You can also do sneaky things like using a variable (or an expression, or even a -value from an another array) to get at an array value: +You can also do sneaky things like using a variable (or an expression, or +even a value from an another array) to get at an array value: set @x,100; set @arrayofnumbers[@x],10; This will make @arrayofnumbers[100] equal to 10. -Notice that index numbering always starts with 0. Arrays cannot hold more than -128 variables. (So the last one can't have a number higher than 127) +Notice that index numbering always starts with 0. Arrays cannot hold more +than 128 variables (so the last one can't have a number higher than 127). -And array indexes probably can't be negative. Nobody tested what happens when -you try to get a negatively numbered variable from an array, but it's not going -to be pretty. :) +And array indexes probably can't be negative. Nobody tested what happens +when you try to get a negatively numbered variable from an array, but it's +not going to be pretty. :) Arrays can naturally store strings: -@menulines$[0] is the 0th element of the @menulines$ array of strings. Notice -the '$', normally denoting a string variable, before the square brackets that -denotes an array index. +@menulines$[0] is the 0th element of the @menulines$ array of strings. +Notice the '$', normally denoting a string variable, before the square +brackets that denotes an array index. Resume of the allowed variable and array scopes ------ -- --- ------- -------- --- ----- ------ @@ -659,12 +669,13 @@ Variable References Operators --------- -Operators are things you can do to variables and numbers. They are either the -common mathematical operations or conditional operators +Operators are things you can do to variables and numbers. They are either +the common mathematical operations or conditional operators: -+ - will add two numbers. If you try to add two strings, the result will be a - string glued together at the +. You can add a number to a string, and the - result will be a string. No other math operators work with strings. ++ - will add two numbers. If you try to add two strings, the result will + be a string glued together at the +. You can add a number to a string, + and the result will be a string. No other math operators work with + strings. - - will subtract two numbers. * - will multiply two numbers. / - will divide two numbers. Note that this is an integer division, i.e. @@ -672,20 +683,22 @@ common mathematical operations or conditional operators % - will give you the remainder of the division. 7%2 is equal to 1. There are also conditional operators. This has to do with the conditional -command 'if' and they are meant to return either 1 if the condition is satisfied -and 0 if it isn't. (That's what they call 'boolean' variables. 0 means 'False'. -Anything except the zero is 'True' Odd as it is, -1 and -5 and anything below -zero will also be True.) - -You can compare numbers to each other and you compare strings to each other, but -you can not compare numbers to strings. - - == - Is true if both sides are equal. For strings, it means they are the same. - >= - True if the first value is equal to, or greater than, the second value. - <= - True if the first value is equal to, or less than, the second value - > - True if the first value greater than the second value - < - True if the first value is less than the second value - != - True if the first value IS NOT equal to the second one +command 'if' and they are meant to return either 1 if the condition is +satisfied and 0 if it isn't. That's what they call 'boolean' variables. 0 +means 'False'. Anything except the zero is 'True'. Odd as it is, -1 and -5 +and anything below zero will also be True.) + +You can compare numbers to each other and you compare strings to each +other, but you can not compare numbers to strings. + + == - Is true if both sides are equal. For strings, it means they contain + the same value. + >= - True if the first value is equal to, or greater than, the second + value. + <= - True if the first value is equal to, or less than, the second value. + > - True if the first value greater than the second value. + < - True if the first value is less than the second value. + != - True if the first value IS NOT equal to the second one. Examples: @@ -693,9 +706,9 @@ Examples: 1<2 is True while 1>2 is False. @x>2 is True if @x is equal to 3. But it isn't true if @x is 2. -Only '==' and '!=' have been tested for comparing strings. Since there's no way -to code a seriously complex data structure in this language, trying to sort -strings by alphabet would be pointless anyway. +Only '==' and '!=' have been tested for comparing strings. Since there's +no way to code a seriously complex data structure in this language, trying +to sort strings by alphabet would be pointless anyway. Comparisons can be stacked in the same condition: @@ -711,34 +724,38 @@ Logical bitwise operators work only on numbers, and they are the following: << - Left shift. >> - Right shift. - Left shift moves the binary 1(s) of a number n positions to the left, - which is the same as multiplying by 2, n times. - In the other hand, Right shift moves the binary 1(s) of a number n positions - to the right, which is the same as dividing by 2, n times. + Left shift moves the binary 1(s) of a number n positions to the left, + which is the same as multiplying by 2, n times. + In the other hand, Right shift moves the binary 1(s) of a number n + positions to the right, which is the same as dividing by 2, n times. Example: set b,2; set a, b << 3; mes a; set a, a >> 2; mes a; - The first mes command would display 16, which is the same as 2 x (2 x 2 x 2) = 16. - The second mes command would display 4, which is the same as 16 / 2 = 8. 8 / 2 = 4. + The first mes command would display 16, which is the same as: + 2 x (2 x 2 x 2) = 16. + The second mes command would display 4, which is the same as: + 16 / 2 = 8; 8 / 2 = 4. & - And. | - Or. - The bitwise operator AND (&) is used to test two values against each other, - and results in setting bits which are active in both arguments. This can - be used for a few things, but in Hercules this operator is usually used to - create bit-masks in scripts. + The bitwise operator AND (&) is used to test two values against each + other, and results in setting bits which are active in both arguments. + This can be used for a few things, but in Hercules this operator is + usually used to create bit-masks in scripts. - The bitwise operator OR (|)sets to 1 a binary position if the binary position - of one of the numbers is 1. This way a variable can hold several values we can check, - known as bit-mask. A variable currently can hold up to 32 bit-masks (from position 0 - to position 1). This is a cheap(skate) and easy way to avoid using arrays to store several checks - that a player can have. + The bitwise operator OR (|) sets to 1 a binary position if the binary + position of one of the numbers is 1. This way a variable can hold + several values we can check, known as bit-mask. A variable currently + can hold up to 32 bit-masks (from position 0 to position 1). This is a + cheap(skate) and easy way to avoid using arrays to store several + checks that a player can have. - A bit-mask basically is (ab)using the variables bits to set various options in - one variable. With the current limit if variables it is possible to store 32 - different options in one variable (by using the bits on position 0 to 31). + A bit-mask basically is (ab)using the variables bits to set various + options in one variable. With the current limit in variables it is + possible to store 32 different options in one variable (by using the + bits on position 0 to 31). Example(s): - Basic example of the & operator, bit example: @@ -746,56 +763,60 @@ Logical bitwise operators work only on numbers, and they are the following: Why? : 10 = 2^1 + 2^3 (2 + 8), so in bits, it would be 1010 2 = 2^1 (2), so in bits (same size) it would be 0010 - The & (AND) operator sets bits which are active (1) in both arguments, so in the - example 1010 & 0010, only the 2^1 bit is active (1) in both. Resulting in the bit - 0010, which is 2. + The & (AND) operator sets bits which are active (1) in both + arguments, so in the example 1010 & 0010, only the 2^1 bit is + active (1) in both. Resulting in the bit 0010, which is 2. - Basic example of creating and using a bit-mask: - set @options,2|4|16; //(note: this is the same as 2+4+16, or 22) - if (@options & 1) mes "Option 1 is activated"; + set @options,2|4|16; // (note: this is the same as 2+4+16, or 22) + if (@options & 1) mes "Option 1 is activated"; if (@options & 2) mes "Option 2 is activated"; if (@options & 4) mes "Option 3 is activated"; if (@options & 8) mes "Option 4 is activated"; if (@options & 16) mes "Options 5 is activated"; - This would return the messages about option 2, 3 and 5 being shown (since we've set - the 2,4 and 16 bit to 1). + This would return the messages about option 2, 3 and 5 being shown + (since we've set the 2,4 and 16 bit to 1). ^ - Xor. - The bitwise operator XOR (eXclusive OR) sets a binary position to 0 if both - numbers have the same value in the said position. On the other hand, it - sets to 1 if they have different values in the said binary position. - This is another way of setting and unsetting bits in bit-masks. + The bitwise operator XOR (eXclusive OR) sets a binary position to 0 if + both numbers have the same value in the said position. On the other + hand, it sets to 1 if they have different values in the said binary + position. This is another way of setting and unsetting bits in + bit-masks. Example: - First let's set the quests that are currently in progress: set inProgress,1|8|16; // quest 1,8 and 16 are in progress - After playing for a bit, the player starts another quest: if( inProgress&2 == 0 ){ - // this will set the bit for quest 2 (inProgress has that bit set to 0) + // this will set the bit for quest 2 (inProgress has that bit + // set to 0) set inProgress,inProgress^2; mes "Quest 2: find a newbie and be helpful to him for an hour."; close; } - - After spending some time reading info on Xor's, the player finally completes quest 1: + - After spending some time reading info on Xor's, the player finally + completes quest 1: if( inProgress&1 && isComplete ){ - // this will unset the bit for quest 1 (inProgress has that bit set to 1) + // this will unset the bit for quest 1 (inProgress has that + // bit set to 1) set inProgress,inProgress^1; mes "Quest 1 complete!! You unlocked the secrets of the Xor dynasty, use them wisely."; close; } -Unary operators with only with a single number, which follows the operator, and -are following: +Unary operators with only with a single number, which follows the +operator, and are the following: - - Negation. - The sign of the number will be reversed. If the number was positive, it will - become negative and vice versa. + The sign of the number will be reversed. If the number was positive, + it will become negative and vice versa. Example: set .@myvar,10; mes "Negative 10 is "+(-.@myvar); ! - Logical Not. - Reverses the boolean result of an expression. True will become false and - false will become true. + Reverses the boolean result of an expression. True will become false + and false will become true. Example: if(!callfunc("F_dosomething")) @@ -805,15 +826,17 @@ are following: } ~ - Bitwise Not. - Reverses each bit in a number, also known as one's complement. Cleared bits - are set, and set bits are cleared. + Reverses each bit in a number, also known as one's complement. Cleared + bits are set, and set bits are cleared. Example: - - Ensure, that quest 2 is disabled, while keeping all other active, if they are. - set inProgress,inProgress&(~2); // same as set inProgress,inProgress&0xfffffffd + - Ensure, that quest 2 is disabled, while keeping all other active, if + they are. + set inProgress,inProgress&(~2); + // same as set inProgress,inProgress&0xfffffffd -Ternary operators take three expressions (numbers, strings or boolean), and are -following: +Ternary operators take three expressions (numbers, strings or boolean), +and are the following: ?: - Conditional operator Very useful e.g. to replace @@ -836,14 +859,14 @@ Within executable script code, some lines can be labels: