Jump to content

Pandaaa

Members
  • Content Count

    170
  • Joined

  • Last visited

Everything posted by Pandaaa

  1. then still you let us continue the cancellation request for the refund and disabled/cancelled the service we bought. not use it for whole 30 days? you shouldn't let the service be cancelled if you're saying "THE SERVICE WORKED AS INTENDED". (Service bought not even used for a week) ez 500 is real also they deleted my account on their site
  2. RAGNAHOSTING Ngayong araw yung pang 30th day ng refund na hinihinge namen hindi ma ibigay ang nakalagay sa ToS nila within 30 days well ang halaga ng iniscam neto halagang PhP 500.00 lang. Lagi akong nag Oopen ticket dahil na cclose ito kase walang response ang admin neto pagkatapos namin huminge ng refund. IMAGE
  3. Hello, Last time my server is still working then the next day i tried to compile it after adding @pk patch and remove it because it doesnt work and gives error then undo all the patch i made then this error give me.. (I can't run the login-server,char-serverm and map-server.exe) it says i need to compile it first... Error 1 error LNK1104: cannot open file '..\login-server.exe' C:\Users\D O N\Desktop\WarcraftRO (RPS) Creation\WarcraftRO Server (Hercules)\vcproj-12\LINK login-server Error 3 error LNK1104: cannot open file '..\char-server.exe' C:\Users\D O N\Desktop\WarcraftRO (RPS) Creation\WarcraftRO Server (Hercules)\vcproj-12\LINK char-server Error 4 error LNK1104: cannot open file '..\map-server.exe' C:\Users\D O N\Desktop\WarcraftRO (RPS) Creation\WarcraftRO Server (Hercules)\vcproj-12\LINK map-server
  4. I Got a msgstringtable.txt up to 2325 lines. how come i still get this thing?
  5. Found this script for @pk on and off and it says coded for hercules emulator then i tried it when compiling it gets me iTimer Error and flag error.. Heres the link or here's the patch.. how to make this thing work.. PK PATCH src/map/atcommand.c | 29 +++++++++++++++++++++++++++++ src/map/battle.c | 4 ++++ src/map/pc.c | 1 + src/map/pc.h | 2 ++ 4 files changed, 36 insertions(+) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 4a4487c..7f95b05 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5209,6 +5209,34 @@ static void get_jail_time(int jailtime, int* year, int* month, int* day, int* ho return true; } +ACMD(pkmode) { + + unsigned int tick = iTimer->gettick(); + + nullpo_retr(-1, sd); + + if( map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg || map[sd->bl.m].flag.gvg_castle || map[sd->bl.m].flag.gvg_dungeon ) { + clif->message(sd->fd, "You can only change your PK state on non-PVP maps."); + return false; + } + + if(DIFF_TICK(sd->pk_mode_tick,tick) > 0){ //check the delay before use this command again + clif->message(sd->fd, "You cannot turn OFF your PK state twice within just 15 minutes."); + return false; + } +else{ + if (!sd->state.pk_mode) { + sd->state.pk_mode = 1; + clif->message(sd->fd, "Your PK state is now OFF"); + sd->pk_mode_tick = tick + 0; //set the delay here + } else { + sd->state.pk_mode = 0; + clif->message(sd->fd, "Your PK state is now ON"); + sd->pk_mode_tick = tick + 1500000; //set the delay here + } +} + return true; +} /*========================================== * @dropall by [MouseJstr] @@ -9646,6 +9674,7 @@ void atcommand_basecommands(void) { ACMD_DEF(jail), ACMD_DEF(unjail), ACMD_DEF(jailfor), + ACMD_DEF2("pk",pkmode), ACMD_DEF(jailtime), ACMD_DEF(disguise), ACMD_DEF(undisguise), diff --git a/src/map/battle.c b/src/map/battle.c index 4a31a97..13241657 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5903,6 +5903,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( sd->state.monster_ignore && flag&BCT_ENEMY ) return 0; // Global inminuty only to Attacks + if( map[m].flag.pvp && sd->state.pk_mode && flag&BCT_ENEMY && s_bl->type != BL_MOB ) + return 0; if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma ) state |= BCT_ENEMY; // Characters with bad karma may fight amongst them if( sd->state.killable ) { @@ -5968,6 +5970,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f else return 0; // You can't target anything out of your duel } + else if( map[m].flag.pvp && sd->state.pk_mode && t_bl->type != BL_MOB ) + return 0; } if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM ) return 0; //If you don't belong to a guild, can't target emperium. diff --git a/src/map/pc.c b/src/map/pc.c index 044e555..edcd9f1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -638,6 +638,7 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo sd->state.active = 0; //to be set to 1 after player is fully authed and loaded. sd->bl.type = BL_PC; sd->canlog_tick = iTimer->gettick(); + sd->pk_mode_tick = iTimer->gettick(); //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; return 0; diff --git a/src/map/pc.h b/src/map/pc.h index 7db5c2f..2bb7749 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -167,6 +167,7 @@ struct map_session_data { unsigned int prerefining : 1; unsigned int workinprogress : 3; // 1 = disable skill/item, 2 = disable npc interaction, 3 = disable both unsigned int hold_recalc : 1; + unsigned int pk_mode : 1; } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; @@ -233,6 +234,7 @@ struct map_session_data { unsigned int canskill_tick; // used to prevent abuse from no-delay ACT files unsigned int cansendmail_tick; // [Mail System Flood Protection] unsigned int ks_floodprotect_tick; // [Kill Steal Protection] + unsigned int pk_mode_tick; struct { short nameid; unsigned int tick;
  6. Tried editing this any value.. how to make it 30mins only. //add time delay penalty. You can get another quest after 1 hour. [Lupus] set #THQ_DELAY,(gettime(DT_YEAR)*12*31*24+gettime(DT_MONTH)*31*24+gettime(DT_DAYOFMONTH)*24+gettime(DT_HOUR) + 1);
  7. Hello, In the default Token Quest, Delay is set for 2-3 hours and i made it 1 hour. But Is it possible to make it 30mins per quest? Here's my script i already changed the 2-3hours interval to 1 hour only.. //===== rAthena Script ======================================= //= Treasure Hunter Quests //===== By: ================================================== //= Fredzilla //===== Current Version: ===================================== //= 1.4 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Start for Treasure hunter quests //===== Additional Comments: ================================= //= Event_THQS - Used to check if you have already registered //= #Treasure_Token - used to keep track of tokens //= 1.0 - Straight conversionof Aegis NPC file //= 1.1 Added time penalty to prevent get quests to often [Lupus] //= 1.2 Fixed not working penalty, added anti-cheat [Lupus] //= 1.3 Changed some bad RGB Codes. (bugreport:211) [Samuray22] //= 1.4 Fixed typos. (bugreport:2607) [Kisuka] //============================================================ yuno_in01,112,151,6 script Quest Manager 1_M_SIZ,{ mes "[Guy]"; mes "Welcome to the Treasure Hunters Guild "+strcharinfo(0)+"."; next; if (On_Quest == 0) goto N_NewQuest; mes "[Guy]"; mes "Look " +strcharinfo(0)+ ", you can only 1 quest at a time, you should finish the quest unless you have given up."; mes "Giving up will cost you ^FF00002500z^000000."; next; menu "No, never would I leave a quest!",-,"Yah I'm pathetic... Pay 2500z",N_PayZeny; mes "[Guy]"; mes "Good well get back out there."; close; N_PayZeny: if (Zeny < 2500) goto N_ZenyFail; set one_qset, 0; set two_qset, 0; set three_qset, 0; set four_qset, 0; set five_qset, 0; set six_qset, 0; set seven_qset, 0; set eight_qset, 0; set nine_qset, 0; set ten_qset, 0; set On_Quest, 0; set Zeny,Zeny-2500; //add time delay penalty. You can get another quest after 1 hour. [Lupus] set #THQ_DELAY,(gettime(DT_YEAR)*12*31*24+gettime(DT_MONTH)*31*24+gettime(DT_DAYOFMONTH)*24+gettime(DT_HOUR) + 1); mes "[Guy]"; mes "Its sad to see someone give a quest up..."; mes "Shame on you."; emotion e_ag; close; N_ZenyFail: mes "[Guy]"; mes "Thats sad you don't even have ^FF00002500z^000000."; close; N_NewQuest: if (Event_THQS == 0) goto N_Signup; //checking if time penalty is over [Lupus] if (#THQ_DELAY > (gettime(DT_YEAR)*12*31*24 + gettime(DT_MONTH)*31*24 + gettime(DT_DAYOFMONTH)*24 + gettime(DT_HOUR)) ) goto L_NoQuestsForYet; mes "[Guy]"; mes "Ahh welcome fellow Treasure Hunter."; mes "You currently have ^FF0000"+#Treasure_Token+"^000000 treasure tokens!!!"; mes "Would you like me to asign you a Quest?"; next; menu "Yes I would like a Quest Please.",-,"Sorry Guy no time today.",N_NoTime; mes "[Guy]"; mes "Ok lets see what quest we can give you today."; mes "The quest names in ^FF0000This Colour^000000 mean that they are more challanging then the rest, but have better rewards."; next; set #THQ_DELAY,(gettime(DT_YEAR)*12*31*24+gettime(DT_MONTH)*31*24+gettime(DT_DAYOFMONTH)*24+gettime(DT_HOUR) + 1); //you can get another quest after 1 hour [Lupus] emotion e_no1; if(@treasure_job==0) set @treasure_job,rand(1,10); //doesn't allow cheaters to pick any quest they want if(@treasure_job==2) goto N_JobList2; if(@treasure_job==3) goto N_JobList3; if(@treasure_job==4) goto N_JobList4; if(@treasure_job==5) goto N_JobList5; if(@treasure_job==6) goto N_JobList6; if(@treasure_job==7) goto N_JobList7; if(@treasure_job==8) goto N_JobList8; if(@treasure_job==9) goto N_JobList9; if(@treasure_job==10) goto N_JobList10; goto N_JobList1; //if(@treasure_job==1) N_NoTime: mes "[Guy]"; mes "Alright maybe next time "+strcharinfo(0)+"."; emotion e_hmm; close; N_Signup: mes "[Guy]"; mes "I'm afraid you must sign up for the guild before you can go on a quest!"; emotion e_sry; close; L_NoQuestsForYet: mes "[Guy]"; mes "I'm afraid there aren't any Quests for you yet."; mes "Call in "+ (#THQ_DELAY - (gettime(DT_YEAR)*12*31*24+gettime(DT_MONTH)*31*24+gettime(DT_DAYOFMONTH)*24+gettime(DT_HOUR)) )+" hours later."; emotion e_sry; close; L_QuestGiven: set On_Quest,1; set @treasure_job,0; //next time u get random quest close; ///////Job list 1/////// N_JobList1: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Lost Old Man.",-,"Master needs his Bow.",N_MasterBow,"The Hit List.",N_HitList,"^FF0000The Sad Widow.^000000",N_SadWidow; mes "[Guy]"; mes "^FF0000Lost Old Man^000000"; mes "^FF0000------------^000000"; mes "This is an easy and low payed quest."; mes " "; mes "A wife came in asking us to find his husband, she seems to come in alot asking us to find him over and over again."; next; mes "[Guy]"; mes "But he always seems to be around the same place so there isn't much looking involved,check the mountains 1 west and 1 north of prontera."; set one_qset,1; goto L_QuestGiven; N_MasterBow: mes "[Guy]"; mes "^FF0000Master needs his Bow^000000"; mes "^FF0000--------------------^000000"; mes "This is just a package delivery run, no big deal or anything."; mes " "; mes "Take this to an archer in the Archer Village outside of Payon."; getitem 1072,1; //Delivery_Box set one_qset,2; goto L_QuestGiven; N_HitList: mes "[Guy]"; mes "^FF0000The Hit List^000000"; mes "^FF0000------------^000000"; mes "In this quest you get to see some action."; mes " "; mes "There has been a farmer that keeps having all his crops eaten by ^FF0000Thief Bugs, Porings, and Lunitics^000000 here is a lost of what I need you to do. He is waiting East of Prontera."; next; mes "[Guy]"; mes "Ok go to the east and bash those little bastards like there is no tommorow. When you are done with that list you have just discard it, but you will NOT get another one!."; set one_qset,3; goto L_QuestGiven; N_SadWidow: mes "^FF0000The Sad Widow^000000"; mes "^FF0000*************^000000"; mes "This is just another quest with possable well pay."; mes " "; mes "There is an old Widow in pontera, she recently lost her husband due to a monster attack.She has requested a Guild member to come talk to her at the Pontera Graveyard."; set one_qset,4; goto L_QuestGiven; ///////Job list 2/////// N_JobList2: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "The Strange Letter",-,"Jur for Jeramiah",N_JurJeramiah,"Bee Keepers Hunny",N_BeeHunny,"^FF0000The Wander Man^000000",N_WanderMan; mes "^FF0000The Strange Letter^000000"; mes "^FF0000------------------^000000"; mes "I do not know much about this quest."; mes " "; mes "A strange man came in here yesterday and asked me to deliver this ^FF0000Strange Letter^000000 to some woman in Morroc. Knowing us we do not ask questions so you must take care of this delivery."; mes "The Woman is in located in Morroc and her name is Erika."; getitem 1072,1; //Delivery_Message set two_qset, 1; goto L_QuestGiven; N_JurJeramiah: mes "^FF0000Jur for Jeramiah^000000"; mes "^FF0000----------------^000000"; mes "Standard delivery quest."; mes " "; mes "Jeramiah ordered a Special Jur from our weapon shop.Your Job is to deliver it to him in the Assasin Temple."; getitem 1998,1; //Jeramiah's_Jur set two_qset,2; goto L_QuestGiven; N_BeeHunny: mes "^FF0000Bee Keepers Hunny^000000"; mes "^FF0000-----------------^000000"; mes "Strange man in the marsh need your help."; mes " "; mes "There is a strange man in the forest in ^FF00001 south and 1 west^000000 of Prontera, he need your help with something."; set two_qset,3; goto L_QuestGiven; N_WanderMan: mes "^FF0000The Wander Man^000000"; mes "^FF0000**************^000000"; mes "There is a woman in Payon that is in desperate for aid."; mes " "; mes "There is a woman in Payon named Molly please get to her as soon as possable the letter she sent here sounded like someone was killing her."; set two_qset,4; goto L_QuestGiven; ///////Job list 3/////// N_JobList3: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Damn Pixies!",-,"Package Delivery",N_Delivery1,"Prontera Culvert",N_ProntCulvert,"^FF0000Trouble at the Coal Mine^000000",N_CoalMine; mes "^FF0000Damn Pixies!^000000"; mes "^FF0000------------^000000"; mes "Have you ever been to Hell?"; mes " "; mes "A man outside of ^FF0000Ant Hell^000000 has requested your audiance, I suggest you hurry."; set three_qset,1; goto L_QuestGiven; N_Delivery1: mes "^FF0000Package Delivery^000000"; mes "^FF0000----------------^000000"; mes "Standard drop off quest."; mes " "; mes "In this quest you need to deliver a mystery box to someone names ^FF0000Flank at the bridge between Aldebaran and Juno^000000."; getitem 1082,1; //Delivery_Box_ set three_qset,2; goto L_QuestGiven; N_ProntCulvert: mes "^FF0000Prontera Culvert^000000"; mes "^FF0000----------------^000000"; mes "The bugs,They are everywere!."; mes " "; mes "The ^FF0000Prontera Culvert^000000 is out of control!Sign up as a volenteer to clean out some of the culvert."; next; mes "I know it seems like there is no stoping them but however many you kill does makes a differance. After you have signed up, inside the Culvert there will be a Knight that will give you a quest."; set three_qset,3; goto L_QuestGiven; N_CoalMine: mes "^FF0000Trouble at the Coal Mine^000000"; mes "^FF0000************************^000000"; mes "The fun...err...trouble never stops in Rune Midgar."; mes " "; mes "Recently there was an acident at the coal mines. There was a huge chasm that released some undead Evil Druids."; next; mes "The Evil Druids started to turn all the workers into the undead. We do not know why, but we do not want to find out, contact a man named Rudolfo outside the Coal Mines."; set three_qset,4; goto L_QuestGiven; ///////Job list 4/////// N_JobList4: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Zombie Attack",-,"Mystic Wizard",N_MWizard,"Aww shoot!",N_Shoot,"^FF0000Emperium^000000",N_Emp; mes "^FF0000Zombie Attack^000000"; mes "^FF0000-------------^000000"; mes "The undead have invaded Payon Cave!"; mes " "; mes "I remember when Payon Cave used to be a safe place to visit, but now undead Zombies have infested the cave! Please contact ^FF0000Flora outside on Payon Cave^000000 and aid her."; set four_qset,1; goto L_QuestGiven; N_MWizard: mes "^FF0000Mystic Wizard^000000"; mes "^FF0000-------------^000000"; mes "Proto-type of a Staff must be delivered to Zed the Wizard."; mes " "; mes "Zed the Wizard has requested to try out a new un-named proto-type staff. It will be your job to deliver this to him. Zed tend to stay within the general area of Juno."; getitem 1999,1; //Zed's_Staff set four_qset,2; goto L_QuestGiven; N_Shoot: mes "^FF0000Aww shoot!^000000"; mes "^FF0000----------^000000"; mes "A little girl is in trouble."; mes " "; mes "There is a little girl in trouble, her name is Dassy and she is ^FF0000east of the prontera fountan^000000."; set four_qset,3; goto L_QuestGiven; N_Emp: mes "^FF0000Emperium^000000"; mes "^FF0000********^000000"; mes "This is a strange quest that I know little about."; mes " "; mes "Someone in ^FF0000Prontera Guild Hall^000000 has requested to see one of our members, his name is Czhore."; set four_qset,4; goto L_QuestGiven; ///////Job list 5/////// N_JobList5: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Savage Land",-,"Pyramid's part 1",N_PyrPRT1,"Thinking first",N_Thinkfirst,"^FF0000The not so friendly ghost^000000",N_Ghost; mes "^FF0000Savage Land^000000"; mes "^FF0000-----------^000000"; mes "Easy for some very hard for others."; mes " "; mes "A man named Lithin wish's to give you a quest, you can find him north of prontera inside of ^FF0000The Hidden Temple^000000"; set five_qset,1; goto L_QuestGiven; N_PyrPRT1: mes "^FF0000Pyramid's^000000"; mes "^FF0000---------^000000"; mes "Its funny cause no one knows how these were really made."; mes " "; mes "Aperently the Pyramids have are beganing to be infested with undead activity,outside the pyramids a man will be waiting for you. He did no give us his name but he asked for you to hurry."; set five_qset,2; goto L_QuestGiven; N_Thinkfirst: mes "^FF0000Thinking first^000000"; mes "^FF0000--------------^000000"; mes "This sounds like another one of those ditzy girl quests..."; mes " "; mes "Dazzy the local blond around Geffen has asked for you to deliver her these flowers. I don't know why someone would send flowers to herself..."; getitem 744,1; //Bouquet set five_qset,3; goto L_QuestGiven; N_Ghost: mes "^FF0000The not so friendly ghost^000000"; mes "^FF0000*************************^000000"; mes "Well no one ever said Casper was nice behind the sceens."; mes " "; mes "A wizard on the 3rd floor of geffen tower want's to talk to you about the anchient ruins underneath the city."; set five_qset,4; goto L_QuestGiven; ///////Job list 6/////// N_JobList6: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Package for thiefs",-,"Pyramid's part 2",N_PyrPRT2,"Special delivery",N_Delivery2,"^FF0000Geffenia^000000",N_Gef; mes "^FF0000Package for thiefs^000000"; mes "^FF0000------------------^000000"; mes "How ironic."; mes " "; mes "Deliver this Box to the Thiefs guild."; getitem 1083,1; //Delivery_Box__ set six_qset,1; goto L_QuestGiven; N_PyrPRT2: mes "^FF0000Pyramid's part 2^000000"; mes "^FF0000----------------^000000"; mes "More undead action in this triangle!"; mes " "; mes "Talk to a man outside the entrance of the pyramids, he seems to have another quest for you."; set six_qset,2; goto L_QuestGiven; N_Delivery2: mes "^FF0000Special delivery^000000"; mes "^FF0000----------------^000000"; mes "Well most of what we do is run packages, this is no different from other's."; mes " "; mes "Take this box, DO NOT OPEN IT! To a little girl in Lutie named Chirach she should be around santa."; getitem 1083,1; //Delivery_Box__ set six_qset,3; goto L_QuestGiven; N_Gef: mes "^FF0000Geffenia^000000"; mes "^FF0000********^000000"; mes "The little children of Geffen have been haveing strange nightmares."; mes " "; mes "We belive that the ruins underneath geffen are causeing this problem, talk to a Wizard named Zuuzuu inside Geffen Tower for your mission."; set six_qset,4; goto L_QuestGiven; ///////Job list 7/////// N_JobList7: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Apple Juice",-,"Delivery",N_Delivery3,"^FF0000Golden Thief Bug^000000",N_GTB,"^FF0000Evil Pirates^000000",N_EvilPirates; mes "^FF0000Apple Juice^000000"; mes "^FF0000-----------^000000"; mes "Can't say no to some good apple juice."; mes " "; mes "There is a little girl up in prontera Square a bit north from the fountain, go talk to her."; set seven_qset,1; goto L_QuestGiven; N_Delivery3: mes "^FF0000Delivery^000000"; mes "^FF0000--------^000000"; mes "So many packages so little time."; mes " "; mes "Take this box to a man in Alberta named Charles."; getitem 1082,1; //Delivery_Box_ set seven_qset,2; goto L_QuestGiven; N_GTB: mes "^FF0000Golden Thief Bug^000000"; mes "^FF0000****************^000000"; mes "The prontera Culvert has never been the same..."; mes " "; mes "Well there have been reports of a Golden Thief Bug running around the bottem on the Culvert. Talk to a Knight inside the Culvert."; set seven_qset,3; goto L_QuestGiven; N_EvilPirates: mes "^FF0000Evil Pirates^000000"; mes "^FF0000************^000000"; mes "A ghost ship has washed up on shore on an island outside of Izlude."; mes " "; mes "A female assasin has a quest for you, she is waiting outside the Ghost Ship.There have been reports of evil undead pirates lurking around inside the ship."; set seven_qset,4; goto L_QuestGiven; ///////Job list 8/////// N_JobList8: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Banana Juice",-,"Another Delivery",N_Delivery4,"My lost beeds",N_LostBeeds,"^FF0000Baphomet!^000000",N_Bapho; mes "^FF0000Banana Juice^000000"; mes "^FF0000------------^000000"; mes "Sound gross to some good to others."; mes " "; mes "There is a little girl up in prontera Square a bit north from the fountain, go talk to her."; set eight_qset,1; goto L_QuestGiven; N_Delivery4: mes "^FF0000Another Delivery^000000"; mes "^FF0000----------------^000000"; mes "Well yah box delivering is in high demand,lots of lazy people."; mes " "; mes "Take this package to a man in Morroc named Klye."; getitem 1081,1; //Delivery_Box set eight_qset,2; goto L_QuestGiven; N_Bapho: mes "^FF0000Baphomet!^000000"; mes "^FF0000*********^000000"; mes "Hidden in the Temple he watches and guards."; mes " "; mes "Rumor has it that a Goat Man is lurking in the Hidden Temple, There is also a man in the Hidden Temple names Zack that needs you help with this Goat Man known as Baphomet."; set eight_qset,3; goto L_QuestGiven; N_LostBeeds: mes "^FF0000My lost Beeds^000000"; mes "^FF0000-------------^000000"; mes "Oh great I smell stupidity..."; mes " "; mes "A little girl in Payon wants to talk to you, her name is Flower, What a stupid name,Hahaha."; set eight_qset,4; goto L_QuestGiven; ///////Job list 9/////// N_JobList9: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "Smelly Box",-,"Payon Cave",N_PayonC,"^FF0000Sohee's Everywere!^000000",N_Sohee,"^FF0000Moonlight Flower^000000",N_Moonlight; mes "^FF0000Smelly Box^000000"; mes "^FF0000----------^000000"; mes "Oh god please get this out of here fast."; mes " "; mes "Oh man smells like someone died in here.Take this to the Magic School in Geffen and hurry,ahh the smell its burning my eye's!!!"; getitem 1082,1; //Delivery_Box_ set nine_qset,1; goto L_QuestGiven; N_Sohee: mes "^FF0000Sohee's Everywere!^000000"; mes "^FF0000******************^000000" ; mes "Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House."; mes " "; mes "Well what we know about Payon is that a while ago there was a freak fire that burnt down the old school."; next; mes "The strange thing about what happened was that the children inside did not seem to die from the flames."; mes "Speak to the little school girl somewere in Payon."; set nine_qset,2; goto L_QuestGiven; N_Moonlight: mes "^FF0000Moonlight Flower^000000"; mes "^FF0000****************^000000" ; mes "Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House."; mes " "; mes "Well I don't know much about this, it has to do with the deepest reagions of Payon Cave, We don't know much because no one ever seems to make it back alive."; set nine_qset,3; goto L_QuestGiven; N_PayonC: mes "^FF0000Payon Cave^000000"; mes "^FF0000----------^000000" ; mes "Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House."; mes " "; mes "The farther we go into the cave the stranger it gets."; set nine_qset,4; goto L_QuestGiven; ///////Job list 10/////// N_JobList10: mes "[Guy]"; mes "Ok you have a couple quests that can be done here."; next; menu "The Blank Box",-,"^FF0000Eddga^000000",N_Eddga,"^FF0000Phreeoni^000000",N_Phreeoni,"^FF0000Maya^000000",N_Maya; mes "^FF0000The Blank Box^000000"; mes "^FF0000-------------^000000"; mes "Package to Morroc"; mes " "; mes "There is nothing writen on this box but a notice to deliver it to a man Kreg."; getitem 1082,1; //Delivery_Box_ set ten_qset,1; goto L_QuestGiven; N_Eddga: mes "^FF0000Eddga^000000"; mes "^FF0000*****^000000"; mes "Tony the Tiger is on crack and destroying the forest."; mes " "; mes "Talk to a man outside the 'Hidden' Hunter Guild, He needs your help."; set ten_qset,2; goto L_QuestGiven; N_Phreeoni: mes "^FF0000Phreeoni^000000"; mes "^FF0000********^000000"; mes "He is big and Pink and you run and hide!"; mes " "; mes "This guy just poped into some hole one day, He dosent look that tough but you would be supprised. Talk to a man named Caral outside of Ant Hell."; set ten_qset,3; goto L_QuestGiven; N_Maya: mes "^FF0000Maya^000000"; mes "^FF0000****^000000"; mes "Something scary!"; mes " "; mes "This half naked freak need an army to take down, now its your job, good luck. Meet a girl named Jeni outside of the back entrance to Ant Hell."; set ten_qset,4; goto L_QuestGiven; }
  8. I Found a script made from eathenaa... anyone can make it work for herc? prontera,156,122,4 script Stop the Clock 102,{ if(.game == 1 && stopped != 1) { set stopped, 1; set @stopped, .i; message strcharinfo(0), "You stopped the clock at "+@stopped+"."; if(.lowest > @stopped) { set .lowest, @stopped; set .winner$, strcharinfo(0); } end; } else if(.game == 1) { message strcharinfo(0), "You already stopped the clock."; end; } set .name$, "[Event Manager]"; set .menu$, "Times:Information:Price:Leave"; if(strcharinfo(0) == .winner$) { set stopped, 0; mes .name$; mes "Here you get your price."; mes "Your Price is:"; mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000"; getitem $prize_id, $prize_amount; set .winner$, ""; close; } if(stopped == 1) { set stopped, 0; mes .name$; mes "You activated your char for the next round."; close; } if(getgmlevel() > 60) set .menu$, .menu$ + ":StartGame:SetPrice"; mes .name$; mes "Welcome to the ^ff0000Stop the Clock^000000."; next; switch(select(.menu$)) { case 1: mes .name$; mes "^ff0000Stop the Clock^000000 starts each day at:"; mes "^00800015:00^000000, ^00800018:00^000000 and ^00800021:00^000000 o'clock."; close; case 2: mes .name$; mes "^ff0000Stop the Clock^000000"; mes "is a game where you need to"; mes "click on me exactly when the counter reached 0."; next; mes .name$; mes "It counts down from ^0080001000^000000 to ^ff00000^000000."; next; mes .name$; mes "To win, you need to have the ^ff0000closest value to 0^000000 but at least ^ff0000below 50^000000."; next; mes .name$; mes "The winner will recieve a prize."; mes "^ff0000Don't forget to talk to me after the Event is over,"; mes "to reset your counter to take part on the next event.^000000"; close; case 3: mes .name$; mes "The Price is:"; mes "^ff0000"+$prize_amount+" "+getitemname($prize_id)+"^000000"; close; case 4: close; case 5: sleep2 100; close2; goto l_start; end; case 6: mes .name$; mes "Enter the item id of the prize:"; input $prize_id; next; mes .name$; mes "Enter the amount if items the winner will recieve:"; input $prize_amount; next; mes .name$; mes "The price id is: ^ff0000"+$prize_id+"^000000"; mes "^008000("+getitemname($prize_id)+")^000000."; mes "The amount is: ^ff0000"+$prize_amount+"^000000."; close; } OnClock1500: OnClock1800: OnClock2100: l_start: announce "[Aline]: We are going to start an Stop the Clock Event in 1 Minute at Prontera!",bc_all; sleep2 30000; announce "[Aline]: We are going to start in 30 Seconds!",bc_all; sleep2 20000; announce "[Aline]: Hurry up! Event starts in 10 Seconds!",bc_all; sleep2 5000; announce "[Aline]: Get Ready only 5 seconds left!",bc_all; sleep2 5000; announce "[Aline]: START!!!",bc_all; sleep2 5000; set .winner$, ""; set .game, 1; set .lowest, 1000; for(set .i, 1000; .i > 300;set .i, .i - 100) { announce ":: "+.i+" ::",bc_blue|bc_area; misceffect 377; sleep2 1000; } for(set .i, 300; .i > 50;set .i, .i - 10) { announce ":: "+.i+" ::",bc_blue|bc_area; misceffect 377; sleep2 100; } for(set .i, 50; .i > 0;set .i, .i - 1) { announce ":: "+.i+" ::",bc_blue|bc_area; misceffect 377; sleep2 10; } set .game, 0; if(.winner$ == "") { announce "Nobody hit the clock at the right moment. There is no winner.",bc_blue; end; } announce .winner$+" won Stop the Clock. He stopped it at "+.lowest+".",bc_blue; sleep2 5000; announce .winner$+"Please talk to me to get your price.",bc_blue; sleep2 5000; announce "To activate your char for the next round, please talk to me, too.",bc_all; end; }
  9. Btw Rid, This plugin has a bug. If you do @pk using an Assassin Cross and use meteor assault. You damage yourself and the enemy. Lol LOL, This is a good news for me i thought my emulator is broken o-o Hmm.. Do you have a working @pk source patch?
  10. Yeah, It works like i was requesting but when 2 players use @pk on town maps They can attack each other on Town.. I want it that they can use on town maps but after activating it they can't attack in towns..
  11. How to make it choose map not random?
  12. My emulator is a PK type server, that's why pk off and on command is needed in my emulator.. also for newbie player who are still leveling.
  13. Bump anyone can add this to Hercules? this is what i am looking for.. /*=================================== * Main chat [LuzZza] * Usage: @main <on|off|message> *-----------------------------------*/ ACMD_FUNC(main) { if( message[0] ) { if(strcmpi(message, "on") == 0) { if(!sd->state.mainchat) { sd->state.mainchat = 1; clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated. } else { clif_displaymessage(fd, msg_txt(381)); // Main chat already activated. } } else if(strcmpi(message, "off") == 0) { if(sd->state.mainchat) { sd->state.mainchat = 0; clif_displaymessage(fd, msg_txt(382)); // Main chat has been disabled. } else { clif_displaymessage(fd, msg_txt(383)); // Main chat already disabled. } } else { if(!sd->state.mainchat) { sd->state.mainchat = 1; clif_displaymessage(fd, msg_txt(380)); // Main chat has been activated. } if (sd->sc.data[sC_NOCHAT] && sd->sc.data[sC_NOCHAT]->val1&MANNER_NOCHAT) { clif_displaymessage(fd, msg_txt(387)); return -1; } if ( battle_config.min_chat_delay ) { if( DIFF_TICK(sd->cantalk_tick, gettick()) > 0 ) return 0; sd->cantalk_tick = gettick() + battle_config.min_chat_delay; } // send the message using inter-server system intif_main_message( sd, message ); } } else { if(sd->state.mainchat) clif_displaymessage(fd, msg_txt(384)); // Main chat currently enabled. Usage: @main <on|off>, @main <message>. else clif_displaymessage(fd, msg_txt(385)); // Main chat currently disabled. Usage: @main <on|off>, @main <message>. } return 0; }
  14. Bump.. getting error while compiling Error 3 error C2039: 'flag' : is not a member of 'map_interface' \src\map\atcommand.c 4424 1 map-server Error 4 error C2039: 'flag' : is not a member of 'map_interface' \src\map\battle.c 6704 1 map-server Error 5 error C2039: 'flag' : is not a member of 'map_interface' \src\map\battle.c 6776 1 map-server
  15. Hello, Anyone can convert this @pk source modification by malufet? This PK has delay while using. Function: If 2 Players uses @pk on [Turn on the pk] They can hit each other.. While, If Player 1 uses @pk on and Player 2's pk is off, Player 1 can't hit Player 2 also Player 2 can't hit Player 1, because he is not in PK mode. pk_mod_rA_r16215.PATCH
  16. Hello, Anyone has a script that Refines +10 in Exchange of 1 TCG.. (Not +1 Refine per TCG) and it doesnt refine if equip already has refine.,
  17. It works <3 Thank you mmm, can you help me also adding breaker name in WoE SE? Woe script of SE. //================= Hercules Script ======================================= //= _ _ _ //= | | | | | | //= | |_| | ___ _ __ ___ _ _| | ___ ___ //= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| //= | | | | __/ | | (__| |_| | | __/\__ \ //= \_| |_/\___|_| \___|\__,_|_|\___||___/ //================= License =============================================== //= This file is part of Hercules. //= http://herc.ws - http://github.com/HerculesWS/Hercules //= //= Copyright © 2012-2015 Hercules Dev Team //= Copyright © Cookie //= Copyright © Euphy //= Copyright © Brian //= Copyright © Zephyrus //= Copyright © L0ne_W0lf //= //= Hercules is free software: you can redistribute it and/or modify //= it under the terms of the GNU General Public License as published by //= the Free Software Foundation, either version 3 of the License, or //= (at your option) any later version. //= //= This program is distributed in the hope that it will be useful, //= but WITHOUT ANY WARRANTY; without even the implied warranty of //= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //= GNU General Public License for more details. //= //= You should have received a copy of the GNU General Public License //= along with this program. If not, see <http://www.gnu.org/licenses/>. //========================================================================= //= War of Emperium SE - Template File //================= Description =========================================== //= Like agit_main, this file is required for SE castles to function. //================= Current Version ======================================= //= 1.4a //========================================================================= //== Core, triggers all other events ======================= - script Manager#template FAKE_NPC,{ OnAgitInit2: OnRecvCastle2: if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end; if (!getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) { donpcevent strnpcinfo(NPC_NAME)+"::OnStart"; // Monster spawns are identical for all castles. monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Evil Druid",1117,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Khalitzburg",1132,4; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Abysmal Knight",1219,3; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Executioner",1205,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Penomena",1216,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alarm",1193,18; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Clock",1269,9; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric Archer",1276,12; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Wanderer",1208,3; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alice",1275,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Bloody Knight",1268,2; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Dark Lord",1272,2; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Tower Keeper",1270,4; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),9) < 1) disablenpc "Kafra Employee#"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); end; OnAgitStart2: if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end; if (agitcheck2()) { maprespawnguildid strnpcinfo(NPC_NAME_HIDDEN),getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1),2; gvgon strnpcinfo(NPC_NAME_HIDDEN); donpcevent strnpcinfo(NPC_NAME)+"::OnStart"; } else for(.@i = 0; .@i<4; ++.@i) donpcevent "RL"+.@i+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable"; end; OnAgitEnd2: if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end; gvgoff strnpcinfo(NPC_NAME_HIDDEN); if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) { .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); killmonster strnpcinfo(NPC_NAME_HIDDEN),"Steward#"+.@str$+"::OnStartArena"; donpcevent strnpcinfo(NPC_NAME)+"::OnReset"; donpcevent "Steward#"+.@str$+"::OnStop"; } end; OnGuildBreak: if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end; killmonster strnpcinfo(NPC_NAME_HIDDEN),"gard1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied"; killmonster strnpcinfo(NPC_NAME_HIDDEN),"gard2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied"; disablenpc "Kafra Employee#"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); setcastledata strnpcinfo(NPC_NAME_HIDDEN),1,0; sleep 7000; announce "Guild Base ["+getcastlename(strnpcinfo(NPC_NAME_HIDDEN))+"] has been abandoned.",0; donpcevent strnpcinfo(NPC_NAME)+"::OnRecvCastle2"; end; OnStart: // $agit_ar0x[] - $agit_sc0x[] // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians // Settings for all but Summon Guardians: 0 = Okay | 1 = Destroyed | 2 = Repairing // Summon Guardians: 0 = Do not Summon | 1 = Summon if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) { setarray getd("$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"[0]"),0,0,0,0,0,0; donpcevent "df1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable"; donpcevent "df2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable"; for (.@i = 0; .@i<4; ++.@i) donpcevent "RL"+.@i+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable"; } OnEmpSpawn: .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); if (mobcount(strnpcinfo(NPC_NAME_HIDDEN),"Steward#"+.@str$+"::OnStartArena")) end; if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") setarray .@i[0],87,219; else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") setarray .@i[0],89,256; else setarray .@i[0],141,293; // Castles 3,4,5 are identical. } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") setarray .@i[0],162,193; else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") setarray .@i[0],338,202; else setarray .@i[0],120,272; // Castles 1,4,5 are identical. } monster strnpcinfo(NPC_NAME_HIDDEN),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+.@str$+"::OnStartArena"; end; OnReset: .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); donpcevent "df1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable"; donpcevent "df2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable"; donpcevent "gard1#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnReset"; donpcevent "gard2#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnReset"; donpcevent "1st Guardian Stone#"+.@str$+"::OnDisable"; donpcevent "2nd Guardian Stone#"+.@str$+"::OnDisable"; for(.@i = 1; .@i<4; ++.@i) donpcevent "Control Device0"+.@i+"#"+.@str$+"::OnDisable"; for(.@i = 0; .@i<4; ++.@i) donpcevent "RL"+.@i+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable"; if (agitcheck2()) setarray getd("$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"[0]"),0,0,1,1,1,0; end; OnChange: .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); setarray getd("$agit_"+.@str$+"[0]"),2,2,1,1,2,0; donpcevent strnpcinfo(NPC_NAME)+"::OnEmpSpawn"; donpcevent "Control Device03#"+.@str$+"::OnEnable"; donpcevent "1st Guardian Stone#"+.@str$+"::OnEnable"; donpcevent "2nd Guardian Stone#"+.@str$+"::OnEnable"; end; OnClock0001: // Spawn Treasure Chests based on castle economy. if (strnpcinfo(NPC_NAME_HIDDEN) == "template") end; if (!getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) end; killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnTreasureDied"; if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)) { .@Economy = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2); setcastledata strnpcinfo(NPC_NAME_HIDDEN),2,.@Economy+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)+(rand(2) && getgdskilllv(getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1),10014)); if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2) > 100) setcastledata strnpcinfo(NPC_NAME_HIDDEN),2,100; setcastledata strnpcinfo(NPC_NAME_HIDDEN),4,0; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)) { .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3); setcastledata strnpcinfo(NPC_NAME_HIDDEN),3,.@defence+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5); if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3) > 100) setcastledata strnpcinfo(NPC_NAME_HIDDEN),3,100; setcastledata strnpcinfo(NPC_NAME_HIDDEN),5,0; } .@Treasure = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2)/5+4; if (!.@Treasure) end; freeloop(1); if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") { .@treasurebox = 1943; setarray .@treasurex[0],251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258,251,252,253,254,255,256,257,258; setarray .@treasurey[0],369,369,369,369,368,368,368,368,367,367,367,367,366,366,366,366,365,365,365,365,364,364,364,364; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") { .@treasurebox = 1944; setarray .@treasurex[0],382,383,384,385,386,387,384,385,386,387,388,389,382,383,384,385,386,387,384,385,386,387,388,389; setarray .@treasurey[0],231,231,231,231,231,231,230,230,230,230,230,230,225,225,225,225,225,225,224,224,224,224,224,224; } else { // Castles 3,4,5 are identical, except 4's treasure. .@treasurebox = (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas04")?1946:1945; setarray .@treasurex[0],291,292,293,294,295,296,293,294,295,296,297,298,291,292,293,294,295,296,293,294,295,296,297,298; setarray .@treasurey[0],276,276,276,276,276,276,274,274,274,274,274,274,272,272,272,272,272,272,269,269,269,269,269,269; } } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") { .@treasurebox = 1939; setarray .@treasurex[0],249,250,251,252,253,246,247,248,249,250,250,251,252,253,246,247,248,249,250,249,250,251,252,253; setarray .@treasurey[0],378,378,378,378,378,376,376,376,376,376,374,374,374,374,372,372,372,372,372,370,370,370,370,370; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") { .@treasurebox = 1940; setarray .@treasurex[0],189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194,189,190,191,192,193,194; setarray .@treasurey[0], 21, 21, 21, 21, 21, 21, 19, 19, 19, 19, 19, 19, 17, 17, 17, 17, 17, 17, 15, 15, 15, 15, 15, 15; } else { // Castles 1,4,5 are identical, except treasures. if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas01") .@treasurebox = 1938; else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas04") .@treasurebox = 1941; else .@treasurebox = 1942; setarray .@treasurex[0],388,388,388,387,386,385,384,384,384,384,384,384,385,386,387,388,389,390,390,390,389,388,387,386; setarray .@treasurey[0],388,389,390,390,390,390,389,388,387,386,385,384,384,384,384,384,384,384,385,386,386,386,386,386; } } for(.@i = 0; .@i<4; ++.@i) monster strnpcinfo(NPC_NAME_HIDDEN),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(NPC_NAME)+"::OnTreasureDied"; for(.@i = 4; .@i<24; ++.@i) { if (.@Treasure < .@i+1) break; monster strnpcinfo(NPC_NAME_HIDDEN),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",(.@i%2)?.@treasurebox:1324,1,strnpcinfo(NPC_NAME)+"::OnTreasureDied"; } freeloop(0); end; OnTreasureDied: end; } //== Guild Manager ========================================= - script Steward#template FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_MAP),1); if (!.@GID) { mes "[ Steward ]"; mes "I await for the master"; mes "whom destiny will choose"; mes "for me. Do you think you"; mes "have to courage and strength"; mes "to conquer this stronghold?"; close; } if (getcharid(CHAR_ID_GUILD) != .@GID || strcharinfo(PC_NAME) != getguildmaster(.@GID)) { mes "[ Steward ]"; mes "Hmpf. Your threats don't"; mes "scare me! Guardians, drive"; mes "this infidel away from here!"; mes "I will always be loyal to the"; mes "master of this stronghold,"; mes "the one and only ^FF0000"+getguildmaster(.@GID)+"^000000."; close; } mes "[ Steward ]"; mes "Ah, Master ^FF0000"+getguildmaster(.@GID)+"^000000..."; mes "How shall I serve you today?"; mes "Was there an aspect of this"; mes "stronghold's maintenance"; mes "you wanted to discuss?"; next; switch(select("Stronghold Briefing", "Invest in Commercial Growth", "Invest in Defense growth", "Hire/Fire Storage Staff", "Go to Master's room")) { case 1: mes "[ Steward ]"; mes "The Commercial Growth"; mes "Level of the stronghold is ^0000ff"+getcastledata(strnpcinfo(NPC_MAP),2)+"."; if (getcastledata(strnpcinfo(NPC_MAP),4) > 0) { mes "Last time, you invested in"; mes "Commercial Growth "+getcastledata(strnpcinfo(NPC_MAP),4)+"."; } next; mes "[ Steward ]"; mes "Our stronghold's"; mes "safeguard level is "+getcastledata(strnpcinfo(NPC_MAP),3)+"."; if (getcastledata(strnpcinfo(NPC_MAP),5) > 0) { mes "Last time, you invested"; mes "in defense "+getcastledata(strnpcinfo(NPC_MAP),5)+" times."; } mes " "; mes "That is all, master."; close; case 2: .@Economy = getcastledata(strnpcinfo(NPC_MAP),2); setarray .@cost[0],5000,10000,20000,35000,55000,80000,110000,145000,185000,230000,280000,335000,395000,460000,530000,605000,685000,770000,860000,955000; .@j = 0; for(.@i = 6; .@i<101; .@i += 5) { if (.@Economy < .@i) { .@eco_invest = .@cost[.@j]; break; } ++.@j; } // Quadruple the cost of investing if you've already invested once. if (getcastledata(strnpcinfo(NPC_MAP),4)) .@eco_invest *= 4; mes "[ Steward ]"; mes "Raising the stronghold's"; mes "commercial growth will"; mes "increase the quantity of"; mes "goods produced for the guild."; mes "Investing in commercial growth"; mes "will help the guild's future."; next; mes "[ Steward ]"; mes "You can make one investment"; mes "each day, but if you can make"; mes "two investments if you pay"; mes "more Zeny: this will speed"; mes "up commercial development,"; mes "but can be quite expensive."; next; if (.@Economy == 100) { mes "[ Steward ]"; mes "However, our stronghold's"; mes "commerical growth level is"; mes "at 100%. It's not possible to"; mes "develop commercial growth"; mes "any further than that."; close; } if (getcastledata(strnpcinfo(NPC_MAP),4) >= 2) { mes "[ Steward ]"; mes "You've already made two"; mes "investments today, so you'll"; mes "have to wait until tomorrow"; mes "to make another investment."; close; } if (getcastledata(strnpcinfo(NPC_MAP),4) == 0) { mes "[ Steward ]"; mes "You must pay ^FF0000"+.@eco_invest+"^000000 Zeny"; mes "to make an investment"; mes "Will you invest in this"; mes "stronghold's commerical"; mes "development now?"; } else { mes "[ Steward ]"; mes "You must pay ^FF0000"+.@eco_invest+"^000000"; mes "more Zeny to make a second"; mes "investment today. Will you"; mes "invest one more time?"; } next; switch(select("Invest in Commercial Growth", "Cancel")) { case 1: if (getcastledata(strnpcinfo(NPC_MAP),4) >= 2) { mes "[ Steward ]"; mes "You've already made two"; mes "investments today, so you'll"; mes "have to wait until tomorrow"; mes "to make another investment."; close; } if (Zeny < .@eco_invest) { mes "[ Steward ]"; mes "I'm sorry, Master, but"; mes "you do not have enough"; mes "Zeny to make an investment"; mes "for the guild today."; close; } Zeny -= .@eco_invest; setcastledata strnpcinfo(NPC_MAP),4,getcastledata(strnpcinfo(NPC_MAP),4)+1; mes "[ Steward ]"; mes "A wise use of the guild's"; mes "funds, Master. We can expect"; mes "to see the results of this"; mes "investment by tomorrow."; close; case 2: mes "[ Steward ]"; mes "As you command, Master."; close; } case 3: .@defence = getcastledata(strnpcinfo(NPC_MAP),3); setarray .@cost[0],10000,20000,40000,70000,110000,160000,220000,290000,370000,460000,560000,670000,790000,920000,1060000,1210000,1370000,1540000,1720000,1910000; .@j = 0; for(.@i = 6; .@i<101; .@i += 5) { if (.@defence < .@i) { .@def_invest = .@cost[.@j]; break; } ++.@j; } // Quadruple the cost of investing if you've already invested once. if (getcastledata(strnpcinfo(NPC_MAP),5)) .@def_invest *= 4; mes "[ Steward ]"; mes "Investing in our stronghold's"; mes "defense will enhance the"; mes "durability of our Guardians"; mes "and the Emperium. We'll need"; mes "every advantage to protect"; mes "ourselves from our enemies."; next; mes "[ Steward ]"; mes "You can invest in defense"; mes "once per day, but if you pay"; mes "more Zeny, you can invest"; mes "a maximum of two times daily."; next; mes "[ Steward ]"; if (getcastledata(strnpcinfo(NPC_MAP),3) == 100) { mes "The Defense Level of this"; mes "stronghold is 100%, and"; mes "cannot be increased further."; close; } if (getcastledata(strnpcinfo(NPC_MAP),5) >= 2) { mes "Master, you've already"; mes "invested in Defense twice"; mes "today. You'll need to wait"; mes "until tomorrow if you really"; mes "want to increase our defenses."; close; } if (getcastledata(strnpcinfo(NPC_MAP),5) == 0) { mes "We need ^FF0000"+.@def_invest+"^000000"; mes "Zeny to invest in our"; mes "stronghold's defenses."; mes "Will you invest now?"; } else { mes "We need ^FF0000"+.@def_invest+"^000000"; mes "Zeny to invest in our"; mes "stronghold's defenses"; mes "a second time today."; mes "Will you invest now?"; } next; switch(select("Invest in Defense", "Cancel")) { case 1: if (getcastledata(strnpcinfo(NPC_MAP),5) >= 2) { mes "[ Steward ]"; mes "Master, you've already"; mes "invested in Defense twice"; mes "today. You'll need to wait"; mes "until tomorrow if you really"; mes "want to increase our defenses."; close; } if (Zeny < .@def_invest) { mes "[ Steward ]"; mes "I'm sorry, Master, but"; mes "you do not have enough"; mes "Zeny to make an investment"; mes "for the guild today."; close; } Zeny -= .@def_invest; setcastledata strnpcinfo(NPC_MAP),5,getcastledata(strnpcinfo(NPC_MAP),5)+1; mes "[ Steward ]"; mes "A wise use of the guild's"; mes "funds, Master. Increasing"; mes "the frequency of treasure"; mes "procured by the guild will"; mes "definitely help us all."; close; case 2: mes "[ Steward ]"; mes "As you command, Master."; close; } case 4: if (getcastledata(strnpcinfo(NPC_MAP),9) == 1) { mes "[ Steward ]"; mes "Do you wish to dismiss"; mes "the Kafra Employee that"; mes "we've hired for the guild?"; next; switch(select("Dismiss", "Cancel")) { case 1: cutin "kafra_01",2; mes "[ Hired Kafra Employee ]"; mes "Master, please reconsider!"; mes "I've been working very hard"; mes "for the success of the guild!"; mes "I'll try harder to serve the"; mes "guild members of this"; mes "stronghold, I promise!"; next; switch(select("Dismiss", "Cancel")) { case 1: mes "[ Hired Kafra Employee ]"; mes "Why?! What have I done"; mes "to deserve this? Waaah~!"; next; cutin "kafra_01",255; break; case 2: mes "[ Hired Kafra Employee ]"; mes "Thank you, Master!"; mes "I'll obey your every"; mes "command as best I can!"; mes "You won't regret this!"; close; } break; case 2: mes "[ Steward ]"; mes "She works very hard,"; mes "in my opinion. It was in"; mes "all of our best interests to"; mes "allow her to stay with us."; close; } disablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN); setcastledata strnpcinfo(NPC_MAP),9,0; mes "[ Steward ]"; mes "That Kafra Employee"; mes "has been dismissed."; mes "Were really dissatisfied"; mes "by the quality of her service?"; close; } else { mes "[ Steward ]"; mes "Will you hire a"; mes "Kafra Employee to serve"; mes "our stronghold? You must"; mes "pay ^FF000010,000 Zeny^000000 to hire one."; next; switch(select("Hire", "Cancel")) { case 1: if (getgdskilllv(.@GID,10001) == 0) { mes "[ Steward ]"; mes "Master, we cannot hire a"; mes "Kafra Employee because"; mes "you have not yet attained"; mes "the ^FF0000Contract with Kafra^000000"; mes "guild skill."; close; } if (Zeny < 10000) { mes "[ Steward ]"; mes "Master, we cannot hire a"; mes "Kafra Employee because"; mes "we do not have enough"; mes "funds to pay the contract fee."; close; } Zeny -= 10000; enablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN); setcastledata strnpcinfo(NPC_MAP),9,1; mes "[ Steward ]"; mes "Very well. We have formed"; mes "a contract with the Kafra"; mes "Head Office, and hired a"; mes "Kafra Employee for our"; mes "stronghold. Here she is~"; next; cutin "kafra_01",2; mes "[ Hired Kafra Employee ]"; mes "How do you do? I've"; mes "been dispatched by the"; mes "Kafra Head Office to"; mes "serve your guild's needs."; mes "I'll do my best to follow"; mes "your every command, Master."; next; cutin "kafra_01",255; mes "[ Steward ]"; mes "Our contract will expire"; mes "after one month, so we must"; mes "pay additional fees to keep"; mes "this Kafra Employee in"; mes "the service of our guild."; close; case 2: mes "[ Steward ]"; mes "As you command, Master."; mes "However, I suggest hiring"; mes "a Kafra Employee as soon"; mes "as possible since our guild"; mes "would greatly benefit from"; mes "the convenient Kafra services."; close; } } case 5: mes "[ Steward ]"; mes "Do you wish to enter the"; mes "Guild Treasure Room?"; mes "Only you, the Guild Master,"; mes "are permitted to enter."; next; mes "[ Steward ]"; mes "Please remember to open"; mes "the Treasure Boxes at the"; mes "proper time. Otherwise, the"; mes "treasure may disappear if"; mes "something unexpected happens."; next; switch(select("Go to Treasure Room", "Cancel")) { case 1: mes "[ Steward ]"; mes "Allow me to guide you"; mes "on the secret path to"; mes "the Treasure Room."; mes "Press the secret switch"; mes "when you wish to return here."; close2; if (compare(strnpcinfo(NPC_MAP),"arug")) { if (strnpcinfo(NPC_MAP) == "arug_cas01") setarray .@i[0],250,363; else if (strnpcinfo(NPC_MAP) == "arug_cas02") setarray .@i[0],382,227; else setarray .@i[0],292,266; // Castles 3,4,5 are identical. } else { if (strnpcinfo(NPC_MAP) == "schg_cas02") setarray .@i[0],249,373; else if (strnpcinfo(NPC_MAP) == "schg_cas03") setarray .@i[0],190,16; else setarray .@i[0],381,381; // Castles 1,4,5 are identical. } warp strnpcinfo(NPC_MAP),.@i[0],.@i[1]; end; case 2: mes "[ Steward ]"; mes "Items in the Treasure Room"; mes "are produced once each day."; mes "Therefore, you must obtain"; mes "the treasure items everyday."; mes "For the sake of the guild,"; mes "prioritize treasure harvesting!"; close; } } OnStop: awake strnpcinfo(NPC_NAME); end; OnStartArena: .@GID = getcharid(CHAR_ID_GUILD); .@region$ = (compare(strnpcinfo(NPC_MAP),"arug"))?"Valfreyja":"Nithafjoll"; // Lower castle Economy .@Economy = getcastledata(strnpcinfo(NPC_MAP),2)-5; if (.@Economy < 0) .@Economy = 0; setcastledata strnpcinfo(NPC_MAP),2,.@Economy; // Lower Castle Defence .@defence = getcastledata(strnpcinfo(NPC_MAP),3)-5; if (.@defence < 0) .@defence = 0; setcastledata strnpcinfo(NPC_MAP),3,.@defence; // Set new owner setcastledata strnpcinfo(NPC_MAP),1,.@GID; // Clear castle's data. for(.@i = 4; .@i<10; ++.@i) setcastledata strnpcinfo(NPC_MAP),.@i,0; // Disable Kafra disablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN); announce "The ["+getguildname(.@GID)+"] guild conquered the ["+.@region$+" "+charat(strnpcinfo(NPC_NAME_HIDDEN),3)+"] stronghold of "+getcastlename(strnpcinfo(NPC_MAP))+"!",bc_all|bc_woe; mapannounce strnpcinfo(NPC_MAP),"The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; donpcevent "Manager#"+strnpcinfo(NPC_MAP)+"::OnReset"; maprespawnguildid strnpcinfo(NPC_MAP),getcastledata(strnpcinfo(NPC_MAP),1),2; donpcevent "Manager#"+strnpcinfo(NPC_MAP)+"::OnRecvCastle2"; donpcevent "::OnRecvCastle"+ strtoupper( substr( strnpcinfo(NPC_NAME_HIDDEN), 0, 0 ) ) + substr( strnpcinfo(NPC_NAME_HIDDEN), 1, getstrlen( strnpcinfo(NPC_NAME_HIDDEN) ) -1 ); sleep 10000; if (agitcheck2()) { donpcevent "Manager#"+strnpcinfo(NPC_MAP)+"::OnChange"; mapannounce strnpcinfo(NPC_MAP),"Rebuild this stronghold's Guardian Stones and Fortress Gates to secure your guild's new aquisition!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; } end; } //== Castle Guardians ====================================== - script Guardian#template FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_MAP),1); .@n$ = "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; if (!.@GID) { mes .@n$; mes "Great job. Now, all you"; mes "need to do is destroy this"; mes "Emperium to gain ownership"; mes "over this stronghold."; close; } if (getcharid(CHAR_ID_GUILD) == .@GID) { if (strcharinfo(PC_NAME) != getguildmaster(.@GID)) { mes .@n$; mes "As guardian of this"; mes "stronghold, I answer only"; mes "to the master of the guild"; mes "that controls this place."; close; } else { if (!agitcheck2()) { mes .@n$; mes "I am "+strnpcinfo(NPC_NAME_VISIBLE)+", guardian of"; mes "this stronghold. For now,"; mes "all is quiet in this place."; next; switch(select("Converse", "Cancel")) { case 1: mes .@n$; mes "Do you have any questions"; mes "about this stronghold?"; next; switch(select("Guardian Stones", "Fortress Gates", "Link Flags", "Battle Strategy", "Cancel")) { case 1: mes .@n$; mes "There is one Emperium"; mes "and two Guardian Stones in"; mes "each fortress. These stones"; mes "are the first line of defense,"; mes "and must be destroyed before"; mes "enemies can even enter."; next; mes .@n$; mes "The stones are located in"; mes "^4D4DFFGate Houses^000000 which must be"; mes "protected to prevent enemies"; mes "from reaching the Emperium."; mes "Guardian Stones can ^4D4DFFrecall"; mes "your Guardians^000000 for protection."; next; mes .@n$; mes "Fortresses with higher levels"; mes "of defense can summon more"; mes "Guardians: this is why it is"; mes "so important for guilds to"; mes "invest in Defense Growth."; next; mes .@n$; mes "Guardian Stones that have"; mes "been destroyed can be revived"; mes "after a certain time, but one of the guild members must give"; mes "me the order. I can also report the status of the Guardian Stones."; close; case 2: mes .@n$; mes "^4D4DFFFortress Gates^000000 are the second line of guild stronghold defense,"; mes "and are protected by extra barricades activated by the Guardian Stones."; mes "These gates are located in three different parts of the fortress."; next; mes .@n$; mes "Barricades are protected by"; mes "Guardian Stones, and are"; mes "restored when the Guardian"; mes "Stones are retrieved. However,"; mes "it is not as easy to restore"; mes "destroyed Fortress Gates."; next; mes .@n$; mes "Fortress Gates can only be"; mes "restored when the ^4D4DFFguild"; mes "master of a stronghold"; mes "changes^000000, or if ^4D4DFFrestoration"; mes "is requested by the guild"; mes "master of the stronghold^000000."; close; case 3: mes .@n$; mes "Strongholds have many"; mes "Link Flags that allow you"; mes "to access vital areas within"; mes "restrictions placed by the"; mes "Barricades. Usually, ^4D4DFFFlag 1"; mes "links to the Gate House^000000."; next; mes .@n$; mes "Many flags link directly to"; mes "the flag near the Emperium."; mes "The final numbered flag is"; mes "linked to the Convenience"; mes "Facility of the stronghold's"; mes "owner. Keep this in mind."; close; case 4: mes .@n$; mes "Strategy? It would be better"; mes "to develop your battle plan to"; mes "exploit your guild's advantages"; mes "and your enemies' weaknesses."; mes "Use the Gate Houses and Barricades, and rebuild as quickly as you can!"; close; case 5: mes .@n$; mes "You have no questions"; mes "to ask of me? Well, I'm"; mes "here to serve your needs."; close; } case 2: mes .@n$; mes "I'm always here, so"; mes "feel free to request my"; mes "assistance whenever"; mes "the need arises."; close; } } else { mes .@n$; mes "Greetings, "+strcharinfo(PC_NAME)+"."; mes "What are your orders?"; next; switch(select("Increase Stronghold Defense", "Situational Briefing", "Cancel")) { case 1: if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[5]")) { if (getgdskilllv(.@GID,10002) == 0) { mes .@n$; mes "I'm sorry, but the Guardian"; mes "Stones aren't powerful enough"; mes "to summon Guardians yet. We"; mes "need to accumulate more"; mes "knowledge before they can"; mes "summon any Guardians."; close; } else { mes .@n$; mes "I shall endeavor to summon"; mes "a Guardian through a Guardian"; mes "Stone. However, keep in mind"; mes "that this will not work if the"; mes "Guardian Stone is destroyed."; setd "$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[5]",1; if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]")) donpcevent "gard1#"+strnpcinfo(NPC_MAP)+"::OnEnable"; if (!getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[1]")) donpcevent "gard2#"+strnpcinfo(NPC_MAP)+"::OnEnable"; close; } } else { mes .@n$; mes "You've already commanded"; mes "me to summon a Guardian"; mes "to defend the stronghold."; close; } case 2: mes .@n$; mes "Our defense status is..."; setarray .@status$[0],"^4D4DFFOperational","^FF0000Destroyed","^008000Repairing"; mes "1st Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]")]+"^000000"; mes "2nd Guardian Stone: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[1]")]+"^000000"; mes "1st Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[2]")]+"^000000"; mes "2nd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[3]")]+"^000000"; mes "3rd Fortress Gate: "+.@status$[getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[4]")]+"^000000"; close; case 3: mes .@n$; mes "I'll be standing by,"; mes "awaiting your orders."; close; } } } } else { mes .@n$; mes "Who are you? Scoundrel!"; mes "Leave this stronghold now!"; close; } OnInit: setarray getd("$agit_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),0,0,0,0,0,0; end; } //== Guild Kafras ========================================== - script Kafra#template FAKE_NPC,{ cutin "kafra_01",2; .@GID = getcastledata(strnpcinfo(NPC_MAP),1); if (getcharid(CHAR_ID_GUILD) == .@GID && getgdskilllv(.@GID,10001)) { mes "[Kafra Employee]"; mes "Welcome, proud member"; mes "of the ^FF0000"+getguildname(.@GID)+"^000000 Guild!"; mes "The Kafra Corporation is ready"; mes "to assist you wherever you go!"; next; switch(select("Use Storage", "Use Warp Service", "Rent Pushcart", "Cancel")) { case 1: if (basicskillcheck() && getskilllv("NV_BASIC") < 6) { mes "[Kafra Employee]"; mes "I'm so sorry, but you must"; mes "have at least Novice Skill"; mes "Lv.6 to use the Storage."; } else openstorage; break; case 2: mes "[Kafra Employee]"; mes "Please tell me your"; mes "Warp destination."; next; switch(select("Rachel -> 200 z", "Cancel")) { case 1: if (Zeny < 200) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't"; mes "have enough Zeny to pay"; mes "the warp fee. Would you"; mes "please check your funds again?"; close2; cutin "kafra_01",255; end; } Zeny -= 200; warp "rachel",115,125; end; case 2: cutin "kafra_01",255; break; } break; case 3: if (BaseClass != Job_Merchant) { mes "[Kafra Employee]"; mes "I'm sorry, but the Pushcart"; mes "rental service can only be"; mes "used by Merchant, Blacksmith,"; mes "and Alchemist class characters."; } else if (checkcart() == 1) { mes "[Kafra Employee]"; mes "Hm? You've already"; mes "rented a Pushcart."; } else { mes "[Kafra Employee]"; mes "The Pushcart rental fee"; mes "is 800 Zeny. Would you"; mes "like to rent a Pushcart?"; next; switch(select("Rent Pushcart", "Cancel")) { case 1: if (Zeny < 800) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't"; mes "have enough Zeny to rent"; mes "one of our Pushcarts."; close2; cutin "kafra_01",255; end; } Zeny -= 800; setcart; break; case 2: break; } } break; case 4: mes "[Kafra Employee]"; mes "Thank you for using the"; mes "Kafra Service. Wherever"; mes "you go, Kafra will be"; mes "there to support you!"; close2; cutin "kafra_01",255; end; } close2; cutin "kafra_01",255; end; } else { mes "[Kafra Employee]"; mes "I'm sorry, but I've been"; mes "exclusively contracted"; mes "to the members of the"; mes "^FF0000"+getguildname(.@GID)+"^000000 Guild."; mes "You'll have to ask another"; mes "Kafra Employee to help you..."; close2; cutin "kafra_01",255; end; } } //== Guardian Stones (2) =================================== - script Guardian Stone#template FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_MAP),1); .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),0)); .@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN); if (getcharid(CHAR_ID_GUILD) == .@GID) { mes "^3355FFYou will need the"; mes "following materials to"; mes "rebuild a destroyed"; mes "Guardian Stone.^000000"; next; mes "1 Oridecon"; mes "1 Elunium"; mes "30 Stones"; mes "5 Blue Gemstones"; mes "5 Yellow Gemstones"; mes "5 Red Gemstones"; next; mes "^3355FFDo you want to continue?^000000"; next; if(select("No", "Continue") == 1) { mes "^3355FFWork canceled.^000000"; close; } if ((countitem(Oridecon) > 0) && (countitem(Elunium) > 0) && (countitem(Stone) > 29) && (countitem(Blue_Gemstone) > 4) && (countitem(Yellow_Gemstone) > 4) && (countitem(Red_Gemstone) > 4)) { mes "^3355FFArrange Stones, Elunium, and"; mes "Oridecon, in that order, in the"; mes "center. Then you must arrange"; mes "the enchanted Gemstones to"; mes "rebuild the Guardian Stone.^000000"; next; setarray .@stone$[0],"Elunium","Oridecon","Stones"; .@i = select("Elunium", "Oridecon", "Stone")-1; if (.@i == 2) .@nice += 10; mes "^3355FF"+.@stone$[.@i]+" has been"; mes "placed in the center.^000000"; next; .@i = select("Elunium", "Oridecon", "Stone")-1; if (.@i == 0) .@nice += 10; mes "^3355FFYou have lined the"; mes "outside of the center"; mes "with some "+.@stone$[.@i]+".^000000"; next; .@i = select("Elunium", "Oridecon", "Stone")-1; if (.@i == 1) .@nice += 10; mes "^3355FFYou covered the"; mes "rest of the materials"; mes "with some "+.@stone$[.@i]+".^000000"; next; mes "^3355FFNow you need to arrange"; mes "the enchanted Gemstones"; mes "accordingly. You can identify"; mes "their Magic properties by"; mes "their casting effect.^000000"; next; setarray .@effect[0],56,54,225; setarray .@color$[0],"Red","Yellow","Blue"; while(1) { if (.@roof0 > 7) break; .@i = rand(3); specialeffect .@effect[.@i]; mes "^3355FFThe Gemstones must"; mes "be arranged in the correct"; mes "order according to their"; mes "magic properties and power.^000000"; next; .@j = select("Red Gemstone", "Yellow Gemstone", "Blue Gemstone")-1; mes "^3355FFYou placed the "+.@color$[.@j]+" Gemstone.^000000"; if (.@i == .@j) { mes "^3355FFHowever, the Guardian Stone"; mes "Repair System failed because"; mes "of a magic power conflict.^000000"; close; } .@nice += 10; ++.@roof0; specialeffect EF_STEAL; next; } if (.@nice > 90) { if (!getd(.@var$+"["+(.@num-1)+"]")) { mes "^3355FFThe Guardian Stone"; mes "Repair System has"; mes "already completed.^000000"; close; } else { if (!agitcheck2()) { mes "^3355FFIt is impossible to"; mes "rebuild the Guardian"; mes "Stone because the"; mes "Emperium is not present.^000000"; close; } else { mes "^3355FFThe Gemstones have been"; mes "arranged, and the Guardian"; mes "Stone is successfully repaired.^000000"; delitem Oridecon,1; delitem Elunium,1; delitem Stone,30; delitem Blue_Gemstone,5; delitem Yellow_Gemstone,5; delitem Red_Gemstone,5; close2; donpcevent "df"+.@num+"#"+strnpcinfo(NPC_MAP)+"::OnEnable"; specialeffect EF_ICECRASH; disablenpc strnpcinfo(NPC_NAME); setd .@var$+"["+(.@num-1)+"]",0; .@df_all = getd(.@var$+"[0]")+getd(.@var$+"[1]"); if (!.@df_all) { mapannounce strnpcinfo(NPC_MAP),"Both Guardian Stones have been erected, bolstering this stronghold's defenses!",bc_map,"0x00ff00"; donpcevent "RL0#"+strnpcinfo(NPC_MAP)+"::OnEnable"; } else mapannounce strnpcinfo(NPC_MAP),"The "+strnpcinfo(NPC_NAME_VISIBLE)+" has been repaired successfully.",bc_map,"0x00ff00"; if (getd(.@var$+"[5]") == 1) donpcevent "gard"+.@num+"#"+strnpcinfo(NPC_MAP)+"::OnEnable"; end; } } } else { mes "^3355FFAfter all of that work..."; mes "It looks like you failed"; mes "to fix the Guardian Stone,"; mes "and lost some materials.^000000"; delitem Stone,10; delitem Blue_Gemstone,2; delitem Yellow_Gemstone,2; delitem Red_Gemstone,2; close; } } else { mes "^3355FFYou don't have enough"; mes "materials to repair"; mes "the Guardian Stone.^000000"; close; } } end; OnInit: OnDisable: disablenpc strnpcinfo(NPC_NAME); end; OnEnable: enablenpc strnpcinfo(NPC_NAME); specialeffect EF_MAPPILLAR2; end; } //== Control Devices (3) =================================== - script Control#template FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_MAP),1); .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),15)); .@var$ = "$agit_"+strnpcinfo(NPC_NAME_HIDDEN); if (getcharid(CHAR_ID_GUILD) == .@GID) { if (strcharinfo(PC_NAME) == getguildmaster(.@GID)) { if (getd(.@var$+"["+(.@num+1)+"]") == 2) { mes "^3355FFDemolished Fortress"; mes "Gates can be repaired,"; mes "but you will need to gather"; mes "the following materials.^000000"; next; mes "^4D4DFF10 Steel^000000,"; mes "^4D4DFF30 Trunks^000000,"; mes "^4D4DFF5 Oridecon^000000, and"; mes "^4D4DFF10 Emveretarcon^000000."; next; select("Continue"); if ((countitem(Wooden_Block) > 29) && (countitem(Steel) > 9) && (countitem(Emveretarcon) > 9) && (countitem(Oridecon) > 4)) { mes "^3355FFYou will need Trunks to"; mes "repair the support frame,"; mes "Oridecon to enhance the"; mes "gate's endurance, and"; mes "Emveretarcon to basically"; mes "hold everything together.^000000"; next; .@ro_of01 = rand(10,15); while(1) { if (.@ro_of02 == .@ro_of01) break; else { switch(rand(1,4)) { case 1: mes "^3355FFThe support frame"; mes "is badly damaged:"; mes "fixing this part"; mes "is a top priority.^000000"; next; switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) { case 1: mes "^3355FFThe frame has been"; mes "reinforced with wood.^000000"; ++.@rp_temp; ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; case 2: mes "^3355FFYou tried using steel,"; mes "but it's not working very"; mes "well. You'll have to try"; mes "something else.^000000"; close; case 3: mes "^3355FFYou tried using emveretarcon"; mes "to reinforce the gate, but it's"; mes "not working well at all."; mes "You'll have to start over.^000000"; close; case 4: mes "^3355FFYou tried using oridecon,"; mes "but it's not working very"; mes "well. You'll have to try"; mes "something else.^000000"; close; } break; case 2: mes "^3355FFIt looks like the gate's"; mes "overall endurance needs to"; mes "be reinforced with something.^000000"; next; switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) { case 1: mes "^3355FFYou tried using wood"; mes "to reinforce the gate.^000000"; ++.@ro_of02; next; break; case 2: mes "^3355FFYou tried using steel"; mes "to reinforce the gate, but"; mes "it's not working well at all."; mes "You'll have to start over.^000000"; close; case 3: mes "^3355FFYou tried using emveretarcon"; mes "to reinforce the gate, but it's"; mes "not working well at all."; mes "You'll have to start over.^000000"; close; case 4: mes "^3355FFYou hammered the"; mes "oridecon: it looks"; mes "like this will work.^000000"; ++.@rp_temp; ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; } break; case 3: mes "^3355FFThe damage to the gate"; mes "has caused all these"; mes "cracks. You'll have to"; mes "weld them solid somehow.^000000"; next; switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) { case 1: mes "^3355FFYou tried using wood to fix"; mes "this problem, but it seems"; mes "to have made it worse."; mes "You'll have to start all over.^000000"; close; case 2: mes "^3355FFYou used steel to weld"; mes "all the cracks: the gate is"; mes "is starting to look more solid.^000000"; ++.@rp_temp; ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; case 3: mes "^3355FFYou tried using emveretarcon"; mes "to reinforce the gate, but it's"; mes "not working well at all."; mes "You'll have to start over.^000000"; close; case 4: mes "^3355FFYou tried using oridecon,"; mes "but it's not working very"; mes "well. You'll have to try"; mes "something else.^000000"; close; } break; case 4: mes "^3355FFNow you need to make"; mes "sure that the gate is held"; mes "together pretty solidly.^000000"; next; switch(select("Trunk", "Steel", "Emveretarcon", "Oridecon")) { case 1: mes "^3355FFYou tried using wood to fix"; mes "this problem, but it seems"; mes "to have made it worse."; mes "You'll have to start all over.^000000"; close; case 2: mes "^3355FFYou tried using steel,"; mes "but it's not working very"; mes "well. You'll have to try"; mes "something else.^000000"; close; case 3: mes "^3355FFYou successfully used"; mes "the emveretarcon to repair"; mes "much of the gate's damage.^000000"; ++.@rp_temp; ++.@ro_of02; specialeffect2 EF_REPAIRWEAPON; next; break; case 4: mes "^3355FFYou tried using oridecon,"; mes "but it's not working very"; mes "well. You'll have to try"; mes "something else.^000000"; close; } } } } mes "^3355FFWell, it looks like"; mes "you're just about done"; mes "with repairing the gate.^000000"; next; if (!agitcheck2()) { mes "^3355FFUnfortunately, the Fortress"; mes "Gate can't be reconstructed:"; mes "the Emperium is no longer here.^000000"; close; } else { if (.@rp_temp == .@ro_of01) { mes "^3355FFThe Fortress Gate has"; mes "been successfully repaired!^000000"; delitem Wooden_Block,30; delitem Steel,10; delitem Emveretarcon,10; delitem Oridecon,5; close2; donpcevent "RL"+.@num+"#"+strnpcinfo(NPC_MAP)+"::OnEnable"; disablenpc strnpcinfo(NPC_NAME); if (.@num == 1) .@str$ = "1st"; else if (.@num == 2) .@str$ = "2nd"; else if (.@num == 3) .@str$ = "3rd"; mapannounce strnpcinfo(NPC_MAP),"The "+.@str$+" Fortress Gate has been reconstructed!",bc_map,"0x00ff00"; if (.@num == 1) setd .@var$+"[2]",0; else { setarray getd(.@var$+"["+.@num+"]"),2,0; donpcevent "Control Device0"+(.@num-1)+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnEnable"; } end; } else { mes "^3355FFThe wall has been breached,"; mes "and the attempt to repair the"; mes "Fortress Gate has failed."; mes "You lost some of your"; mes "repair resources...^000000"; delitem Oridecon,2; delitem Steel,4; delitem Wooden_Block,14; delitem Emveretarcon,3; close; } } } else { mes "^3355FFYou can't attempt to repair"; mes "the Fortress Gate if you don't"; mes "have all the needed materials.^000000"; close; } } } } end; OnInit: OnDisable: disablenpc strnpcinfo(NPC_NAME); end; OnEnable: enablenpc strnpcinfo(NPC_NAME); end; } //== Guardian Summoners (2) ================================ - script gard#template FAKE_NPC,{ OnEnable: // .@x[i],.@y[i]: Normal coordinates, #0-21. // .@w[x],.@w[y]: Special coordinates if 'defence' is under 11. if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") { setarray .@w[0],195,250,292,188; setarray .x[0],233,252,232,201,224,196,269,252,201,224,222, 294,256,240,246,235,235,246,240,256,254,242; setarray .y[0], 83, 81,108,130,168,137, 89, 81,130,168,129, 210,203,133, 92,132,132, 92,133,203, 95,151; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") { setarray .@w[0],20,169,268,169; setarray .x[0],104,67,67,113,122,67, 90, 91,122, 20,67, 175,204,211,209,161,186,183,150,161,209,211; setarray .y[0], 32,36,85, 87,112,60,167,119,112,169,85, 31, 32, 63, 88, 91,170,121,110, 91, 88, 63; } else { // Castles 3,4,5 are identical. setarray .@w[0],66,157,211,159; setarray .x[0],130,128,128,128,110,91,65, 65,110,128,128, 156,172,154,156,155,187,212,211,155,156,172; setarray .y[0], 60, 77, 90,100, 96,53,71,103, 96,100, 77, 101, 95, 90, 77, 60, 54, 67,105, 60, 77, 95; } } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") { setarray .@w[0],337,95,307,222; setarray .x[0],326,337,334,296,285,236,285,296,334,337,334, 359,300,337,317,307,300,337,317,307,359,236; setarray .y[0], 83, 95,119, 82, 40, 41, 40, 82,119, 95,119, 85,119,154,183,222,119,154,183,222, 85, 41; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") { setarray .@w[0],306,325,364,305; setarray .x[0],323,273,288,306,323,323,273,288,306,273,273, 338,364,365,317,338,338,364,365,317,364,329; setarray .y[0],308,309,306,326,308,308,309,306,325,309,309, 309,305,261,318,310,309,305,261,318,305,314; } else { // Castles 1,4,5 are identical. setarray .@w[0],108,32,128,42,187,15; // Contains an extra pair, for whatever reason. setarray .x[0],111,109,65,110,88,64,47,109,111,112,120, 130,129,151,187,128,152,187,128,130,130,151; setarray .y[0], 18, 44,22, 40,20,40,43, 48, 18, 32, 37, 22, 47, 18, 15, 42, 43, 15, 42, 22, 28, 18; } } if (charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2") .@z = 11; freeloop(1); .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3); callsub OnSummon,.@z; if (.@defence > 70) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),5; else if (.@defence > 50) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),4; else if (.@defence > 30) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),3; else if (.@defence > 10) set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),2; if (.@w[4] && .@z) guardian strnpcinfo(NPC_NAME_HIDDEN),.@w[4],.@w[5],"Guardian Soldier",1899,strnpcinfo(NPC_NAME)+"::OnGuardianDied"; else if (.@defence < 11) { set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),2; .@i = (.@z)?2:0; guardian strnpcinfo(NPC_NAME_HIDDEN),.@w[.@i],.@w[.@i+1],"Guardian Soldier",1899,strnpcinfo(NPC_NAME)+"::OnGuardianDied"; } else for(.@i = 1; .@i<getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)); ++.@i) callsub OnSummon,.@i+.@z; freeloop(0); copyarray getd(".x_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),.@x[0],22; copyarray getd(".y_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),.@y[0],22; setd ".timer_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN),4+.@z; setarray .count$[5],"1st","2nd","3rd","4th","5th"; initnpctimer; end; OnTimer300000: OnTimer900000: OnTimer1800000: OnTimer2700000: OnTimer3600000: if (charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2") end; .@var$ = ".timer_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN); setd .@var$, getd(.@var$)+1; set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))+1; callsub OnSummon,getd(.@var$); setarray .count$[5],"1st","2nd","3rd","4th","5th"; mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The "+.count$[getd(.@var$)]+" Guardian has been summoned from the Gate House.",bc_map,"0xff4500"; if (getd(.@var$) == 9) { setd .@var$,0; stopnpctimer; } end; OnTimer600000: OnTimer1200000: OnTimer2100000: OnTimer3000000: OnTimer3900000: if (!(charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2")) end; .@var$ = ".timer_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN); setd .@var$, getd(.@var$)+1; set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))+1; callsub OnSummon,getd(.@var$); if (getd(.@var$) == 20) { setd .@var$,0; stopnpctimer; } end; OnSummon: guardian strnpcinfo(NPC_NAME_HIDDEN),getd(".x_"+strnpcinfo(NPC_NAME_HIDDEN)+"["+getarg(0)+"]"),getd(".y_"+strnpcinfo(NPC_NAME_HIDDEN)+"["+getarg(0)+"]"),"Guardian Soldier",1899,strnpcinfo(NPC_NAME)+"::OnGuardianDied"; return; OnGuardianDied: if (charat(strnpcinfo(NPC_NAME_VISIBLE),4) == "2") .@z = 11; set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))-1; if (getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)) < 2) { set getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+charat(strnpcinfo(NPC_NAME_VISIBLE),4)+strnpcinfo(NPC_NAME_HIDDEN))+1; callsub OnSummon,10+.@z; } end; OnReset: stopnpctimer; killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnGuardianDied"; deletearray getd(".x_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),22; deletearray getd(".y_"+strnpcinfo(NPC_NAME_HIDDEN)+"[0]"),22; end; } //== Guardian Stone Summoners (2) ========================== - script df#template FAKE_NPC,{ OnEnable: if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") setarray .@i[0],210,234,308,189; else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") setarray .@i[0],33,168,245,168; else setarray .@i[0],65,171,212,149; // Castles 3,4,5 are identical. } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") setarray .@i[0],231,58,335,230; else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") setarray .@i[0],242,309,376,251; else setarray .@i[0],27,35,207,75; // Castles 1,4,5 are identical. } .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2)); .@j = (.@num == 1)?0:2; guardian strnpcinfo(NPC_NAME_HIDDEN),.@i[.@j],.@i[.@j+1],((.@num == 1)?"1st":"2nd")+" Guardian Stone",1906+.@num,strnpcinfo(NPC_NAME)+"::OnGuardianStoneDied"; end; OnDisable: killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnGuardianStoneDied"; setd "$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"["+(atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2))-1)+"]",1; stopnpctimer; end; OnGuardianStoneDied: .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2)); .@var$ = "$agit_"+substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); setd .@var$+"["+(.@num-1)+"]",1; if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) { ++.@destroyed; } if (getd(.@var$+"[1]") == 1 || getd(.@var$+"[1]") == 2) { ++.@destroyed; } if (.@destroyed == 2) { mapannounce strnpcinfo(NPC_NAME_HIDDEN),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00"; donpcevent "RL0#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnDisable"; } else mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed!",bc_map,"0x00ff00"; donpcevent "gard"+.@num+"#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnReset"; initnpctimer; end; OnTimer300000: .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2)); .@str$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); donpcevent ((.@num == 1)?"1st":"2nd")+" Guardian Stone#"+.@str$+"::OnEnable"; setd "$agit_"+.@str$+"["+(atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2))-1)+"]",2; stopnpctimer; end; } //== Barrier Summoners (4) ================================= - script RL#template FAKE_NPC,{ OnEnable: .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2)); if (.@num == 0) { if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") { setarray .@wall[0],238,74,8,6,0; setarray .@x[0],239,241,243,245; setarray .@y[0], 73, 73, 73, 73; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") { setarray .@wall[0],136,136,8,6,0; setarray .@x[0],137,139,141,143; setarray .@y[0],137,137,137,137; } else { // Castles 3,4,5 are identical. setarray .@wall[0],138,110,8,6,0; setarray .@x[0],139,141,143,145; setarray .@y[0],111,111,111,111; } } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") { setarray .@wall[0],290,98,8,0,0; setarray .@x[0],289,289,289,289; setarray .@y[0], 98,100,102,104; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") { setarray .@wall[0],326,301,6,6,0; setarray .@x[0],326,328,330; setarray .@y[0],300,300,300; } else { // Castles 1,4,5 are identical. setarray .@wall[0],114,48,13,6,0; setarray .@x[0],115,117,119,121,123,125; setarray .@y[0], 49, 49, 49, 49, 49, 49; } } } else if (.@num == 1) { if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") { setarray .@wall[0],239,53,8,6,1; setarray .@x[0],239,241,243,240,242,244; setarray .@y[0], 55, 55, 55, 54, 54, 54; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") { setarray .@wall[0],150,223,12,6,1; setarray .@x[0],151,153,155,157,159,161; setarray .@y[0],222,222,222,222,222,222; } else { // Castles 3,4,5 are identical. setarray .@wall[0],139,158,6,6,1; setarray .@x[0],140,142,144,139,141,143; setarray .@y[0],157,157,157,156,156,156; } } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") { setarray .@wall[0],279,98,8,0,1; setarray .@x[0],280,280,280,281,281,281; setarray .@y[0], 98,100,102, 99,101,103; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") { setarray .@wall[0],325,277,8,6,1; setarray .@x[0],326,328,330,327,329,331; setarray .@y[0],278,278,278,279,279,279; } else { // Castles 1,4,5 are identical. setarray .@wall[0],114,51,13,6,1; setarray .@x[0],115,117,119,121,123,125; setarray .@y[0], 50, 50, 50, 50, 50, 50; } } } else if (.@num == 2) { if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") { setarray .@wall[0],107,124,6,6,1; setarray .@x[0],107,109,111,108,110,112; setarray .@y[0],122,122,122,123,123,123; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") { setarray .@wall[0],125,342,8,0,1; setarray .@x[0],126,126,126,127,127,127; setarray .@y[0],343,345,347,344,346,348; } else { // Castles 3,4,5 are identical. setarray .@wall[0],138,210,8,6,1; setarray .@x[0],140,142,144,139,141,143; setarray .@y[0],209,209,209,208,208,208; } } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") { setarray .@wall[0],230,213,6,0,1; setarray .@x[0],231,231,231,232,232,232; setarray .@y[0],213,215,217,213,215,217; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") { setarray .@wall[0],200,230,8,0,1; setarray .@x[0],201,201,201,202,202,202; setarray .@y[0],231,233,235,232,234,236; } else { // Castles 1,4,5 are identical. setarray .@wall[0],114,154,13,6,1; setarray .@x[0],115,117,119,121,123,125; setarray .@y[0],153,153,153,153,153,153; } } } else { if (compare(strnpcinfo(NPC_NAME_HIDDEN),"arug")) { if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas01") { setarray .@wall[0],84,171,8,6,1; setarray .@x[0], 84, 86, 88, 90; setarray .@y[0],170,170,170,170; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "arug_cas02") { setarray .@wall[0],38,314,12,6,1; setarray .@x[0], 40, 42, 44, 46; setarray .@y[0],315,315,315,315; } else { // Castles 3,4,5 are identical. setarray .@wall[0],138,263,8,6,1; setarray .@x[0],139,141,143,145; setarray .@y[0],262,262,262,262; } } else { if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas02") { setarray .@wall[0],160,141,6,6,1; setarray .@x[0],160,162,164,166; setarray .@y[0],140,140,140,140; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "schg_cas03") { setarray .@wall[0],285,198,8,0,1; setarray .@x[0],284,284,284,284; setarray .@y[0],199,201,203,205; } else { // Castles 1,4,5 are identical. setarray .@wall[0],116,241,11,6,1; setarray .@x[0],116,118,120,122; setarray .@y[0],240,240,240,240; } } } if (.@num == 3) set getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)),4; else if (.@num) set getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)),6; setwall strnpcinfo(NPC_NAME_HIDDEN),.@wall[0],.@wall[1],.@wall[2],.@wall[3],.@wall[4],substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"_"+strnpcinfo(NPC_NAME_VISIBLE); .@j = (getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)))?getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)):getarraysize(.@x); for (.@i = 0; .@i<.@j; ++.@i) guardian strnpcinfo(NPC_NAME_HIDDEN),.@x[.@i],.@y[.@i]," ",1905,strnpcinfo(NPC_NAME)+"::OnBarrierDestroyed"; end; OnBarrierDestroyed: .@num = atoi(charat(strnpcinfo(NPC_NAME_VISIBLE),2)); if (!.@num) end; set getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)),getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN))-1; if (getd(".MyMobCount_"+.@num+strnpcinfo(NPC_NAME_HIDDEN)) == 0) { .@var$ = substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9); setd "$agit_"+.@var$+"["+(.@num+1)+"]",1; setarray .@count$[0],"1st","2nd","3rd"; mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The "+.@count$[.@num-1]+" Fortress Gate is destroyed.",bc_map,"0x00ff00"; delwall .@var$+"_"+strnpcinfo(NPC_NAME_VISIBLE); } end; OnDisable: delwall substr(strnpcinfo(NPC_NAME_HIDDEN),0,1)+substr(strnpcinfo(NPC_NAME_HIDDEN),8,9)+"_"+strnpcinfo(NPC_NAME_VISIBLE); killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnBarrierDestroyed"; end; } //== Link Flags (function) ================================= function script LinkFlag { if (!getcharid(CHAR_ID_GUILD) || getcharid(CHAR_ID_GUILD) != getcastledata(strnpcinfo(NPC_MAP),1)) end; if (getarg(0) == "Convenience Facility") { mes "^3355FFThis is the Stronghold"; mes "Teleport Service. Would"; mes "you like to teleport to the"; mes "Convenience Facility for"; mes "guild members?^000000"; if(select("Go to Convenience Facility", "Cancel") == 1) warp strnpcinfo(NPC_MAP),getarg(1),getarg(2); close; } if (getarg(0) == "Emperium Center") { mes "^3355FFThis is the Stronghold"; mes "Teleport Service. Would"; mes "you like to teleport to"; mes "the Emperium Center?^000000"; if(select("Teleport", "Cancel") == 1) warp strnpcinfo(NPC_MAP),getarg(1),getarg(2); close; } mes "^3355FFThis is the Stronghold"; mes "Teleport Service. Please"; mes "choose a destination"; mes "within the stronghold.^000000"; for (.@i = 0; .@i<getargcount(); .@i += 3) .@menu$ += getarg(.@i)+":"; .@menu$ += "Cancel"; .@i = select(.@menu$)-1; if (.@i != getargcount()/3) warp strnpcinfo(NPC_MAP),getarg(.@i*3+1),getarg(.@i*3+2); close; } //== Return Flags (function) =============================== function script ReturnFlag { .@str$ = (compare(strnpcinfo(NPC_MAP),"aru"))?"Arunafeltz":"Schwaltzvalt"; .@GID = getcastledata(getarg(0),1); if (!.@GID) { mes "[ "+.@str$+" Royal Edict ]"; mes "The Holy Kingdom of"; mes .@str$+" declares that"; mes "one has yet to claim lordship"; mes "over this stronghold. The one"; mes "that breaks the Emperium will"; mes "be recognized as its new owner."; close; } if (getcharid(CHAR_ID_GUILD) == .@GID && getarg(1,0)) { mes "[ Ringing Voice ]"; mes "Courageous one,"; mes "do you wish to return"; mes "to your stronghold?"; next; if(select("Return to the Stronghold", "Cancel") == 1 && getcharid(CHAR_ID_GUILD) == getcastledata(getarg(0),1)) { if (compare(getarg(0),"arug")) { if (getarg(0) == "arug_cas01") setarray .@i[0],67,193; else if (getarg(0) == "arug_cas02") setarray .@i[0],43,256; else setarray .@i[0],121,318; // Castles 3,4,5 are identical. } else { if (getarg(0) == "schg_cas02") setarray .@i[0],136,188; else if (getarg(0) == "schg_cas03") setarray .@i[0],308,202; else setarray .@i[0],120,290; // Castles 1,4,5 are identical. } warp getarg(0),.@i[0],.@i[1]; } close; } mes "[ "+.@str$+" Royal Edict ]"; mes "The Holy Kingdom of"; mes .@str$+" decrees that"; mes "this stronghold is owned"; mes "by the ^FF0000"+getguildname(.@GID)+"^000000 Guild."; next; mes "[ "+.@str$+" Royal Edict ]"; mes "^FF0000"+getguildmaster(.@GID)+"^000000 is"; mes "Guild Master of ^FF0000"+getguildname(.@GID)+"^000000."; mes "Any that object must claim this"; mes "stronghold through strength of"; mes "steel and magic during the"; mes "appointed Guild Siege times."; close; } //== Treasure Room Switches ================================ - script Switch#template FAKE_NPC,{ mes " "; mes "^3355FFWill you pull"; mes "this small lever?^000000"; next; if(select("Pull Lever", "Cancel") == 2) close; if (compare(strnpcinfo(NPC_MAP),"arug")) { if (strnpcinfo(NPC_MAP) == "arug_cas01") setarray .@i[0],121,357; else if (strnpcinfo(NPC_MAP) == "arug_cas02") setarray .@i[0],387,323; else setarray .@i[0],321,57; // Castles 3,4,5 are identical. } else { if (strnpcinfo(NPC_MAP) == "schg_cas02") setarray .@i[0],339,79; else if (strnpcinfo(NPC_MAP) == "schg_cas03") setarray .@i[0],57,13; else setarray .@i[0],275,244; // Castles 1,4,5 are identical. } warp strnpcinfo(NPC_MAP),.@i[0],.@i[1]; close; } //== Guild Dungeon Warps =================================== - script Sunflower#template FAKE_NPC,{ if (getcharid(CHAR_ID_GUILD) == getcastledata(strnpcinfo(NPC_MAP),1)) { mes "- It's an amazingly huge sunflower; as big as a human! ... You feel something mysterious emanating from the flower. -"; next; switch(select("Hold the stem.", "Do nothing.")) { case 1: if (compare(strnpcinfo(NPC_MAP),"arug")) { .@map$ = "arug_dun01"; setarray .@mapx[0],350,350,50, 50,200; setarray .@mapy[0],350, 50,50,350,386; } else { .@map$ = "schg_dun01"; setarray .@mapx[0],262, 94, 79,212,322; setarray .@mapy[0],314,284,140, 70,166; } .@i = atoi(charat(strnpcinfo(NPC_MAP),9))-1; warp .@map$,.@mapx[.@i],.@mapy[.@i]; close; case 2: mes "It's too scary to touch unknown things."; close; } } }
  18. Heres my script //================= Hercules Script ======================================= //= _ _ _ //= | | | | | | //= | |_| | ___ _ __ ___ _ _| | ___ ___ //= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| //= | | | | __/ | | (__| |_| | | __/\__ \ //= \_| |_/\___|_| \___|\__,_|_|\___||___/ //================= License =============================================== //= This file is part of Hercules. //= http://herc.ws - http://github.com/HerculesWS/Hercules //= //= Copyright © 2012-2015 Hercules Dev Team //= Copyright © Joseph //= Copyright © Euphy //= Copyright © Masao //= Copyright © Brian //= Copyright © L0ne_W0lf //= //= Hercules is free software: you can redistribute it and/or modify //= it under the terms of the GNU General Public License as published by //= the Free Software Foundation, either version 3 of the License, or //= (at your option) any later version. //= //= This program is distributed in the hope that it will be useful, //= but WITHOUT ANY WARRANTY; without even the implied warranty of //= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //= GNU General Public License for more details. //= //= You should have received a copy of the GNU General Public License //= along with this program. If not, see <http://www.gnu.org/licenses/>. //========================================================================= //= War of Emperium Guild Template File //================= Description =========================================== //= - THIS FILE IS REQUIRED FOR GUILD CASTLES TO FUNCTION. //= //= - Enables AGIT Manager inside Guild Strongholds. //= Visible Name required: Agit //= Manages the various functions used in and out of WoE. //= //= - Enables Stewards inside Guild Strongholds which lets the guild master //= invest in Defense and Economy, and to summon guardians, a Kafra, and //= enter master's room. //= //= - Guardian Spawning Template //= Visible Name required: Guardian //= Spawn guardians when guild castle data is recieved. //= //= - Enables Kafra Services inside Guild Strongholds. //= Visible Name required: Kafra Employee //= Storage, Guild Storage, Teleport Service, Cart rental. //= //= - Treasure Chest spawning. //= Chests will NOT be saved anymore in the event of crashes. //= Treasures will NOT spawn on a location that already has treasure //= chest spawned. //================= Current Version ======================================= //= 2.0 //========================================================================= //== WoE : Main Functions ================================== - script Gld_Agit_Manager::Gld_Agit_Manager FAKE_NPC,{ end; // War of Emperium has started. OnAgitStart: if (strnpcinfo(NPC_NAME) == "Gld_Agit_Manager") end; maprespawnguildid strnpcinfo(NPC_NAME_HIDDEN),getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1),6; gvgon strnpcinfo(NPC_NAME_HIDDEN); // Spawn (fall through), or respawn the Emperium once it has been broken. OnStartArena: // OnAgitStart will fall through and spawn the Emperium. if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas01") { setarray .@emproom[0],216,23; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas02") { setarray .@emproom[0],213,23; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas03") { setarray .@emproom[0],205,31; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas04") { setarray .@emproom[0],36,217; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas05") { setarray .@emproom[0],27,101; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas01") { setarray .@emproom[0],197,181; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas02") { setarray .@emproom[0],176,178; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas03") { setarray .@emproom[0],244,166; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas04") { setarray .@emproom[0],174,177; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas05") { setarray .@emproom[0],194,184; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas01") { setarray .@emproom[0],139,139; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas02") { setarray .@emproom[0],38,25; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas03") { setarray .@emproom[0],269,265; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas04") { setarray .@emproom[0],270,28; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas05") { setarray .@emproom[0],30,30; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas01") { setarray .@emproom[0],197,197; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas02") { setarray .@emproom[0],157,174; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas03") { setarray .@emproom[0],16,220; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas04") { setarray .@emproom[0],291,14; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas05") { setarray .@emproom[0],266,266; } // Add custom Guild Castles here. else { end; } if (!mobcount(strnpcinfo(NPC_NAME_HIDDEN),"Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnAgitBreak")) { monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnAgitBreak"; } end; // The Emperium has been broken. OnAgitBreak: .@GID = getcharid(CHAR_ID_GUILD); // Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen) if (.@GID <= 0) { .@notice$ = "Character "+strcharinfo(PC_NAME)+" ("+getcharid(CHAR_ID_CHAR)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN)+" while guildless. No data will be saved and Emperium respawned."; logmes .@notice$; debugmes .@notice$; donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena"; end; } // Adjust Economy Invest Level for Castle .@Economy = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2) - 5; if (.@Economy < 0) .@Economy = 0; setcastledata strnpcinfo(NPC_NAME_HIDDEN), 2, .@Economy; // Adjust Defense Invest Level for Castle .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3) - 5; if (.@defence < 0) .@defence = 0; setcastledata strnpcinfo(NPC_NAME_HIDDEN), 3, .@defence; // Set new Castle Occupant setcastledata strnpcinfo(NPC_NAME_HIDDEN),1, .@GID; // Announce that the Emperium is destroyed, and respawn all but new castle-occupants. mapannounce strnpcinfo(NPC_NAME_HIDDEN),"The emperium has been destroyed.",bc_map|bc_woe,"0x00CCFF",FW_NORMAL,12; maprespawnguildid strnpcinfo(NPC_NAME_HIDDEN),.@GID,6; // Refresh castle data, disable Kafra and reset Invest information. donpcevent strnpcinfo(NPC_NAME)+"::OnRecvCastle"; disablenpc "Kafra Staff#"+strnpcinfo(NPC_NAME_HIDDEN); for (.@i = 4; .@i <= 9; ++.@i) { setcastledata strnpcinfo(NPC_NAME_HIDDEN), .@i, 0; } // Erase Guardian Database information if the new owners do not have Guardian Research. if( getgdskilllv(.@GID,10002) == 0 ) { for (.@i = 10; .@i <= 17; ++.@i) { setcastledata strnpcinfo(NPC_NAME_HIDDEN), .@i, 0; } } // Respawn the Emperium, and display new owners. sleep2 500; // Slow down script execution slightly. if( agitcheck() ) donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena"; sleep2 7000; announce "The [" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "] castle has been conquered by " + strcharinfo(0) + ", from [" + getguildname(.@GID) + "] guild.",bc_all|bc_woe; end; // War of Emperium has ended. OnAgitEnd: if (strnpcinfo(NPC_NAME) == "Gld_Agit_Manager") end; gvgoff strnpcinfo(NPC_NAME_HIDDEN); // If the castle has no owner at the end of WoE, do not kill Emperium. if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1)) { killmonster strnpcinfo(NPC_NAME_HIDDEN),"Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnAgitBreak"; } end; // Occupying Guild has been disbanded. OnGuildBreak: if (strnpcinfo(NPC_NAME) == "Gld_Agit_Manager") end; // Kill guardians, disable the Kafra, and set owner to 0. killmonster strnpcinfo(NPC_NAME_HIDDEN),"Guardian#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied"; disablenpc "Kafra Staff#"+strnpcinfo(NPC_NAME_HIDDEN); setcastledata strnpcinfo(NPC_NAME_HIDDEN),1,0; // Wait before refreshing guild information. sleep 7000; announce "Guild Base [" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "] has been abandoned.",0; donpcevent strnpcinfo(NPC_NAME)+"::OnRecvCastle"; end; OnAgitInit: OnRecvCastle: if (strnpcinfo(NPC_NAME) == "Gld_Agit_Manager") end; // Spawn Monsters if the castle is empty. .@GID = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1); if (.@GID == 0) { killmonsterall strnpcinfo(NPC_NAME_HIDDEN); if (compare(strnpcinfo(NPC_NAME_HIDDEN),"aldeg")) { // Normal Spawns monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Evil Druid",1117,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Khalitzburg",1132,4; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Abysmal Knight",1219,2; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Executioner",1205,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Penomena",1216,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alarm",1193,18; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Clock",1269,9; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric Archer",1276,7; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Wanderer",1208,3; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alice",1275,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Bloody Knight",1268,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Dark Lord",1272,1; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas01") { setarray .@emproom[0],216,23; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas02") { setarray .@emproom[0],213,23; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas03") { setarray .@emproom[0],205,31; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas04") { setarray .@emproom[0],36,217; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas05") { setarray .@emproom[0],27,101; } monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Dark Lord",1272,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Tower Keeper",1270,4; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Bloody Knight",1268,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Abysmal Knight",1219,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Raydric Archer",1276,5; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"gefg")) { // Normal Spawns monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Evil Druid",1117,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Wind Ghost",1263,11; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Bathory",1102,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Jakk",1130,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Marduk",1140,20; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric",1163,9; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alice",1275,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Abysmal Knight",1219,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Moonlight Flower",1150,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Phreeoni",1159,1; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas01") { setarray .@emproom[0],197,181; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas02") { setarray .@emproom[0],176,178; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas03") { setarray .@emproom[0],244,166; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas04") { setarray .@emproom[0],174,177; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas05") { setarray .@emproom[0],194,184; } monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Mysteltainn",1203,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Orc Hero",1087,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"High Orc",1213,10; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Orc Archer",1189,10; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"payg")) { // Normal Spawns monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Greatest General",1277,9; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Wanderer",1208,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Mutant Dragonoid",1262,5; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Bathory",1102,5; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Moonlight Flower",1150,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Eddga",1115,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Horong",1129,11; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric Archer",1276,5; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Kobold Archer",1282,4; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Gargoyle",1253,5; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas01") { setarray .@emproom[0],139,139; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas02") { setarray .@emproom[0],38,25; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas03") { setarray .@emproom[0],269,265; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas04") { setarray .@emproom[0],270,28; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas05") { setarray .@emproom[0],30,30; } monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Moonlight Flower",1150,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Eddga",1115,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Wanderer",1208,6; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Raydric Archer",1276,5; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"prtg")) { // Normal Spawns monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric",1163,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Khalitzburg",1132,10; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Abysmal Knight",1219,5; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Bloody Knight",1268,5; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Stormy Knight",1251,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Hatii",1252,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Raydric Archer",1276,5; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Gryphon",1259,2; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Chimera",1283,3; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Alice",1275,1; monster strnpcinfo(NPC_NAME_HIDDEN),0,0,"Zealotus",1200,1; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas01") { setarray .@emproom[0],197,197; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas02") { setarray .@emproom[0],157,174; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas03") { setarray .@emproom[0],16,220; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas04") { setarray .@emproom[0],291,14; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas05") { setarray .@emproom[0],266,266; } monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Guardian Knight",1268,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Guardian Master",1251,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Hatii",1252,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Guardian Knight",1219,1; monster strnpcinfo(NPC_NAME_HIDDEN),.@emproom[0],.@emproom[1],"Raydric Archer",1276,5; } // Add custom Guild Castles here. else { end; } donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena"; // Disable Kafra Staff... disablenpc "Kafra Staff#"+strnpcinfo(NPC_NAME_HIDDEN); end; } else { // Otherwise place the guild emblem on flags. if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas01") { donpcevent "::OnRecvCastleA01"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas02") { donpcevent "::OnRecvCastleA02"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas03") { donpcevent "::OnRecvCastleA03"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas04") { donpcevent "::OnRecvCastleA04"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas05") { donpcevent "::OnRecvCastleA05"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas01") { donpcevent "::OnRecvCastleG01"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas02") { donpcevent "::OnRecvCastleG02"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas03") { donpcevent "::OnRecvCastleG03"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas04") { donpcevent "::OnRecvCastleG04"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas05") { donpcevent "::OnRecvCastleG05"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas01") { donpcevent "::OnRecvCastlePy01"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas02") { donpcevent "::OnRecvCastlePy02"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas03") { donpcevent "::OnRecvCastlePy03"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas04") { donpcevent "::OnRecvCastlePy04"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas05") { donpcevent "::OnRecvCastlePy05"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas01") { donpcevent "::OnRecvCastlePt01"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas02") { donpcevent "::OnRecvCastlePt02"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas03") { donpcevent "::OnRecvCastlePt03"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas04") { donpcevent "::OnRecvCastlePt04"; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas05") { donpcevent "::OnRecvCastlePt05"; } // Add custom Guild Castles here. else { end; } // And load purchased Guardian in castles. donpcevent "Guardian#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnSpawnGuardians"; // And display Kafra if purchased. if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),9) < 1) disablenpc "Kafra Staff#"+strnpcinfo(NPC_NAME_HIDDEN); } end; } //== WoE : Guild Kafras ==================================== - script Kafra Staff#woe::guildkafra FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1); if (compare(strnpcinfo(NPC_NAME_HIDDEN),"aldeg")) { setarray .@destination$[0],"Al De Baran","aldebaran"; setarray .@coordinates[0],132,103; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"gefg")) { setarray .@destination$[0],"Geffen","geffen"; setarray .@coordinates[0],120,39; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"payg")) { setarray .@destination$[0],"Payon","payon"; setarray .@coordinates[0],70,100; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"prtg")) { setarray .@destination$[0],"Prontera","prontera"; setarray .@coordinates[0],278,211; } // Add custom Guild Castles here. else { end; } cutin "kafra_01",2; if (getcharid(CHAR_ID_GUILD) == .@GID) { mes "[Kafra Employee]"; mes "Welcome. ^ff0000" + getguildname(.@GID) + "^000000 Member."; mes "The Kafra Corporation will stay with you wherever you go."; next; switch (select("Use Storage", "Use Teleport Service", "Rent a Pushcart", "Cancel")) { case 1: if (getskilllv("NV_BASIC") < 6) { mes "[Kafra Employee]"; mes "I'm sorry, but you"; mes "need the Novice's"; mes "Basic Skill Level 6 to"; mes "use the Storage Service."; close2; cutin "",255; end; } mes "[Kafra Employee]"; mes "Here, let me open"; mes "your Storage for you."; mes "Thank you for using"; mes "the Kafra Service."; close2; cutin "",255; openstorage; end; case 2: mes "[Kafra Employee]"; mes "Please choose"; mes "your destination."; next; switch (select(.@destination$+" -> 200z", "Cancel")) { case 1: if (Zeny < 200) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't have"; mes "enough zeny for the Teleport"; mes "Service. The fee to teleport"; mes "to "+.@destination$+" is 200 zeny."; close2; cutin "",255; end; } Zeny -= 200; RESRVPTS += 2; close2; warp .@destination$[1],.@coordinates[0],.@coordinates[1]; end; case 2: close2; cutin "",255; end; } case 3: if (BaseClass != Job_Merchant) { mes "[Kafra Employee]"; mes "I'm sorry, but the"; mes "Pushcart rental service"; mes "is only available to Merchants,"; mes "Blacksmiths, Master Smiths,"; mes "Alchemists, Biochemists,"; mes "Mechanics and Geneticists."; close2; cutin "",255; end; } if (checkcart()) { mes "[Kafra Employee]"; mes "You already have"; mes "a Pushcart equipped."; mes "Unfortunately, we can't"; mes "rent more than one to"; mes "each customer at a time."; close2; cutin "",255; end; } mes "[Kafra Employee]"; mes "The Pushcart rental"; mes "fee is 800 zeny. Would"; mes "you like to rent a Pushcart?"; next; switch (select("Rent a Pushcart.", "Cancel")) { case 1: if (Zeny < 800) { mes "[Kafra Employee]"; mes "I'm sorry, but you"; mes "don't have enough"; mes "zeny to pay the Pushcart"; mes "rental fee of 800 zeny."; close2; cutin "",255; end; } RESRVPTS += 8; Zeny -= 800; setcart; close2; cutin "",255; end; case 2: close2; cutin "",255; end; } case 4: mes "[Kafra Employee]"; mes "We, here at Kafra Corporation,"; mes "are always endeavoring to provide you with the best services. We hope that we meet your adventuring needs and standards of excellence."; close2; cutin "",255; end; } } mes "[Kafra Employee]"; mes "I am instructed to only offer my services to the ^ff0000"+getguildname(.@GID)+"^000000 Guild. Please try another Kafra Employee around here. Sorry for the inconvenience."; close2; cutin "",255; end; } //== WoE : Castle Managers ================================= - script Castle Manager#cm::cm FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1); // .@guardiantype = Defines the types of guardians per castle basis. // 1 - Soldier Guardian, 2 - Archer Guardian, 3 - Knight Guardian // .@guardianposx = Define the x spawn point for each uardian. // [0] = 1st guardian's x spawn point. // .@guardianposy = Define the y spawn point for each guardian. // [0] = 1st guardian's y spawn point. // .@masterroom = Defines the coordinates of the Treasure Room. if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas01") { setarray .@guardiantype[0],1,2,2,2,2,3,3,3; setarray .@guardianposx[0],17,39,38,45,21,218,213,73; setarray .@guardianposy[0],218,208,196,228,194,24,24,70; setarray .@masterroom[0],113,223; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas02") { setarray .@guardiantype[0],3,3,3,1,1,2,2,2; setarray .@guardianposx[0],27,88,117,60,51,21,36,210; setarray .@guardianposy[0],184,43,46,202,183,177,183,7; setarray .@masterroom[0],134,225; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas03") { setarray .@guardiantype[0],3,3,1,1,1,2,2,2; setarray .@guardianposx[0],90,116,86,116,64,212,195,110; setarray .@guardianposy[0],112,112,120,76,103,160,151,217; setarray .@masterroom[0],229,267; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas04") { setarray .@guardiantype[0],2,2,2,1,1,1,3,3; setarray .@guardianposx[0],187,192,148,145,169,198,48,55; setarray .@guardianposy[0],100,42,88,209,53,77,72,88; setarray .@masterroom[0],83,17; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas05") { setarray .@guardiantype[0],2,2,1,1,3,3,3,3; setarray .@guardianposx[0],51,188,157,157,27,145,156,41; setarray .@guardianposy[0],202,79,192,74,221,78,73,112; setarray .@masterroom[0],64,8; } // Geffen (Britoniah) Castles else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas01") { setarray .@guardiantype[0],1,1,1,2,2,3,3,3; setarray .@guardianposx[0],67,184,62,36,50,50,189,200; setarray .@guardianposy[0],179,20,41,186,186,67,41,167; setarray .@masterroom[0],152,117; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas02") { setarray .@guardiantype[0],1,1,1,2,2,3,3,3; setarray .@guardianposx[0],64,56,166,35,20,19,166,159; setarray .@guardianposy[0],168,41,25,148,150,41,42,188; setarray .@masterroom[0],145,115; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas03") { setarray .@guardiantype[0],2,2,1,1,1,3,3,3; setarray .@guardianposx[0],48,113,48,157,243,157,234,238; setarray .@guardianposy[0],176,214,207,62,41,45,25,160; setarray .@masterroom[0],275,289; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas04") { setarray .@guardiantype[0],2,2,1,1,1,3,3,3; setarray .@guardianposx[0],53,31,49,29,147,57,160,148; setarray .@guardianposy[0],191,178,220,46,65,46,50,189; setarray .@masterroom[0],116,123; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas05") { setarray .@guardiantype[0],2,2,1,1,1,3,3,3; setarray .@guardianposx[0],45,71,72,66,177,66,177,193; setarray .@guardianposy[0],149,163,142,47,50,17,35,166; setarray .@masterroom[0],149,106; } // Payon (Baulder) Castles else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas01") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],229,225,222,99,65,36,51,138; setarray .@guardianposy[0],92,80,111,45,31,127,144,133; setarray .@masterroom[0],295,8; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas02") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],237,228,210,57,42,287,264,27; setarray .@guardianposy[0],54,72,41,241,241,257,272,20; setarray .@masterroom[0],141,149; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas03") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],245,269,36,41,39,19,37,268; setarray .@guardianposy[0],37,51,39,39,65,276,277,244; setarray .@masterroom[0],163,167; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas04") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],251,232,231,32,32,35,36,270; setarray .@guardianposy[0],212,212,175,287,232,45,17,41; setarray .@masterroom[0],151,47; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas05") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],19,33,266,266,263,263,250,36; setarray .@guardianposy[0],279,260,234,279,37,21,22,36; setarray .@masterroom[0],153,137; } // Prontera (Valkyrie Realms) Castles else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas01") { setarray .@guardiantype[0],1,1,1,2,2,3,3,3; setarray .@guardianposx[0],182,182,153,59,50,184,196,107; setarray .@guardianposy[0],62,116,86,28,36,183,189,179; setarray .@masterroom[0],15,209; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas02") { setarray .@guardiantype[0],3,3,3,1,1,2,2,2; setarray .@guardianposx[0],161,153,178,71,49,64,7,75; setarray .@guardianposy[0],161,161,44,75,28,186,196,175; setarray .@masterroom[0],207,229; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas03") { setarray .@guardiantype[0],3,3,3,1,1,2,2,2; setarray .@guardianposx[0],191,137,45,50,41,191,179,191; setarray .@guardianposy[0],190,190,99,87,87,42,43,72; setarray .@masterroom[0],190,130; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas04") { setarray .@guardiantype[0],3,3,3,1,1,1,2,2; setarray .@guardianposx[0],276,274,246,38,29,33,78,36; setarray .@guardianposy[0],14,35,246,240,240,258,48,61; setarray .@masterroom[0],275,160; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas05") { setarray .@guardiantype[0],3,3,3,1,1,1,2,2; setarray .@guardianposx[0],266,287,245,236,251,278,32,44; setarray .@guardianposy[0],262,280,250,63,63,253,253,248; setarray .@masterroom[0],281,176; } // Add custom Guild Castles here. else { end; } if (.@GID == 0) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I have been waiting for a master to fulfill my destiny."; mes "Brave soul... fate will guide you towards your future..."; close; } if (getguildmaster(.@GID) != strcharinfo(PC_NAME)) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "No matter how much you pester me, I'll still follow my master ^ff0000"+getguildmaster(.@GID)+"^000000. Where are the Guardians?! Send these ruffians away right now!"; close; } mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Welcome. My honorable master, ^ff0000"+strcharinfo(PC_NAME)+"^000000..."; mes "Your humble servant, "+strnpcinfo(NPC_NAME_VISIBLE)+", is here to serve you."; next; switch (select("Castle briefing", "Invest in commercial growth", "Invest in Castle Defenses", "Summon Guardian", "Hire / Fire a Kafra Employee", "Go into Master's room")) { case 1: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I will report the Castle briefing, Master."; mes " "; mes "^0000ffNow, the commercial growth level is "+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2)+"."; if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)) { mes " You invested "+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)+" times in past 1 day."; } mes " Now, the Castle Defense level is "+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3)+".^000000"; if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)) { mes " ^0000ff- You invested "+getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)+" times in past 1 day.^000000"; } mes " "; mes "That's all I have to report, Master."; close; case 2: .@Economy = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2); if (.@Economy < 6) { .@eco_invest = 5000; } else if ((.@Economy >= 6) && (.@Economy <= 10)) { .@eco_invest = 10000; } else if ((.@Economy >= 11) && (.@Economy <= 15)) { .@eco_invest = 20000; } else if ((.@Economy >= 16) && (.@Economy <= 20)) { .@eco_invest = 35000; } else if ((.@Economy >= 21) && (.@Economy <= 25)) { .@eco_invest = 55000; } else if ((.@Economy >= 26) && (.@Economy <= 30)) { .@eco_invest = 80000; } else if ((.@Economy >= 31) && (.@Economy <= 35)) { .@eco_invest = 110000; } else if ((.@Economy >= 36) && (.@Economy <= 40)) { .@eco_invest = 145000; } else if ((.@Economy >= 41) && (.@Economy <= 45)) { .@eco_invest = 185000; } else if ((.@Economy >= 46) && (.@Economy <= 50)) { .@eco_invest = 230000; } else if ((.@Economy >= 51) && (.@Economy <= 55)) { .@eco_invest = 280000; } else if ((.@Economy >= 56) && (.@Economy <= 60)) { .@eco_invest = 335000; } else if ((.@Economy >= 61) && (.@Economy <= 65)) { .@eco_invest = 395000; } else if ((.@Economy >= 66) && (.@Economy <= 70)) { .@eco_invest = 460000; } else if ((.@Economy >= 71) && (.@Economy <= 75)) { .@eco_invest = 530000; } else if ((.@Economy >= 76) && (.@Economy <= 80)) { .@eco_invest = 605000; } else if ((.@Economy >= 81) && (.@Economy <= 85)) { .@eco_invest = 685000; } else if ((.@Economy >= 86) && (.@Economy <= 90)) { .@eco_invest = 770000; } else if ((.@Economy >= 91) && (.@Economy <= 95)) { .@eco_invest = 860000; } else if ((.@Economy >= 96) && (.@Economy <= 100)) { .@eco_invest = 955000; } //Quadruple the cost of investing if you've already invested once. if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)) { .@eco_invest *= 4; } mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "If you invest in commercial growth, the quantity of goods made by the guild will increase. Therfore, if you consider our future, investments will be a necessity."; mes " "; mes "Initially, you are able to invest just once but if you pay more money, you will be able to invest twice."; if (.@Economy >= 100) { mes " "; mes "^ff0000The commercial growth level of our Castle is at it's highest, 100%. No more investments are needed. Just as I have expected from a great economist like you, Master.^000000"; close; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4) >= 2) { mes " "; mes "^ff0000You have already invested twice today. You cannot invest any more.^000000 I expect riches of the guild to grow at a high rate."; close; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4) == 0) { mes " "; mes "The current investment amount required is ^ff0000"+.@eco_invest+"^000000 zeny. Will you invest?"; } else { mes " "; mes "You've invested once today... if you wish to invest once more, ^ff0000"+.@eco_invest+"^000000 more zeny will be needed."; } next; switch (select("Invest in commercial growth", "Cancel")) { case 1: if (Zeny < .@eco_invest) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master."; close; } Zeny -= .@eco_invest; setcastledata strnpcinfo(NPC_NAME_HIDDEN),4,getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)+1; mes "[ "+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "We finished the investment safely. I expect that our growth level will be increased by tomorrow."; close; case 2: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I'll do as you bid, my master... There is no hurry. We will do our best."; close; } case 3: .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3); if (.@defence < 6) { .@def_invest = 10000; } else if ((.@defence >= 6) && (.@defence <= 10)) { .@def_invest = 20000; } else if ((.@defence >= 11) && (.@defence <= 15)) { .@def_invest = 40000; } else if ((.@defence >= 16) && (.@defence <= 20)) { .@def_invest = 70000; } else if ((.@defence >= 21) && (.@defence <= 25)) { .@def_invest = 110000; } else if ((.@defence >= 26) && (.@defence <= 30)) { .@def_invest = 160000; } else if ((.@defence >= 31) && (.@defence <= 35)) { .@def_invest = 220000; } else if ((.@defence >= 36) && (.@defence <= 40)) { .@def_invest = 290000; } else if ((.@defence >= 41) && (.@defence <= 45)) { .@def_invest = 370000; } else if ((.@defence >= 46) && (.@defence <= 50)) { .@def_invest = 460000; } else if ((.@defence >= 51) && (.@defence <= 55)) { .@def_invest = 560000; } else if ((.@defence >= 56) && (.@defence <= 60)) { .@def_invest = 670000; } else if ((.@defence >= 61) && (.@defence <= 65)) { .@def_invest = 790000; } else if ((.@defence >= 66) && (.@defence <= 70)) { .@def_invest = 920000; } else if ((.@defence >= 71) && (.@defence <= 75)) { .@def_invest = 1060000; } else if ((.@defence >= 76) && (.@defence <= 80)) { .@def_invest = 1210000; } else if ((.@defence >= 81) && (.@defence <= 85)) { .@def_invest = 1370000; } else if ((.@defence >= 86) && (.@defence <= 90)) { .@def_invest = 1540000; } else if ((.@defence >= 91) && (.@defence <= 95)) { .@def_invest = 1720000; } else if ((.@defence >= 96) && (.@defence <= 100)) { .@def_invest = 1910000; } //Quadruple the cost of investing if you've already invested once. if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)) { .@def_invest *= 4; } mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "If you raise Castle Defenses, the durability of Guardians and the Emperium will increase. Therefore, if you consider our coming battles, some investment in this area will be required."; mes " "; mes "Originally you can invest just once but if you pay more money, you can invest twice."; if (.@defence >= 100) { mes " "; mes "^ff0000But the Castle Defense level of our Castle is at it's highest, 100%. No more investments are needed. Just as I have expected from a great strategist like you, Master.^000000"; close; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5) >= 2) { mes " "; mes "^ff0000You have already invested twice today. You cannot invest any more.^000000 I expect the Defenses of the guild to grow at a high rate."; close; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5) == 0) { mes " "; mes "The current investment amount required is ^ff0000"+.@def_invest+"^000000 zeny. Will you invest?"; } else { mes " "; mes "You've invested once today... if you wish to invest once more, ^ff0000"+.@def_invest+"^000000 more zeny will be needed."; } next; switch (select("Invest in Castle Defenses.", "Cancel")) { case 1: if (Zeny < .@def_invest) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master."; close; } Zeny -= .@def_invest; setcastledata strnpcinfo(NPC_NAME_HIDDEN),5,getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)+1; mes "[ "+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "We finished the investment safely. I expect that our Castle Defense level will be increased by tomorrow."; close; case 2: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I'll do as you bid, my master... There is no hurry. We will do our best."; close; } case 4: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Will you summon a Guardian? It'll be a protector to defend us loyally."; mes "Please select a guardian to defend us."; next; for (.@i = 0; .@i <= 7; ++.@i) { if (.@guardiantype[.@i] == 1) { .@type$ = "Guardian Soldier"; } else if (.@guardiantype[.@i] == 2) { .@type$ = "Guardian Archer"; } else { .@type$ = "Guardian Knight"; } if (guardianinfo(strnpcinfo(NPC_NAME_HIDDEN),.@i,0)) { setarray .@gname$[.@i], .@type$ + " - Implemented (" + guardianinfo(strnpcinfo(NPC_NAME_HIDDEN),.@i,2) + "/" + guardianinfo(strnpcinfo(NPC_NAME_HIDDEN),.@i,1) + ")"; } else { setarray .@gname$[.@i], .@type$ + " - Not Implemented"; } } .@menu$ = .@gname$[0]+":"+.@gname$[1]+":"+.@gname$[2]+":"+.@gname$[3]+":"+.@gname$[4]+":"+.@gname$[5]+":"+.@gname$[6]+":"+.@gname$[7]; .@GDnum = select(.@menu$)+9; mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Will you summon the chosen guardian? 10,000 zeny are required to summon a Guardian."; next; switch (select("Summon", "Cancel")) { case 1: if (getgdskilllv(.@GID,10002) == 0) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Master, we have not the resources to Summon the Guardian. If you want to accumulate them, you have to learn the Guild skill. We failed to summon the Guardian."; close; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),.@GDnum) == 1) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Master, you already have summoned that Guardian. We cannot summon another."; close; } if (Zeny < 10000) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Well... I'm sorry but we don't have funds to summon the Guardian. We failed to summon the Guardian."; close; } Zeny -= 10000; setcastledata strnpcinfo(NPC_NAME_HIDDEN),.@GDnum,1; // mark as 'installed' .@UseGID = .@GDnum - 10; if (.@guardiantype[.@UseGID] == 1) { .@type = 1287; } else if (.@guardiantype[.@UseGID] == 2) { .@type = 1285; } else { .@type = 1286; } guardian strnpcinfo(NPC_NAME_HIDDEN),.@guardianposx[.@UseGID],.@guardianposy[.@UseGID],strmobinfo(2,.@type),.@type,"Guardian#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied",.@UseGID; mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "We completed the summoning of the Guardian. Our defenses are now increased with it in place."; close; case 2: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I did as you ordered. But please remember if you the have money to spare, it'll be better to set it up."; close; } case 5: if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),9) == 1) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "We are currently hiring a Kafra Employee... Do you want to fire the Kafra Employee?"; next; switch (select("Fire", "Cancel")) { case 1: cutin "kafra_01",2; mes "[ Hired Kafra Employee ]"; mes "I worked so hard... How can you do that, Master?... Please... Please reconsider... Check it again, Master... Please..."; next; switch (select("Fire", "Cancel")) { case 1: mes "[ Hired Kafra Employee ]"; mes "Oh, my goodness! This is nonsense!"; next; cutin "",255; break; case 2: mes "[ Hired Kafra Employee ]"; mes "I'll work hard for you... Thank you!"; close; } break; case 2: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "She worked hard in my opinion. It was a good decision to keep her."; close; } disablenpc "Kafra Staff#"+strnpcinfo(NPC_NAME_HIDDEN); setcastledata strnpcinfo(NPC_NAME_HIDDEN),9,0; mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "...."; mes "I have discharged the Kafra Employee... But... are you unsatisfied with something?"; close; } mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Will you contact the kafra Main Office and Hire a Employee for our Castle?"; mes "^ff0000 10,000 zeny is required for their services. "; next; switch (select("Hire.", "Cancel")) { case 1: if (getgdskilllv(.@GID,10001) == 0) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Master, we can't hire a Kafra Employee because we don't have a contract with the Kafra Main Office. If you want to obtain a contract with the Kafra Main Office, you will need to learn the Guild skill first."; close; } if (Zeny < 10000) { mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Well... I'm sorry but we don't have enough funds to hire a Kafra Employee."; close; } Zeny -= 10000; enablenpc "Kafra Staff#"+strnpcinfo(NPC_NAME_HIDDEN); setcastledata strnpcinfo(NPC_NAME_HIDDEN),9,1; mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "We obtained a contract with the kafra Main Office, and hired a Kafra Employee."; next; cutin "kafra_01",2; mes "[ Hired Kafra Employee ]"; mes "How do you do? I was dispatched from the Main Office."; mes "I'll do my best to not tarnish the reputation of the Guild."; next; cutin "",255; mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "The Contract terms of the hired Kafra Employee are for 1 month and after this term, you will need to to pay an additional fee."; mes "It will be useful for our members."; close; case 2: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I did as you ordered, but some of our members will be unhappy. It will be better to hire a Kafra Employee quickly."; close; } case 6: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Do you want to visit the room where our valuables are stored?"; mes "That room is restricted to you... you are the only one with access to it."; next; switch (select("Go into Master's room.", "Cancel")) { case 1: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "I'll show you the secret path. Follow me...please."; mes "When you want to return here, please press the secret switch."; close2; warp strnpcinfo(NPC_NAME_HIDDEN),.@masterroom[0],.@masterroom[1]; end; case 2: mes "["+strnpcinfo(NPC_NAME_VISIBLE)+"]"; mes "Goods are produced once a day... if you don't remove them in time, they will not be produced anymore."; mes "Therefore, it will be better if you check up on them from time to time."; close; } } } //== WoE : Guild Dungeon Entrances ========================= - script Lever#gd::gdlever FAKE_NPC,{ .@GID = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1); if (.@GID == 0) { mes "[Ringing Voice]"; mes "'Those who overcome an ordeal shows a great deal of bravery... and will find their way to another ordeal.'"; close; } if (compare(strnpcinfo(NPC_NAME_HIDDEN),"aldeg")) { .@destination$ = "gld_dun02"; if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas01")) setarray .@coordinates[0],32,122; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas02")) setarray .@coordinates[0],79,30; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas03")) setarray .@coordinates[0],165,38; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas04")) setarray .@coordinates[0],160,148; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas05")) setarray .@coordinates[0],103,169; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"gefg")) { .@destination$ = "gld_dun04"; if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas01")) setarray .@coordinates[0],39,258; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas02")) setarray .@coordinates[0],125,270; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas03")) setarray .@coordinates[0],268,251; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas04")) setarray .@coordinates[0],268,108; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas05")) setarray .@coordinates[0],230,35; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"payg")) { .@destination$ = "gld_dun01"; if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas01")) setarray .@coordinates[0],186,165; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas02")) setarray .@coordinates[0],54,165; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas03")) setarray .@coordinates[0],54,39; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas04")) setarray .@coordinates[0],186,39; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas05")) setarray .@coordinates[0],223,202; } else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"prtg")) { .@destination$ = "gld_dun03"; if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas01")) setarray .@coordinates[0],28,251; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas02")) setarray .@coordinates[0],164,268; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas03")) setarray .@coordinates[0],164,179; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas04")) setarray .@coordinates[0],268,203; else if (compare(strnpcinfo(NPC_NAME_HIDDEN),"cas05")) setarray .@coordinates[0],199,28; } // Add custom Guild Castles here. else { end; } mes "[Ringing Voice]"; mes "'Only the truly brave can take the test.'"; next; mes " "; mes "There's a small lever. Will you pull it?"; next; if(select("Pull.", "Don't pull.") == 1) { if (getcharid(CHAR_ID_GUILD) == .@GID) { close2; warp .@destination$,.@coordinates[0],.@coordinates[1]; end; } mes " "; mes "Nothing happened."; close; } close; } //== Guardian Spawner Template ============================= - script Gld_Guard_Template::Gld_Guard_Template FAKE_NPC,{ // Spawn Guardians in castles // When adding new castles, ensure that the coordinates coincide with the // coordinates defined in the Guild Steward template. OnSpawnGuardians: // Define the types of guardians on a per castle basis. // 1 - Soldier Guardian; 2 - Archer Guardian; 3 - Knight Guardian // Define the x spawn point for each uardian. // [0] = 1st guardian's x spawn point. // Define the y spawn point for each uardian. // [0] = 1st guardian's y spawn point. // Aldebaran (Luina) Castles if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas01") { setarray .@guardiantype[0],1,2,2,2,2,3,3,3; setarray .@guardianposx[0],17,39,38,45,21,218,213,73; setarray .@guardianposy[0],218,208,196,228,194,24,24,70; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas02") { setarray .@guardiantype[0],3,3,3,1,1,2,2,2; setarray .@guardianposx[0],27,88,117,60,51,21,36,210; setarray .@guardianposy[0],184,43,46,202,183,177,183,7; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas03") { setarray .@guardiantype[0],3,3,1,1,1,2,2,2; setarray .@guardianposx[0],90,116,86,116,64,212,195,110; setarray .@guardianposy[0],112,112,120,76,103,160,151,217; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas04") { setarray .@guardiantype[0],2,2,2,1,1,1,3,3; setarray .@guardianposx[0],187,192,148,145,169,198,48,55; setarray .@guardianposy[0],100,42,88,209,53,77,72,88; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas05") { setarray .@guardiantype[0],2,2,1,1,3,3,3,3; setarray .@guardianposx[0],51,188,157,157,27,145,156,41; setarray .@guardianposy[0],202,79,192,74,221,78,73,112; } // Geffen (Britoniah) Castles else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas01") { setarray .@guardiantype[0],1,1,1,2,2,3,3,3; setarray .@guardianposx[0],67,184,62,36,50,50,189,200; setarray .@guardianposy[0],179,20,41,186,186,67,41,167; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas02") { setarray .@guardiantype[0],1,1,1,2,2,3,3,3; setarray .@guardianposx[0],64,56,166,35,20,19,166,159; setarray .@guardianposy[0],168,41,25,148,150,41,42,188; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas03") { setarray .@guardiantype[0],2,2,1,1,1,3,3,3; setarray .@guardianposx[0],48,113,48,157,243,157,234,238; setarray .@guardianposy[0],176,214,207,62,41,45,25,160; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas04") { setarray .@guardiantype[0],2,2,1,1,1,3,3,3; setarray .@guardianposx[0],53,31,49,29,147,57,160,148; setarray .@guardianposy[0],191,178,220,46,65,46,50,189; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas05") { setarray .@guardiantype[0],2,2,1,1,1,3,3,3; setarray .@guardianposx[0],45,71,72,66,177,66,177,193; setarray .@guardianposy[0],149,163,142,47,50,17,35,166; } // Payon (Baulder) Castles else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas01") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],229,225,222,99,65,36,51,138; setarray .@guardianposy[0],92,80,111,45,31,127,144,133; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas02") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],237,228,210,57,42,287,264,27; setarray .@guardianposy[0],54,72,41,241,241,257,272,20; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas03") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],245,269,36,41,39,19,37,268; setarray .@guardianposy[0],37,51,39,39,65,276,277,244; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas04") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],251,232,231,32,32,35,36,270; setarray .@guardianposy[0],212,212,175,287,232,45,17,41; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas05") { setarray .@guardiantype[0],2,2,2,2,2,2,2,3; setarray .@guardianposx[0],19,33,266,266,263,263,250,36; setarray .@guardianposy[0],279,260,234,279,37,21,22,36; } // Prontera (Valkyrie Realms) Castles else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas01") { setarray .@guardiantype[0],1,1,1,2,2,3,3,3; setarray .@guardianposx[0],182,182,153,59,50,184,196,107; setarray .@guardianposy[0],62,116,86,28,36,183,189,179; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas02") { setarray .@guardiantype[0],3,3,3,1,1,2,2,2; setarray .@guardianposx[0],161,153,178,71,49,64,7,75; setarray .@guardianposy[0],161,161,44,75,28,186,196,175; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas03") { setarray .@guardiantype[0],3,3,3,1,1,2,2,2; setarray .@guardianposx[0],191,137,45,50,41,191,179,191; setarray .@guardianposy[0],190,190,99,87,87,42,43,72; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas04") { setarray .@guardiantype[0],3,3,3,1,1,1,2,2; setarray .@guardianposx[0],276,274,246,38,29,33,78,36; setarray .@guardianposy[0],14,35,246,240,240,258,48,61; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas05") { setarray .@guardiantype[0],3,3,3,1,1,1,2,2; setarray .@guardianposx[0],266,287,245,236,251,278,32,44; setarray .@guardianposy[0],262,280,250,63,63,253,253,248; } // Add custom Guild Castles here. else { end; } // Kill all existing guardians before spawning new ones. // This should prevent duplicating Guardians when char Server disconnects. killmonster strnpcinfo(NPC_NAME_HIDDEN),strnpcinfo(NPC_NAME)+"::OnGuardianDied"; for (.@i = 0; .@i <= 7; ++.@i) { .@UseGID = .@i + 10; if (.@guardiantype[.@i] == 1) { .@type = 1287; } else if (.@guardiantype[.@i] == 2) { .@type = 1285; } else { .@type = 1286; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),.@UseGID)) { guardian strnpcinfo(NPC_NAME_HIDDEN),.@guardianposx[.@i],.@guardianposy[.@i],strmobinfo(2,.@type),.@type,"Guardian#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnGuardianDied",.@i; } } end; OnGuardianDied: end; } //== Treasure Room Spawn Template ========================== - script Gld_Trea_Spawn::Gld_Trea_Spawn FAKE_NPC,{ end; OnClock0001: // Do nothing if this script is the template. if (strnpcinfo(NPC_NAME_VISIBLE) == "Gld_Trea_Spawn") end; .@GID = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),1); // If there is no owner, do nothing. if (!.@GID) end; // Is there Economy in this castle? .@Treasure = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2)/5+4; // Set information if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas01") { .@treasurebox = 1324; setarray .@treasurex[0],115,122,115,122,116,117,118,119,120,121,121,121,121,121,121,120,119,118,117,116,116,116,116,116; setarray .@treasurey[0],226,226,219,219,225,225,225,225,225,225,224,223,222,221,220,220,220,220,220,220,221,222,223,224; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas02") { .@treasurebox = 1326; setarray .@treasurex[0],134,135,135,134,132,133,134,135,136,137,137,137,137,137,137,136,135,134,133,132,132,132,132,132; setarray .@treasurey[0],231,231,230,230,233,233,233,233,233,233,232,231,230,229,228,228,228,228,228,228,229,230,231,232; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas03") { .@treasurebox = 1328; setarray .@treasurex[0],224,225,225,224,222,223,224,225,226,227,227,227,227,227,227,226,225,224,223,222,222,222,222,222; setarray .@treasurey[0],269,269,268,268,271,271,271,271,271,271,270,269,268,267,266,266,266,266,266,266,267,268,269,270; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas04") { .@treasurebox = 1330; setarray .@treasurex[0],84,85,85,84,82,83,84,85,86,87,87,87,87,87,87,86,85,84,83,82,82,82,82,82; setarray .@treasurey[0],13,13,12,12,15,15,15,15,15,15,14,13,12,11,10,10,10,10,10,10,11,12,13,14; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "aldeg_cas05") { .@treasurebox = 1332; setarray .@treasurex[0],61,62,62,61,59,60,61,62,63,64,64,64,64,64,64,63,62,61,60,59,59,59,59,59; setarray .@treasurey[0],12,12,11,11,14,14,14,14,14,14,13,12,11,10,9,9,9,9,9,9,10,11,12,13; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas01") { .@treasurebox = 1334; setarray .@treasurex[0],153,154,154,153,151,152,153,154,155,156,156,156,156,156,156,155,154,153,152,151,151,151,151,151; setarray .@treasurey[0],113,113,112,112,115,115,115,115,115,115,114,113,112,111,110,110,110,110,110,110,111,112,113,114; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas02") { .@treasurebox = 1336; setarray .@treasurex[0],139,140,140,139,137,138,139,140,141,142,142,142,142,142,142,141,140,139,138,137,137,137,137,137; setarray .@treasurey[0],115,115,114,114,117,117,117,117,117,117,116,115,114,113,112,112,112,112,112,112,113,114,115,116; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas03") { .@treasurebox = 1338; setarray .@treasurex[0],269,270,270,269,267,268,269,270,271,272,272,272,272,272,272,271,270,269,268,267,267,267,267,267; setarray .@treasurey[0],291,291,290,290,293,293,293,293,293,293,292,291,290,289,288,288,288,288,288,288,289,290,291,292; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas04") { .@treasurebox = 1340; setarray .@treasurex[0],115,116,116,115,113,114,115,116,117,118,118,118,118,118,118,117,116,115,114,113,113,113,113,113; setarray .@treasurey[0],119,119,118,118,121,121,121,121,121,121,120,119,118,117,116,116,116,116,116,116,117,118,119,120; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "gefg_cas05") { .@treasurebox = 1342; setarray .@treasurex[0],143,144,144,143,141,142,143,144,145,146,146,146,146,146,146,145,144,143,142,141,141,141,141,141; setarray .@treasurey[0],110,110,109,109,112,112,112,112,112,112,111,110,109,108,107,107,107,107,107,107,108,109,110,111; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas01") { .@treasurebox = 1344; setarray .@treasurex[0],289,292,292,289,288,289,290,291,292,293,293,293,293,293,293,292,291,290,289,288,288,288,288,288; setarray .@treasurey[0],10,10,7,7,11,11,11,11,11,11,10,9,8,7,6,6,6,6,6,6,7,8,9,10; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas02") { .@treasurebox = 1346; setarray .@treasurex[0],143,146,146,143,142,143,144,145,146,147,147,147,147,147,147,146,145,144,143,142,142,142,142,142; setarray .@treasurey[0],146,146,143,143,147,147,147,147,147,147,146,145,144,143,142,142,142,142,142,142,143,144,145,146; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas03") { .@treasurebox = 1348; setarray .@treasurex[0],158,159,159,158,156,157,158,159,160,161,161,161,161,161,161,160,159,158,157,156,156,156,156,156; setarray .@treasurey[0],169,169,168,168,171,171,171,171,171,171,170,169,168,167,166,166,166,166,166,166,167,168,169,170; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas04") { .@treasurebox = 1350; setarray .@treasurex[0],146,147,147,146,144,145,146,147,148,149,149,149,149,149,149,148,147,146,145,144,144,144,144,144; setarray .@treasurey[0],48,48,47,47,50,50,50,50,50,50,49,48,47,46,45,45,45,45,45,45,46,47,48,49; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "payg_cas05") { .@treasurebox = 1352; setarray .@treasurex[0],155,158,158,155,154,155,156,157,158,159,159,159,159,159,159,158,157,156,155,154,154,154,154,154; setarray .@treasurey[0],134,134,131,131,135,135,135,135,135,135,134,133,132,131,130,130,130,130,130,130,131,132,133,134; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas01") { .@treasurebox = 1354; setarray .@treasurex[0],10,11,11,10,8,9,10,11,12,13,13,13,13,13,13,12,11,10,9,8,8,8,8,8; setarray .@treasurey[0],209,209,208,208,211,211,211,211,211,211,210,209,208,207,206,206,206,206,206,206,207,208,209,210; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas02") { .@treasurebox = 1356; setarray .@treasurex[0],201,202,202,201,199,200,201,202,203,204,204,204,204,204,204,203,202,201,200,199,199,199,199,199; setarray .@treasurey[0],228,228,227,227,230,230,230,230,230,230,229,228,227,226,225,225,225,225,225,225,226,227,228,229; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas03") { .@treasurebox = 1358; setarray .@treasurex[0],187,188,188,187,185,186,187,188,189,190,190,190,190,190,190,189,188,187,186,185,185,185,185,185; setarray .@treasurey[0],132,132,131,131,134,134,134,134,134,134,133,132,131,130,129,129,129,129,129,129,130,131,132,133; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas04") { .@treasurebox = 1360; setarray .@treasurex[0],269,270,270,269,267,268,269,270,271,272,272,272,272,272,272,271,270,269,268,267,267,267,267,267; setarray .@treasurey[0],162,162,161,161,164,164,164,164,164,164,163,162,161,160,159,159,159,159,159,159,160,161,162,163; } else if (strnpcinfo(NPC_NAME_HIDDEN) == "prtg_cas05") { .@treasurebox = 1362; setarray .@treasurex[0],275,276,276,275,273,274,275,276,277,278,278,278,278,278,278,277,276,275,274,273,273,273,273,273; setarray .@treasurey[0],178,178,177,177,180,180,180,180,180,180,179,178,177,176,175,175,175,175,175,175,176,177,178,179; } // Add custom Guild Castles here. else { end; } // Apply investment to Eco. and Def. Only happens if there were investments made. // Permanent Development can only happen once per day. if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4)) { .@Economy = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2); setcastledata strnpcinfo(NPC_NAME_HIDDEN),2,.@Economy + getcastledata(strnpcinfo(NPC_NAME_HIDDEN),4) + (rand(2) && getgdskilllv(.@GID,10014)); if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),2) > 100) setcastledata strnpcinfo(NPC_NAME_HIDDEN),2,100; } if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5)) { .@defence = getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3); setcastledata strnpcinfo(NPC_NAME_HIDDEN),3,.@defence + getcastledata(strnpcinfo(NPC_NAME_HIDDEN),5); if (getcastledata(strnpcinfo(NPC_NAME_HIDDEN),3) > 100) setcastledata strnpcinfo(NPC_NAME_HIDDEN),3,100; } // Reset daily investment limits. setcastledata strnpcinfo(NPC_NAME_HIDDEN),4,0; setcastledata strnpcinfo(NPC_NAME_HIDDEN),5,0; // Spawn boxes in proper order. for (.@i = 0; .@i < .@Treasure ; ++.@i) { // set treasure box ID .@boxid = .@treasurebox + (.@i+2) % 2; .@box = 1 << .@i; // Spawn or do not spawn chests if one already exists. if ((getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & .@box) == 0) { monster strnpcinfo(NPC_NAME_HIDDEN),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",.@boxid,1,"Treasure#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnTreasureDied"+.@i; setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") | .@box; } } end; // Individual "You killed a chest" events to ensure proper spawning at the change of day. OnTreasureDied0: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~1; end; OnTreasureDied1: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~2; end; OnTreasureDied2: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~4; end; OnTreasureDied3: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~8; end; OnTreasureDied4: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~16; end; OnTreasureDied5: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~32; end; OnTreasureDied6: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~64; end; OnTreasureDied7: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~128; end; OnTreasureDied8: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~256; end; OnTreasureDied9: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~512; end; OnTreasureDied10: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~1024; end; OnTreasureDied11: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~2048; end; OnTreasureDied12: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~4096; end; OnTreasureDied13: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~8192; end; OnTreasureDied14: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~16384; end; OnTreasureDied15: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~32768; end; OnTreasureDied16: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~65536; end; OnTreasureDied17: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~131072; end; OnTreasureDied18: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~262144; end; OnTreasureDied19: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~524288; end; OnTreasureDied20: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~1048576; end; OnTreasureDied21: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~2097152; end; OnTreasureDied22: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~4194304; end; OnTreasureDied23: setd "$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure",getd("$@"+strnpcinfo(NPC_NAME_HIDDEN)+"_treasure") & ~8388608; end; }
  19. Breaker name doesn't show, just blank
  20. How can i edit the messages conf where should i put description to make it work?
  21. Hello, I would like to increase the auto blitz and skill blitz beat like 30% without touching damage of falcon assault. here's the script i tried tto modify and i failed.. (Blitz Beat increased also falcon assault increase damage but the auto doesn't) battle.c case HT_BLITZBEAT: case SN_FALCONASSAULT: //Blitz-beat Damage. if(!sd || (temp = pc->checkskill(sd,HT_STEELCROW)) <= 0) temp=0; md.damage=(sstatus->dex/10+sstatus->int_/2+temp*3+40)*2; if(mflag > 1) //Autocasted Blitz. nk|=NK_SPLASHSPLIT; if (skill_id == SN_FALCONASSAULT) { //Div fix of Blitzbeat temp = skill->get_num(HT_BLITZBEAT, 5); damage_div_fix(md.damage, temp); //Falcon Assault Modifier md.damage=md.damage*(150+70*skill_lv)/100; }
  22. Hello, I found this script from rathena and It refines up to +12 but i just want to set the max refine to +10 Ticket Only.. here is the script Please help me.. PS Already tried removing +12 and +11 and the npc doesnt work so i came here to get some hhelp.. // http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/ prontera,184,177,5 script Refine Master 851,{ function _check { if(getequiprefinerycnt(getarg(0))) { next; mes "Your equip refine level should be 0."; close; } if(!getequipisenableref(getarg(0))) { next; mes "I can't refine this."; close; } return; } mes "I'll make your item refined up to same level with your Ticket you have."; mes "You don't have to worry! There's no chance to break your item."; set @c,select("+5 Weapon Deed", "+6 Weapon Deed", "+7 Weapon Deed", "+8 Weapon Deed", "+9 Weapon Deed", "+10 Weapon Deed", "+11 Weapon Deed", "+12 Weapon Deed", "+5 Armor Deed", "+6 Armor Deed", "+7 Armor Deed", "+8 Armor Deed", "+9 Armor Deed", "+10 Armor Deed", "+11 Armor Deed", "+12 Armor Deed"); set @deed_item_id,8000+@c; //set @deed_item_id,7037; if(!countitem(@deed_item_id)) { next; mes "You don't have '"+getitemname(@deed_item_id)+"'"; close; } if(0<@c&&@c<9) { set @b,5-select(""+getequipname(EQI_HAND_R)+":"+(getiteminfo(EQI_HAND_L,2)==4?getequipname(EQI_HAND_L):"")); _check(@; }else{ set @b,select(getequipname(EQI_HEAD_TOP)+":"+getequipname(EQI_ARMOR)+":"+getequipname(EQI_GARMENT)+":"+getequipname(EQI_SHOES)+":"+(getiteminfo(EQI_HAND_L,2)==4?"":getequipname(EQI_HAND_L))); deletearray .@way[0],128; setarray .@way[1],1,2,5,6,3; set @b,.@way[@b]; _check(@; } next; setarray .@ref[0],12,5,6,7,8,9,10,11; set @r,.@ref[@c%8]; mes "I'm going to refine"; mes ""+getequipname(@+""; mes "up to "+@r+" level with"; mes ""+getitemname(@deed_item_id)+""; mes "may I go on this job?"; if(select("No","Yes")==2) { if(!countitem(@deed_item_id)) { next; mes "You don't have '"+getitemname(@deed_item_id)+"'"; close; } _check(@; for(set .@i,0;.@i<@r;set .@i,.@i+1) successrefitem @b; mes "Done"; delitem @deed_item_id,1; } set @c,0; set @b,0; set @r,0; set @deed_item_id,0; close; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.