Jump to content

Rivers

Members
  • Posts

    152
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Rivers

  1. I re-ran the commands without CP in it, they went through successfully but it still changed nothing.
  2. [[email protected] ~]# chmod -R 777 /var/www/html/FluxCP/data/logs [[email protected] ~]# chown -R apache:apache /var/www/html/FluxCP/cp/data/logs chown: cannot access ‘/var/www/html/FluxCP/cp/data/logs’: No such file or directory [[email protected] ~]# [[email protected] ~]# chmod -R 777 /var/www/html/FluxCP/cp/data/itemshop chmod: cannot access ‘/var/www/html/FluxCP/cp/data/itemshop’: No such file or directory [[email protected] ~]# chown -R apache:apache /var/www/html/FluxCP/cp/data/itemshop chown: cannot access ‘/var/www/html/FluxCP/cp/data/itemshop’: No such file or directory [[email protected] ~]# [[email protected] ~]# chmod -R 777 /var/www/html/FluxCP/cp/data/tmp chmod: cannot access ‘/var/www/html/FluxCP/cp/data/tmp’: No such file or directory [[email protected] ~]# chown -R apache:apache /var/www/html/FluxCP/data/tmp This was the results of that.
  3. total 48K drwxrwxrwx. 11 apache root 262 Dec 9 23:21 . drwxrwxrwx. 4 apache root 33 Dec 9 23:21 .. drwxrwxrwx. 3 apache root 24 Dec 9 19:18 addons drwxrwxrwx. 2 apache root 4.0K Dec 9 19:18 config drwxrwxrwx. 15 apache root 203 Dec 10 01:44 data drwxrwxrwx. 2 apache root 47 Dec 9 19:18 doc -rwxrwxrwx. 1 apache root 337 Dec 9 19:18 .editorconfig -rwxrwxrwx. 1 apache root 2.6K Dec 9 19:18 error.php -rwxrwxrwx. 1 apache root 1.2K Dec 9 19:18 favicon.ico drwxrwxrwx. 8 apache root 163 Dec 9 19:18 .git -rwxrwxrwx. 1 apache root 300 Dec 9 19:18 .gitignore -rwxrwxrwx. 1 apache root 177 Dec 9 19:18 .htaccess -rwxrwxrwx. 1 apache root 6.8K Dec 9 19:18 index.php drwxrwxrwx. 2 apache root 74 Dec 9 19:18 lang drwxrwxrwx. 5 apache root 86 Dec 9 19:18 lib -rwxrwxrwx. 1 apache root 7.5K Dec 9 19:18 LICENSE drwxrwxrwx. 35 apache root 4.0K Dec 9 19:18 modules -rwxrwxrwx. 1 apache root 2.4K Dec 9 19:18 README.md drwxrwxrwx. 5 apache root 55 Dec 9 23:23 themes Thanks for your fast reply.
  4. Critical Error An error was encountered during the lifetime of the application. This could be due to a variety of problems, such as a bug in the application. However, normally it is caused by misconfiguration. Exception Details Error: Flux_PermissionError Message: The log storage directory '/var/www/html/FluxCP/data/logs' is not writable. Remedy with `chmod 0600 /var/www/html/FluxCP/data/logs` File: /var/www/html/FluxCP/index.php:123 Good day, I cannot get past this error. I have given full permissions to these directories; 0707,0777,0600. "Remedy with `chmod 0600 /var/www/html/FluxCP/data/logs`" does not work. running on Mariadb, centos7, fluxcp
  5. I have this in there currently. // Hourly Castle 99,gl_cas02,Glastheim Castle,Agit#hourwoe
  6. Thanks so very much. This works more the way I am looking for. You're the best!
  7. good day, I'm looking for a simple Invasion script that will spawn, either a set or random amount, of a specific monster set. I'm looking to use this for Seasonal Invasions, like Christmas mobs for Christmas season invasions.
  8. This failed to work. Is there an updated version that works?
  9. Oh my gosh, thanks so much. I was making it way more complicated than it had to be.
  10. Good day, As the above reads, I'm looking to make my @veil command disallowed in WoE. Anyone able to help me make this happen? // Heroes of Vanaheim ==================== //======================================== - script at_veil_cmd -1,{ OnVeilWarp: warp "veil",120,145; end; OnInit: bindatcmd "veil", strnpcinfo(0)+"::OnVeilWarp"; }
  11. Good day, I've been tinkering around with the WoE settings and am trying toa dd an Emperium spawn inside gl_cas02. Below is my script for WoE. I think I added everything correctly, but nothing spawns. If anyone can figure it out that'd bre great, many thanks! //===== rAthena Script ======================================= //= War of Emperium Guild Template File //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== //= 2.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= [Official Conversion] //= ---------------------------------------------------------- //= - 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 let's //= 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. //===== Additional Comments: ================================= //= 1.0 First Version. No longer uses functions. [L0ne_W0lf] //= 1.1 Daily investement will now be reset. [L0ne_W0lf] //= Template will no longer try to spawn chests. //= 1.2 Fixed Eco Invest option charging twice. [L0ne_W0lf] //= 1.3 Fixed a loading flag emblem for Payon 1. [L0ne_W0lf] //= Fixed two typos regarding Guild Steward name. //= 1.4 Fixed a typo in defense investment. [L0ne_W0lf] //= 1.5 Fixed spawn point of the emperium in Payon 1. [L0ne_W0lf] //= Double-investing doubles the price now. //= 1.6 Corrected Zeny check when summoning guardians. [L0ne_W0lf] //= Corrected cost for investing, thanks to Ai4rei. //= Second invest is now quadruple the value of the first //= Investing now happens at the turn of the day. //= 1.6a Corrected conditions in the new investing blocks. [L0ne_W0lf] //= 1.6b Moved where investments are added to eco/def. [L0ne_W0lf] //= 1.7 Updated Agitbreak announcements, added bc_woe [L0ne_W0lf] //= and added extended anouncement format for mapannounce. //= 1.8 Fixed a possible exploit in guild castle investment. [Brian] //= 1.9 Partially rewrote Script. [Masao] //= 1.9a Fixed incorrect setcastledata parameter. [Euphy] //= 2.0 Fixed an issue where Castle Manager couldn't be fired. [Joseph] //============================================================ // WoE : Main Functions //============================================================ - script Gld_Agit_Manager::Gld_Agit_Manager -1,{ end; // War of Emperium has started. OnAgitStart: if (strnpcinfo(0) == "Gld_Agit_Manager") end; MapRespawnGuildID strnpcinfo(2),GetCastleData(strnpcinfo(2),CD_GUILD_ID),6; GvgOn strnpcinfo(2); // Spawn (fall through), or respawn the Emperium once it has been broken. OnStartArena: // OnAgitStart will fall through and spawn the Emperium. if (strnpcinfo(2) == "aldeg_cas01") { setarray [email protected][0],216,23; } else if (strnpcinfo(2) == "aldeg_cas02") { setarray [email protected][0],213,23; } else if (strnpcinfo(2) == "aldeg_cas03") { setarray [email protected][0],205,31; } else if (strnpcinfo(2) == "aldeg_cas04") { setarray [email protected][0],36,217; } else if (strnpcinfo(2) == "aldeg_cas05") { setarray [email protected][0],27,101; } else if (strnpcinfo(2) == "gefg_cas01") { setarray [email protected][0],197,181; } else if (strnpcinfo(2) == "gefg_cas02") { setarray [email protected][0],176,178; } else if (strnpcinfo(2) == "gefg_cas03") { setarray [email protected][0],244,166; } else if (strnpcinfo(2) == "gefg_cas04") { setarray [email protected][0],174,177; } else if (strnpcinfo(2) == "gefg_cas05") { setarray [email protected][0],194,184; } else if (strnpcinfo(2) == "payg_cas01") { setarray [email protected][0],139,139; } else if (strnpcinfo(2) == "payg_cas02") { setarray [email protected][0],38,25; } else if (strnpcinfo(2) == "payg_cas03") { setarray [email protected][0],269,265; } else if (strnpcinfo(2) == "payg_cas04") { setarray [email protected][0],270,28; } else if (strnpcinfo(2) == "payg_cas05") { setarray [email protected][0],30,30; } else if (strnpcinfo(2) == "prtg_cas01") { setarray [email protected][0],197,197; } else if (strnpcinfo(2) == "prtg_cas02") { setarray [email protected][0],157,174; } else if (strnpcinfo(2) == "prtg_cas03") { setarray [email protected][0],16,220; } else if (strnpcinfo(2) == "prtg_cas04") { setarray [email protected][0],291,14; } else if (strnpcinfo(2) == "prtg_cas05") { setarray [email protected][0],266,266; } else if (strnpcinfo(2) == "gl_cas02") { setarray [email protected][0],104,147; } // Add custom Guild Castles here. else { end; } if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) { monster strnpcinfo(2),[email protected][0],[email protected][1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak"; } end; // The Emperium has been broken. OnAgitBreak: set [email protected],getcharid(2); // Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen) if ([email protected] <= 0) { set [email protected]$,"Character "+strcharinfo(0)+" ("+getcharid(0)+") broke the Emperium in Castle: "+strnpcinfo(2)+" while guildless. No data will be saved and Emperium respawned."; logmes [email protected]$; debugmes [email protected]$; donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; end; } // Adjust Economy Invest Level for Castle set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY) - 3; if ([email protected] < 0) set [email protected], 0; SetCastleData strnpcinfo(2), CD_CURRENT_ECONOMY, [email protected]; // Adjust Defense Invest Level for Castle set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_DEFENSE) - 3; if ([email protected] < 0) set [email protected], 0; SetCastleData strnpcinfo(2), CD_CURRENT_DEFENSE, [email protected]; // Set new Castle Occupant SetCastleData strnpcinfo(2),CD_GUILD_ID, [email protected]; // Announce that the Emperium is destroyed, and respawn all but new castle-occupants. mapannounce strnpcinfo(2),"The emperium has been destroyed.",bc_map|bc_woe,"0x00CCFF",FW_NORMAL,12; MapRespawnGuildID strnpcinfo(2),[email protected],6; // Refresh castle data, disable Kafra and reset Invest information. donpcevent strnpcinfo(0)+"::OnRecvCastle"; disablenpc "Kafra Staff#"+strnpcinfo(2); for( set [email protected], CD_INVESTED_ECONOMY; [email protected] <= CD_ENABLED_KAFRA; set [email protected], [email protected]+1 ) { SetCastleData strnpcinfo(2), [email protected], 0; } // Erase Guardian Database information if the new owners do not have Guardian Research. if( getgdskilllv([email protected],10002) == 0 ) { for( set [email protected], CD_ENABLED_GUARDIAN00; [email protected] < CD_MAX; set [email protected], [email protected]+1 ) { SetCastleData strnpcinfo(2), [email protected], 0; } } // Respawn the Emperium, and display new owners. sleep 500; // Slow down script execution slightly. if( agitcheck() ) donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; sleep 7000; announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by the [" + getguildName([email protected]) + "] guild.",bc_all|bc_woe; end; // War of Emperium has ended. OnAgitEnd: if (strnpcinfo(0) == "Gld_Agit_Manager") end; GvgOff strnpcinfo(2); // If the castle has no owner at the end of WoE, do not kill Emperium. if (GetCastleData(strnpcinfo(2),CD_GUILD_ID)) { KillMonster strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak"; } end; // Occupying Guild has been disbanded. OnGuildBreak: if (strnpcinfo(0) == "Gld_Agit_Manager") end; // Kill guardians, disable the Kafra, and set owner to 0. killmonster strnpcinfo(2),"Guardian#"+strnpcinfo(2)+"::OnGuardianDied"; disablenpc "Kafra Staff#"+strnpcinfo(2); SetCastleData strnpcinfo(2),CD_GUILD_ID,0; // Wait before refreshing guild information. sleep 7000; Announce "Guild Base [" + GetCastleName(strnpcinfo(2)) + "] has been abandoned.",0; donpcevent strnpcinfo(0)+"::OnRecvCastle"; end; OnAgitInit: OnRecvCastle: if (strnpcinfo(0) == "Gld_Agit_Manager") end; // Spawn Monsters if the castle is empty. set [email protected], GetCastleData(strnpcinfo(2),CD_GUILD_ID); if ([email protected] == 0) { killmonsterall strnpcinfo(2); if (compare(strnpcinfo(2),"aldeg")) { // Normal Spawns monster strnpcinfo(2),0,0,"Evil Druid",1117,10; monster strnpcinfo(2),0,0,"Khalitzburg",1132,5; monster strnpcinfo(2),0,0,"Abysmal Knight",1219,5; monster strnpcinfo(2),0,0,"Executioner",1205,4; monster strnpcinfo(2),0,0,"Penomena",1216,10; monster strnpcinfo(2),0,0,"Alarm",1193,18; monster strnpcinfo(2),0,0,"Clock",1269,9; monster strnpcinfo(2),0,0,"Raydric Archer",1276,7; monster strnpcinfo(2),0,0,"Wanderer",1208,3; monster strnpcinfo(2),0,0,"Alice",1275,1; monster strnpcinfo(2),0,0,"Bloody Knight",1268,5; monster strnpcinfo(2),0,0,"Dark Lord",1272,3; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(2) == "aldeg_cas01") { setarray [email protected][0],216,23; } else if (strnpcinfo(2) == "aldeg_cas02") { setarray [email protected][0],213,23; } else if (strnpcinfo(2) == "aldeg_cas03") { setarray [email protected][0],205,31; } else if (strnpcinfo(2) == "aldeg_cas04") { setarray [email protected][0],36,217; } else if (strnpcinfo(2) == "aldeg_cas05") { setarray [email protected][0],27,101; } monster strnpcinfo(2),[email protected][0],[email protected][1],"Dark Lord",1272,2; monster strnpcinfo(2),[email protected][0],[email protected][1],"Tower Keeper",1270,5; monster strnpcinfo(2),[email protected][0],[email protected][1],"Bloody Knight",1268,5; monster strnpcinfo(2),[email protected][0],[email protected][1],"Abysmal Knight",1219,5; monster strnpcinfo(2),[email protected][0],[email protected][1],"Raydric Archer",1276,10; } else if (compare(strnpcinfo(2),"gefg")) { // Normal Spawns monster strnpcinfo(2),0,0,"Evil Druid",1117,10; monster strnpcinfo(2),0,0,"Wind Ghost",1263,11; monster strnpcinfo(2),0,0,"Bathory",1102,10; monster strnpcinfo(2),0,0,"Jakk",1130,10; monster strnpcinfo(2),0,0,"Marduk",1140,20; monster strnpcinfo(2),0,0,"Raydric",1163,9; monster strnpcinfo(2),0,0,"Alice",1275,1; monster strnpcinfo(2),0,0,"Abysmal Knight",1219,1; monster strnpcinfo(2),0,0,"Moonlight Flower",1150,1; monster strnpcinfo(2),0,0,"Phreeoni",1159,1; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(2) == "gefg_cas01") { setarray [email protected][0],197,181; } else if (strnpcinfo(2) == "gefg_cas02") { setarray [email protected][0],176,178; } else if (strnpcinfo(2) == "gefg_cas03") { setarray [email protected][0],244,166; } else if (strnpcinfo(2) == "gefg_cas04") { setarray [email protected][0],174,177; } else if (strnpcinfo(2) == "gefg_cas05") { setarray [email protected][0],194,184; } monster strnpcinfo(2),[email protected][0],[email protected][1],"Mysteltainn",1203,4; monster strnpcinfo(2),[email protected][0],[email protected][1],"Orc Hero",1087,2; monster strnpcinfo(2),[email protected][0],[email protected][1],"High Orc",1213,10; monster strnpcinfo(2),[email protected][0],[email protected][1],"Orc Archer",1189,10; } else if (compare(strnpcinfo(2),"payg")) { // Normal Spawns monster strnpcinfo(2),0,0,"Greatest General",1277,9; monster strnpcinfo(2),0,0,"Wanderer",1208,10; monster strnpcinfo(2),0,0,"Mutant Dragonoid",1262,5; monster strnpcinfo(2),0,0,"Bathory",1102,5; monster strnpcinfo(2),0,0,"Moonlight Flower",1150,1; monster strnpcinfo(2),0,0,"Eddga",1115,1; monster strnpcinfo(2),0,0,"Horong",1129,11; monster strnpcinfo(2),0,0,"Raydric Archer",1276,5; monster strnpcinfo(2),0,0,"Kobold Archer",1282,4; monster strnpcinfo(2),0,0,"Gargoyle",1253,5; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(2) == "payg_cas01") { setarray [email protected][0],139,139; } else if (strnpcinfo(2) == "payg_cas02") { setarray [email protected][0],38,25; } else if (strnpcinfo(2) == "payg_cas03") { setarray [email protected][0],269,265; } else if (strnpcinfo(2) == "payg_cas04") { setarray [email protected][0],270,28; } else if (strnpcinfo(2) == "payg_cas05") { setarray [email protected][0],30,30; } monster strnpcinfo(2),[email protected][0],[email protected][1],"Moonlight Flower",1150,1; monster strnpcinfo(2),[email protected][0],[email protected][1],"Eddga",1115,1; monster strnpcinfo(2),[email protected][0],[email protected][1],"Wanderer",1208,6; monster strnpcinfo(2),[email protected][0],[email protected][1],"Raydric Archer",1276,5; } else if (compare(strnpcinfo(2),"prtg")) { // Normal Spawns monster strnpcinfo(2),0,0,"Raydric",1163,1; monster strnpcinfo(2),0,0,"Khalitzburg",1132,10; monster strnpcinfo(2),0,0,"Abysmal Knight",1219,5; monster strnpcinfo(2),0,0,"Bloody Knight",1268,5; monster strnpcinfo(2),0,0,"Stormy Knight",1251,1; monster strnpcinfo(2),0,0,"Hatii",1252,1; monster strnpcinfo(2),0,0,"Raydric Archer",1276,5; monster strnpcinfo(2),0,0,"Gryphon",1259,2; monster strnpcinfo(2),0,0,"Chimera",1283,3; monster strnpcinfo(2),0,0,"Alice",1275,1; monster strnpcinfo(2),0,0,"Zealotus",1200,1; // Set Emperium room spawn coordinates and spawn monsters. if (strnpcinfo(2) == "prtg_cas01") { setarray [email protected][0],197,197; } else if (strnpcinfo(2) == "prtg_cas02") { setarray [email protected][0],157,174; } else if (strnpcinfo(2) == "prtg_cas03") { setarray [email protected][0],16,220; } else if (strnpcinfo(2) == "prtg_cas04") { setarray [email protected][0],291,14; } else if (strnpcinfo(2) == "prtg_cas05") { setarray [email protected][0],266,266; } monster strnpcinfo(2),[email protected][0],[email protected][1],"Guardian Knight",1268,1; monster strnpcinfo(2),[email protected][0],[email protected][1],"Guardian Master",1251,1; monster strnpcinfo(2),[email protected][0],[email protected][1],"Hatii",1252,1; monster strnpcinfo(2),[email protected][0],[email protected][1],"Guardian Knight",1219,1; monster strnpcinfo(2),[email protected][0],[email protected][1],"Raydric Archer",1276,5; } else if (compare(strnpcinfo(2),"gl_cas02")) { // Normal Spawns monster strnpcinfo(2),0,0,"Evil Druid",1117,10; monster strnpcinfo(2),0,0,"Wind Ghost",1263,11; monster strnpcinfo(2),0,0,"Bathory",1102,10; monster strnpcinfo(2),0,0,"Jakk",1130,10; monster strnpcinfo(2),0,0,"Marduk",1140,20; monster strnpcinfo(2),0,0,"Raydric",1163,9; monster strnpcinfo(2),0,0,"Alice",1275,1; monster strnpcinfo(2),0,0,"Abysmal Knight",1219,5; monster strnpcinfo(2),0,0,"Moonlight Flower",1150,3; monster strnpcinfo(2),0,0,"Phreeoni",1159,3; // Set Emperium room spawn coordinates and spawn monsters. else if (strnpcinfo(2) == "gl_cas02") { setarray [email protected][0],103,146; } monster strnpcinfo(2),[email protected][0],[email protected][1],"Mysteltainn",1203,5; monster strnpcinfo(2),[email protected][0],[email protected][1],"Orc Hero",1087,2; monster strnpcinfo(2),[email protected][0],[email protected][1],"High Orc",1213,10; monster strnpcinfo(2),[email protected][0],[email protected][1],"Orc Archer",1189,10; } // Add custom Guild Castles here. else { end; } donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; // Disable Kafra Staff... disablenpc "Kafra Staff#"+strnpcinfo(2); end; } else { // Otherwise place the guild emblem on flags. if (strnpcinfo(2) == "aldeg_cas01") { donpcevent "::OnRecvCastleA01"; } else if (strnpcinfo(2) == "aldeg_cas02") { donpcevent "::OnRecvCastleA02"; } else if (strnpcinfo(2) == "aldeg_cas03") { donpcevent "::OnRecvCastleA03"; } else if (strnpcinfo(2) == "aldeg_cas04") { donpcevent "::OnRecvCastleA04"; } else if (strnpcinfo(2) == "aldeg_cas05") { donpcevent "::OnRecvCastleA05"; } else if (strnpcinfo(2) == "gefg_cas01") { donpcevent "::OnRecvCastleG01"; } else if (strnpcinfo(2) == "gefg_cas02") { donpcevent "::OnRecvCastleG02"; } else if (strnpcinfo(2) == "gefg_cas03") { donpcevent "::OnRecvCastleG03"; } else if (strnpcinfo(2) == "gefg_cas04") { donpcevent "::OnRecvCastleG04"; } else if (strnpcinfo(2) == "gefg_cas05") { donpcevent "::OnRecvCastleG05"; } else if (strnpcinfo(2) == "payg_cas01") { donpcevent "::OnRecvCastlePy01"; } else if (strnpcinfo(2) == "payg_cas02") { donpcevent "::OnRecvCastlePy02"; } else if (strnpcinfo(2) == "payg_cas03") { donpcevent "::OnRecvCastlePy03"; } else if (strnpcinfo(2) == "payg_cas04") { donpcevent "::OnRecvCastlePy04"; } else if (strnpcinfo(2) == "payg_cas05") { donpcevent "::OnRecvCastlePy05"; } else if (strnpcinfo(2) == "prtg_cas01") { donpcevent "::OnRecvCastlePt01"; } else if (strnpcinfo(2) == "prtg_cas02") { donpcevent "::OnRecvCastlePt02"; } else if (strnpcinfo(2) == "prtg_cas03") { donpcevent "::OnRecvCastlePt03"; } else if (strnpcinfo(2) == "prtg_cas04") { donpcevent "::OnRecvCastlePt04"; } else if (strnpcinfo(2) == "prtg_cas05") { donpcevent "::OnRecvCastlePt05"; } else if (strnpcinfo(2) == "gl_cas02") { donpcevent "::OnRecvCastleGl05"; } // Add custom Guild Castles here. else { end; } // And load purchased Guardian in castles. donpcevent "Guardian#"+strnpcinfo(2)+"::OnSpawnGuardians"; // And display Kafra if purchased. if (GetCastleData(strnpcinfo(2),CD_ENABLED_KAFRA) < 1) disablenpc "Kafra Staff#"+strnpcinfo(2); } end; } // WoE : Guild Kafras //============================================================ - script Kafra Staff#woe::guildkafra -1,{ set [email protected],GetCastleData(strnpcinfo(2),CD_GUILD_ID); if (compare(strnpcinfo(2),"aldeg")) { setarray [email protected]$[0],"Al De Baran","aldebaran"; setarray [email protected][0],132,103; } else if (compare(strnpcinfo(2),"gefg")) { setarray [email protected]$[0],"Geffen","geffen"; setarray [email protected][0],120,39; } else if (compare(strnpcinfo(2),"payg")) { setarray [email protected]$[0],"Payon","payon"; setarray [email protected][0],70,100; } else if (compare(strnpcinfo(2),"prtg")) { setarray [email protected]$[0],"Prontera","prontera"; setarray [email protected][0],278,211; } else if (compare(strnpcinfo(2),"gl_cas02")) { setarray [email protected]$[0],"Glastheim Castle","glastheim"; setarray [email protected][0],99,181; } // Add custom Guild Castles here. else { end; } cutin "kafra_01",2; if (getcharid(2) == [email protected]) { mes "[Kafra Employee]"; mes "Welcome. ^ff0000" + GetGuildName([email protected]) + "^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(!callfunc("F_CanOpenStorage")){ 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([email protected]$+" -> 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 "[email protected]$+" is 200 zeny."; close2; cutin "",255; end; } set Zeny, Zeny - 200; set RESRVPTS,RESRVPTS+20; close2; warp [email protected]$[1],[email protected][0],[email protected][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; } set RESRVPTS,RESRVPTS+80; set Zeny, 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([email protected])+"^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 -1,{ set [email protected],GetCastleData(strnpcinfo(2),CD_GUILD_ID); // [email protected] = Defines the types of guardians per castle basis. // 1 - Soldier Guardian, 2 - Archer Guardian, 3 - Knight Guardian // [email protected] = Define the x spawn point for each uardian. // [0] = 1st guardian's x spawn point. // [email protected] = Define the y spawn point for each guardian. // [0] = 1st guardian's y spawn point. // [email protected] = Defines the coordinates of the Treasure Room. if (strnpcinfo(2) == "aldeg_cas01") { setarray [email protected][0],1,2,2,2,2,3,3,3; setarray [email protected][0],17,39,38,45,21,218,213,73; setarray [email protected][0],218,208,196,228,194,24,24,70; setarray [email protected][0],113,223; } else if (strnpcinfo(2) == "aldeg_cas02") { setarray [email protected][0],3,3,3,1,1,2,2,2; setarray [email protected][0],27,88,117,60,51,21,36,210; setarray [email protected][0],184,43,46,202,183,177,183,7; setarray [email protected][0],134,225; } else if (strnpcinfo(2) == "aldeg_cas03") { setarray [email protected][0],3,3,1,1,1,2,2,2; setarray [email protected][0],90,116,86,116,64,212,195,110; setarray [email protected][0],112,112,120,76,103,160,151,217; setarray [email protected][0],229,267; } else if (strnpcinfo(2) == "aldeg_cas04") { setarray [email protected][0],2,2,2,1,1,1,3,3; setarray [email protected][0],187,192,148,145,169,198,48,55; setarray [email protected][0],100,42,88,209,53,77,72,88; setarray [email protected][0],83,17; } else if (strnpcinfo(2) == "aldeg_cas05") { setarray [email protected][0],2,2,1,1,3,3,3,3; setarray [email protected][0],51,188,157,157,27,145,156,41; setarray [email protected][0],202,79,192,74,221,78,73,112; setarray [email protected][0],64,8; } // Geffen (Britoniah) Castles else if (strnpcinfo(2) == "gefg_cas01") { setarray [email protected][0],1,1,1,2,2,3,3,3; setarray [email protected][0],67,184,62,36,50,50,189,200; setarray [email protected][0],179,20,41,186,186,67,41,167; setarray [email protected][0],152,117; } else if (strnpcinfo(2) == "gefg_cas02") { setarray [email protected][0],1,1,1,2,2,3,3,3; setarray [email protected][0],64,56,166,35,20,19,166,159; setarray [email protected][0],168,41,25,148,150,41,42,188; setarray [email protected][0],145,115; } else if (strnpcinfo(2) == "gefg_cas03") { setarray [email protected][0],2,2,1,1,1,3,3,3; setarray [email protected][0],48,113,48,157,243,157,234,238; setarray [email protected][0],176,214,207,62,41,45,25,160; setarray [email protected][0],275,289; } else if (strnpcinfo(2) == "gefg_cas04") { setarray [email protected][0],2,2,1,1,1,3,3,3; setarray [email protected][0],53,31,49,29,147,57,160,148; setarray [email protected][0],191,178,220,46,65,46,50,189; setarray [email protected][0],116,123; } else if (strnpcinfo(2) == "gefg_cas05") { setarray [email protected][0],2,2,1,1,1,3,3,3; setarray [email protected][0],45,71,72,66,177,66,177,193; setarray [email protected][0],149,163,142,47,50,17,35,166; setarray [email protected][0],149,106; } // Payon (Baulder) Castles else if (strnpcinfo(2) == "payg_cas01") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],229,225,222,99,65,36,51,138; setarray [email protected][0],92,80,111,45,31,127,144,133; setarray [email protected][0],295,8; } else if (strnpcinfo(2) == "payg_cas02") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],237,228,210,57,42,287,264,27; setarray [email protected][0],54,72,41,241,241,257,272,20; setarray [email protected][0],141,149; } else if (strnpcinfo(2) == "payg_cas03") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],245,269,36,41,39,19,37,268; setarray [email protected][0],37,51,39,39,65,276,277,244; setarray [email protected][0],163,167; } else if (strnpcinfo(2) == "payg_cas04") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],251,232,231,32,32,35,36,270; setarray [email protected][0],212,212,175,287,232,45,17,41; setarray [email protected][0],151,47; } else if (strnpcinfo(2) == "payg_cas05") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],19,33,266,266,263,263,250,36; setarray [email protected][0],279,260,234,279,37,21,22,36; setarray [email protected][0],153,137; } // Prontera (Valkyrie Realms) Castles else if (strnpcinfo(2) == "prtg_cas01") { setarray [email protected][0],1,1,1,2,2,3,3,3; setarray [email protected][0],182,182,153,59,50,184,196,107; setarray [email protected][0],62,116,86,28,36,183,189,179; setarray [email protected][0],15,209; } else if (strnpcinfo(2) == "prtg_cas02") { setarray [email protected][0],3,3,3,1,1,2,2,2; setarray [email protected][0],161,153,178,71,49,64,7,75; setarray [email protected][0],161,161,44,75,28,186,196,175; setarray [email protected][0],207,229; } else if (strnpcinfo(2) == "prtg_cas03") { setarray [email protected][0],3,3,3,1,1,2,2,2; setarray [email protected][0],191,137,45,50,41,191,179,191; setarray [email protected][0],190,190,99,87,87,42,43,72; setarray [email protected][0],190,130; } else if (strnpcinfo(2) == "prtg_cas04") { setarray [email protected][0],3,3,3,1,1,1,2,2; setarray [email protected][0],276,274,246,38,29,33,78,36; setarray [email protected][0],14,35,246,240,240,258,48,61; setarray [email protected][0],275,160; } else if (strnpcinfo(2) == "prtg_cas05") { setarray [email protected][0],3,3,3,1,1,1,2,2; setarray [email protected][0],266,287,245,236,251,278,32,44; setarray [email protected][0],262,280,250,63,63,253,253,248; setarray [email protected][0],281,176; } else if (strnpcinfo(2) == "gl_cas02") { setarray [email protected][0],3,3,3,1,1,1,2,2; setarray [email protected][0],99,108,114,114,108,99,93,93; setarray [email protected][0],157,157,150,141,135,135,141,150; setarray [email protected][0],114,179; } // Add custom Guild Castles here. else { end; } if ([email protected] == 0) { mes "["+strnpcinfo(1)+"]"; mes "I have been waiting for a master to fulfill my destiny."; mes "Brave soul... fate will guide you towards your future..."; close; } if (is_guild_leader([email protected]) == false) { mes "["+strnpcinfo(1)+"]"; mes "No matter how much you pester me, I'll still follow my master ^ff0000"+GetGuildMaster([email protected])+"^000000. Where are the Guardians?! Send these ruffians away right now!"; close; } mes "["+strnpcinfo(1)+"]"; mes "Welcome. My honorable master, ^ff0000"+strcharinfo(0)+"^000000..."; mes "Your humble servent, "+strnpcinfo(1)+", 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(1)+"]"; mes "I will report the Castle briefing, Master."; mes " "; mes "^0000ffNow, the commercial growth level is "+GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY)+"."; if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY)) { mes " You invested "+GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY)+" times in past 1 day."; } mes " Now, the Castle Defense level is "+GetCastleData(strnpcinfo(2),CD_CURRENT_DEFENSE)+".^000000"; if (GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE)) { mes " ^0000ff- You invested "+GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE)+" times in past 1 day.^000000"; } mes " "; mes "That's all I have to report, Master."; close; case 2: set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY); if ([email protected] < 6) { set [email protected]_invest,5000; } else if (([email protected] >= 6) && ([email protected] <= 10)) { set [email protected]_invest,10000; } else if (([email protected] >= 11) && ([email protected] <= 15)) { set [email protected]_invest,20000; } else if (([email protected] >= 16) && ([email protected] <= 20)) { set [email protected]_invest,35000; } else if (([email protected] >= 21) && ([email protected] <= 25)) { set [email protected]_invest,55000; } else if (([email protected] >= 26) && ([email protected] <= 30)) { set [email protected]_invest,80000; } else if (([email protected] >= 31) && ([email protected] <= 35)) { set [email protected]_invest,110000; } else if (([email protected] >= 36) && ([email protected] <= 40)) { set [email protected]_invest,145000; } else if (([email protected] >= 41) && ([email protected] <= 45)) { set [email protected]_invest,185000; } else if (([email protected] >= 46) && ([email protected] <= 50)) { set [email protected]_invest,230000; } else if (([email protected] >= 51) && ([email protected] <= 55)) { set [email protected]_invest,280000; } else if (([email protected] >= 56) && ([email protected] <= 60)) { set [email protected]_invest,335000; } else if (([email protected] >= 61) && ([email protected] <= 65)) { set [email protected]_invest,395000; } else if (([email protected] >= 66) && ([email protected] <= 70)) { set [email protected]_invest,460000; } else if (([email protected] >= 71) && ([email protected] <= 75)) { set [email protected]_invest,530000; } else if (([email protected] >= 76) && ([email protected] <= 80)) { set [email protected]_invest,605000; } else if (([email protected] >= 81) && ([email protected] <= 85)) { set [email protected]_invest,685000; } else if (([email protected] >= 86) && ([email protected] <= 90)) { set [email protected]_invest,770000; } else if (([email protected] >= 91) && ([email protected] <= 95)) { set [email protected]_invest,860000; } else if (([email protected] >= 96) && ([email protected] <= 100)) { set [email protected]_invest,955000; } //Quadruple the cost of investing if you've already invested once. if (GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY)) { set [email protected]_invest*4,[email protected]_invest*4; } mes "["+strnpcinfo(1)+"]"; 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 ([email protected] >= 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(2),CD_INVESTED_ECONOMY) >= 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(2),CD_INVESTED_ECONOMY) == 0) { mes " "; mes "The current investment amount required is ^ff0000"[email protected]_invest+"^000000 zeny. Will you invest?"; } else { mes " "; mes "You've invested once today... if you wish to invest once more, ^ff0000"[email protected]_invest+"^000000 more zeny will be needed."; } next; switch (select("Invest in commercial growth:Cancel")) { case 1: if (Zeny < [email protected]_invest) { mes "["+strnpcinfo(1)+"]"; 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; } set Zeny, Zeny - [email protected]_invest; SetCastleData strnpcinfo(2),CD_INVESTED_ECONOMY,GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY)+1; mes "[ "+strnpcinfo(1)+"]"; mes "We finished the investment safely. I expect that our growth level will be increased by tomorrow."; close; case 2: mes "["+strnpcinfo(1)+"]"; mes "I'll do as you bid, my master... There is no hurry. We will do our best."; close; } case 3: set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_DEFENSE); if ([email protected] < 6) { set [email protected]_invest,10000; } else if (([email protected] >= 6) && ([email protected] <= 10)) { set [email protected]_invest,20000; } else if (([email protected] >= 11) && ([email protected] <= 15)) { set [email protected]_invest,40000; } else if (([email protected] >= 16) && ([email protected] <= 20)) { set [email protected]_invest,70000; } else if (([email protected] >= 21) && ([email protected] <= 25)) { set [email protected]_invest,110000; } else if (([email protected] >= 26) && ([email protected] <= 30)) { set [email protected]_invest,160000; } else if (([email protected] >= 31) && ([email protected] <= 35)) { set [email protected]_invest,220000; } else if (([email protected] >= 36) && ([email protected] <= 40)) { set [email protected]_invest,290000; } else if (([email protected] >= 41) && ([email protected] <= 45)) { set [email protected]_invest,370000; } else if (([email protected] >= 46) && ([email protected] <= 50)) { set [email protected]_invest,460000; } else if (([email protected] >= 51) && ([email protected] <= 55)) { set [email protected]_invest,560000; } else if (([email protected] >= 56) && ([email protected] <= 60)) { set [email protected]_invest,670000; } else if (([email protected] >= 61) && ([email protected] <= 65)) { set [email protected]_invest,790000; } else if (([email protected] >= 66) && ([email protected] <= 70)) { set [email protected]_invest,920000; } else if (([email protected] >= 71) && ([email protected] <= 75)) { set [email protected]_invest,1060000; } else if (([email protected] >= 76) && ([email protected] <= 80)) { set [email protected]_invest,1210000; } else if (([email protected] >= 81) && ([email protected] <= 85)) { set [email protected]_invest,1370000; } else if (([email protected] >= 86) && ([email protected] <= 90)) { set [email protected]_invest,1540000; } else if (([email protected] >= 91) && ([email protected] <= 95)) { set [email protected]_invest,1720000; } else if (([email protected] >= 96) && ([email protected] <= 100)) { set [email protected]_invest,1910000; } //Quadruple the cost of investing if you've already invested once. if (GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE)) { set [email protected]_invest*4,[email protected]_invest*4; } mes "["+strnpcinfo(1)+"]"; 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 ([email protected] >= 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(2),CD_INVESTED_DEFENSE) >= 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(2),CD_INVESTED_DEFENSE) == 0) { mes " "; mes "The current investment amount required is ^ff0000"[email protected]_invest+"^000000 zeny. Will you invest?"; } else { mes " "; mes "You've invested once today... if you wish to invest once more, ^ff0000"[email protected]_invest+"^000000 more zeny will be needed."; } next; switch (select("Invest in Castle Defenses.:Cancel")) { case 1: if (Zeny < [email protected]_invest) { mes "["+strnpcinfo(1)+"]"; 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; } set Zeny, Zeny - [email protected]_invest; SetCastleData strnpcinfo(2),CD_INVESTED_DEFENSE,GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE)+1; mes "[ "+strnpcinfo(1)+"]"; mes "We finished the investment safely. I expect that our Castle Defense level will be increased by tomorrow."; close; case 2: mes "["+strnpcinfo(1)+"]"; mes "I'll do as you bid, my master... There is no hurry. We will do our best."; close; } case 4: mes "["+strnpcinfo(1)+"]"; 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( set [email protected], 0; [email protected] <= 7 ; set [email protected], [email protected]+1 ) { if ([email protected][[email protected]] == 1) { set [email protected]$,"Guardian Soldier"; } else if ([email protected][[email protected]] == 2) { set [email protected]$,"Guardian Archer"; } else { set [email protected]$,"Guardian Knight"; } if (guardianinfo(strnpcinfo(2),[email protected],0)) { setarray [email protected]$[[email protected]], [email protected]$ + " - Implemented (" + guardianinfo(strnpcinfo(2),[email protected],2) + "/" + guardianinfo(strnpcinfo(2),[email protected],1) + ")"; } else { setarray [email protected]$[[email protected]], [email protected]$ + " - Not Implemented"; } } set [email protected]$,[email protected]$[0]+":"[email protected]$[1]+":"[email protected]$[2]+":"[email protected]$[3]+":"[email protected]$[4]+":"[email protected]$[5]+":"[email protected]$[6]+":"[email protected]$[7]; set [email protected],select([email protected]$)+9; mes "["+strnpcinfo(1)+"]"; 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([email protected],10002) == 0) { mes "["+strnpcinfo(1)+"]"; 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(2),[email protected]) == 1) { mes "["+strnpcinfo(1)+"]"; mes "Master, you already have summoned that Guardian. We cannot summon another."; close; } if (Zeny < 10000) { mes "["+strnpcinfo(1)+"]"; mes "Well... I'm sorry but we don't have funds to summon the Guardian. We failed to summon the Guardian."; close; } set Zeny, Zeny - 10000; SetCastleData strnpcinfo(2),[email protected],1; // mark as 'installed' set [email protected],[email protected] - 10; if ([email protected][[email protected]] == 1) { set [email protected],1287; } else if ([email protected][[email protected]] == 2) { set [email protected],1285; } else { set [email protected],1286; } guardian strnpcinfo(2),[email protected][[email protected]],[email protected][[email protected]],strmobinfo(2,[email protected]),[email protected],"Guardian#"+strnpcinfo(2)+"::OnGuardianDied",[email protected]; mes "["+strnpcinfo(1)+"]"; mes "We completed the summoning of the Guardian. Our defenses are now increased with it in place."; close; case 2: mes "["+strnpcinfo(1)+"]"; 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(2),CD_ENABLED_KAFRA) == 1) { mes "["+strnpcinfo(1)+"]"; 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(1)+"]"; mes "She worked hard in my opinion. It was a good decision to keep her."; close; } disablenpc "Kafra Staff#"+strnpcinfo(2); SetCastleData strnpcinfo(2),CD_ENABLED_KAFRA,0; mes "["+strnpcinfo(1)+"]"; mes "...."; mes "I have discharged the Kafra Employee... But... are you unsatisfied with something?"; close; } mes "["+strnpcinfo(1)+"]"; 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([email protected],10001) == 0) { mes "["+strnpcinfo(1)+"]"; 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(1)+"]"; mes "Well... I'm sorry but we don't have enough funds to hire a Kafra Employee."; close; } set Zeny, Zeny - 10000; enablenpc "Kafra Staff#"+strnpcinfo(2); SetCastleData strnpcinfo(2),CD_ENABLED_KAFRA,1; mes "["+strnpcinfo(1)+"]"; 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(1)+"]"; 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(1)+"]"; 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(1)+"]"; 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(1)+"]"; 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(2),[email protected][0],[email protected][1]; end; case 2: mes "["+strnpcinfo(1)+"]"; 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 -1,{ set [email protected],GetCastleData(strnpcinfo(2),CD_GUILD_ID); if ([email protected] == 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(2),"aldeg")) { set [email protected]$,"gld_dun02"; if (compare(strnpcinfo(2),"cas01")) setarray [email protected][0],32,122; else if (compare(strnpcinfo(2),"cas02")) setarray [email protected][0],79,30; else if (compare(strnpcinfo(2),"cas03")) setarray [email protected][0],165,38; else if (compare(strnpcinfo(2),"cas04")) setarray [email protected][0],160,148; else if (compare(strnpcinfo(2),"cas05")) setarray [email protected][0],103,169; } else if (compare(strnpcinfo(2),"gefg")) { set [email protected]$,"gld_dun04"; if (compare(strnpcinfo(2),"cas01")) setarray [email protected][0],39,258; else if (compare(strnpcinfo(2),"cas02")) setarray [email protected][0],125,270; else if (compare(strnpcinfo(2),"cas03")) setarray [email protected][0],268,251; else if (compare(strnpcinfo(2),"cas04")) setarray [email protected][0],268,108; else if (compare(strnpcinfo(2),"cas05")) setarray [email protected][0],230,35; } else if (compare(strnpcinfo(2),"payg")) { set [email protected]$,"gld_dun01"; if (compare(strnpcinfo(2),"cas01")) setarray [email protected][0],186,165; else if (compare(strnpcinfo(2),"cas02")) setarray [email protected][0],54,165; else if (compare(strnpcinfo(2),"cas03")) setarray [email protected][0],54,39; else if (compare(strnpcinfo(2),"cas04")) setarray [email protected][0],186,39; else if (compare(strnpcinfo(2),"cas05")) setarray [email protected][0],223,202; } else if (compare(strnpcinfo(2),"prtg")) { set [email protected]$,"gld_dun03"; if (compare(strnpcinfo(2),"cas01")) setarray [email protected][0],28,251; else if (compare(strnpcinfo(2),"cas02")) setarray [email protected][0],164,268; else if (compare(strnpcinfo(2),"cas03")) setarray [email protected][0],164,179; else if (compare(strnpcinfo(2),"cas04")) setarray [email protected][0],268,203; else if (compare(strnpcinfo(2),"cas05")) setarray [email protected][0],199,28; } else if (compare(strnpcinfo(2),"gl_cas02")) { set [email protected]$,"gld_dun03"; if (compare(strnpcinfo(2),"cas02")) setarray [email protected][0],114,178; } // 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(2) == [email protected]) { close2; warp [email protected]$,[email protected][0],[email protected][1]; end; } mes " "; mes "Nothing happened."; close; } close; } // Guardian Spawner Template //============================================================ - script Gld_Guard_Template::Gld_Guard_Template -1,{ // 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 Guardian. // [0] = 1st guardian's x spawn point. // Define the y spawn point for each Guardian. // [0] = 1st guardian's y spawn point. // Aldebaran (Luina) Castles if (strnpcinfo(2) == "aldeg_cas01") { setarray [email protected][0],1,2,2,2,2,3,3,3; setarray [email protected][0],17,39,38,45,21,218,213,73; setarray [email protected][0],218,208,196,228,194,24,24,70; } else if (strnpcinfo(2) == "aldeg_cas02") { setarray [email protected][0],3,3,3,1,1,2,2,2; setarray [email protected][0],27,88,117,60,51,21,36,210; setarray [email protected][0],184,43,46,202,183,177,183,7; } else if (strnpcinfo(2) == "aldeg_cas03") { setarray [email protected][0],3,3,1,1,1,2,2,2; setarray [email protected][0],90,116,86,116,64,212,195,110; setarray [email protected][0],112,112,120,76,103,160,151,217; } else if (strnpcinfo(2) == "aldeg_cas04") { setarray [email protected][0],2,2,2,1,1,1,3,3; setarray [email protected][0],187,192,148,145,169,198,48,55; setarray [email protected][0],100,42,88,209,53,77,72,88; } else if (strnpcinfo(2) == "aldeg_cas05") { setarray [email protected][0],2,2,1,1,3,3,3,3; setarray [email protected][0],51,188,157,157,27,145,156,41; setarray [email protected][0],202,79,192,74,221,78,73,112; } // Geffen (Britoniah) Castles else if (strnpcinfo(2) == "gefg_cas01") { setarray [email protected][0],1,1,1,2,2,3,3,3; setarray [email protected][0],67,184,62,36,50,50,189,200; setarray [email protected][0],179,20,41,186,186,67,41,167; } else if (strnpcinfo(2) == "gefg_cas02") { setarray [email protected][0],1,1,1,2,2,3,3,3; setarray [email protected][0],64,56,166,35,20,19,166,159; setarray [email protected][0],168,41,25,148,150,41,42,188; } else if (strnpcinfo(2) == "gefg_cas03") { setarray [email protected][0],2,2,1,1,1,3,3,3; setarray [email protected][0],48,113,48,157,243,157,234,238; setarray [email protected][0],176,214,207,62,41,45,25,160; } else if (strnpcinfo(2) == "gefg_cas04") { setarray [email protected][0],2,2,1,1,1,3,3,3; setarray [email protected][0],53,31,49,29,147,57,160,148; setarray [email protected][0],191,178,220,46,65,46,50,189; } else if (strnpcinfo(2) == "gefg_cas05") { setarray [email protected][0],2,2,1,1,1,3,3,3; setarray [email protected][0],45,71,72,66,177,66,177,193; setarray [email protected][0],149,163,142,47,50,17,35,166; } // Payon (Baulder) Castles else if (strnpcinfo(2) == "payg_cas01") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],229,225,222,99,65,36,51,138; setarray [email protected][0],92,80,111,45,31,127,144,133; } else if (strnpcinfo(2) == "payg_cas02") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected]posx[0],237,228,210,57,42,287,264,27; setarray [email protected][0],54,72,41,241,241,257,272,20; } else if (strnpcinfo(2) == "payg_cas03") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],245,269,36,41,39,19,37,268; setarray [email protected][0],37,51,39,39,65,276,277,244; } else if (strnpcinfo(2) == "payg_cas04") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],251,232,231,32,32,35,36,270; setarray [email protected][0],212,212,175,287,232,45,17,41; } else if (strnpcinfo(2) == "payg_cas05") { setarray [email protected][0],2,2,2,2,2,2,2,3; setarray [email protected][0],19,33,266,266,263,263,250,36; setarray [email protected][0],279,260,234,279,37,21,22,36; } // Prontera (Valkyrie Realms) Castles else if (strnpcinfo(2) == "prtg_cas01") { setarray [email protected][0],1,1,1,2,2,3,3,3; setarray [email protected][0],182,182,153,59,50,184,196,107; setarray [email protected][0],62,116,86,28,36,183,189,179; } else if (strnpcinfo(2) == "prtg_cas02") { setarray [email protected][0],3,3,3,1,1,2,2,2; setarray [email protected][0],161,153,178,71,49,64,7,75; setarray [email protected][0],161,161,44,75,28,186,196,175; } else if (strnpcinfo(2) == "prtg_cas03") { setarray [email protected][0],3,3,3,1,1,2,2,2; setarray [email protected][0],191,137,45,50,41,191,179,191; setarray [email protected][0],190,190,99,87,87,42,43,72; } else if (strnpcinfo(2) == "prtg_cas04") { setarray [email protected][0],3,3,3,1,1,1,2,2; setarray [email protected][0],276,274,246,38,29,33,78,36; setarray [email protected][0],14,35,246,240,240,258,48,61; } else if (strnpcinfo(2) == "prtg_cas05") { setarray [email protected][0],3,3,3,1,1,1,2,2; setarray [email protected][0],266,287,245,236,251,278,32,44; setarray [email protected][0],262,280,250,63,63,253,253,248; } else if (strnpcinfo(2) == "gl_cas02") { setarray [email protected][0],3,3,3,1,1,1,2,2; setarray [email protected][0],99,108,114,114,108,99,93,93; setarray [email protected][0],157,157,150,141,135,135,141,150; } // 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(2),strnpcinfo(0)+"::OnGuardianDied"; for( set [email protected], 0; [email protected] <= 7 ; set [email protected], [email protected]+1 ) { set [email protected],[email protected] + 10; if ([email protected][[email protected]] == 1) { set [email protected],1287; } else if ([email protected][[email protected]] == 2) { set [email protected],1285; } else { set [email protected],1286; } if (GetCastleData(strnpcinfo(2),[email protected])) { guardian strnpcinfo(2),[email protected][[email protected]],[email protected][[email protected]],strmobinfo(2,[email protected]),[email protected],"Guardian#"+strnpcinfo(2)+"::OnGuardianDied",[email protected]; } } end; OnGuardianDied: end; } // Treasure Room Spawn Template //============================================================ - script Gld_Trea_Spawn::Gld_Trea_Spawn -1,{ end; OnClock0001: // Do nothing if this script is the template. if (strnpcinfo(1) == "Gld_Trea_Spawn") end; set [email protected], GetCastleData(strnpcinfo(2),CD_GUILD_ID); // If there is no owner, do nothing. if ([email protected]) end; // Is there Economy in this castle? set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY)/5+4; // Set information if (strnpcinfo(2) == "aldeg_cas01") { set [email protected],1324; setarray [email protected][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 [email protected][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(2) == "aldeg_cas02") { set [email protected],1326; setarray [email protected][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 [email protected][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(2) == "aldeg_cas03") { set [email protected],1328; setarray [email protected][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 [email protected][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(2) == "aldeg_cas04") { set [email protected],1330; setarray [email protected][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 [email protected][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(2) == "aldeg_cas05") { set [email protected],1332; setarray [email protected][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 [email protected][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(2) == "gefg_cas01") { set [email protected],1334; setarray [email protected][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 [email protected][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(2) == "gefg_cas02") { set [email protected],1336; setarray [email protected][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 [email protected][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(2) == "gefg_cas03") { set [email protected],1338; setarray [email protected][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 [email protected][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(2) == "gefg_cas04") { set [email protected],1340; setarray [email protected][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 [email protected][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(2) == "gefg_cas05") { set [email protected],1342; setarray [email protected][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 [email protected][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(2) == "payg_cas01") { set [email protected],1344; setarray [email protected][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 [email protected][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(2) == "payg_cas02") { set [email protected],1346; setarray [email protected][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 [email protected][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(2) == "payg_cas03") { set [email protected],1348; setarray [email protected][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 [email protected][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(2) == "payg_cas04") { set [email protected],1350; setarray [email protected][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 [email protected][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(2) == "payg_cas05") { set [email protected],1352; setarray [email protected][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 [email protected][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(2) == "prtg_cas01") { set [email protected],1354; setarray [email protected][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 [email protected][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(2) == "prtg_cas02") { set [email protected],1356; setarray [email protected][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 [email protected][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(2) == "prtg_cas03") { set [email protected],1358; setarray [email protected][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 [email protected][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(2) == "prtg_cas04") { set [email protected],1360; setarray [email protected][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 [email protected][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(2) == "prtg_cas05") { set [email protected],1362; setarray [email protected][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 [email protected][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; } else if (strnpcinfo(2) == "gl_cas02") { set [email protected],1362; setarray [email protected][0],105,102; setarray [email protected][0],180,180; } // 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(2),CD_INVESTED_ECONOMY)) { set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY); SetCastleData strnpcinfo(2),CD_CURRENT_ECONOMY,[email protected] + GetCastleData(strnpcinfo(2),CD_INVESTED_ECONOMY) + (rand(2) && getgdskilllv([email protected],10014)); if (GetCastleData(strnpcinfo(2),CD_CURRENT_ECONOMY) > 100) SetCastleData strnpcinfo(2),CD_CURRENT_ECONOMY,100; } if (GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE)) { set [email protected],GetCastleData(strnpcinfo(2),CD_CURRENT_DEFENSE); SetCastleData strnpcinfo(2),CD_CURRENT_DEFENSE,[email protected] + GetCastleData(strnpcinfo(2),CD_INVESTED_DEFENSE); if (GetCastleData(strnpcinfo(2),CD_CURRENT_DEFENSE) > 100) SetCastleData strnpcinfo(2),CD_CURRENT_DEFENSE,100; } // Reset daily investment limits. setcastledata strnpcinfo(2),CD_INVESTED_ECONOMY,0; setcastledata strnpcinfo(2),CD_INVESTED_DEFENSE,0; // Spawn boxes in proper order. for (set [email protected],0; [email protected] < [email protected] ; set [email protected],[email protected]+1) { // set treasure box ID set [email protected], [email protected] + ([email protected]+2) % 2; set [email protected],1 << [email protected]; // Spawn or do not spawn chests if one already exists. if ((getd("[email protected]"+strnpcinfo(2)+"_treasure") & [email protected]) == 0) { monster strnpcinfo(2),[email protected][[email protected]],[email protected][[email protected]],"Treasure Chest",[email protected],1,"Treasure#"+strnpcinfo(2)+"::OnTreasureDied"[email protected]; setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") | [email protected]; } } end; // Individual "You killed a chest" events to ensure proper spawning at the change of day. OnTreasureDied0: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~1; end; OnTreasureDied1: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~2; end; OnTreasureDied2: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~4; end; OnTreasureDied3: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~8; end; OnTreasureDied4: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~16; end; OnTreasureDied5: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~32; end; OnTreasureDied6: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~64; end; OnTreasureDied7: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~128; end; OnTreasureDied8: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~256; end; OnTreasureDied9: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~512; end; OnTreasureDied10: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~1024; end; OnTreasureDied11: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~2048; end; OnTreasureDied12: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~4096; end; OnTreasureDied13: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~8192; end; OnTreasureDied14: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~16384; end; OnTreasureDied15: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~32768; end; OnTreasureDied16: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~65536; end; OnTreasureDied17: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~131072; end; OnTreasureDied18: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~262144; end; OnTreasureDied19: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~524288; end; OnTreasureDied20: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~1048576; end; OnTreasureDied21: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~2097152; end; OnTreasureDied22: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~4194304; end; OnTreasureDied23: setd "[email protected]"+strnpcinfo(2)+"_treasure",getd("[email protected]"+strnpcinfo(2)+"_treasure") & ~8388608; end; }
  12. Thanks, that worked perfectly. Did everything I needed it too.
  13. I just checked, but it wasn't under Lv 0. So what I did was add any_warp: false and it also did not resolved my problem.
  14. heroton mapflag nowarp hallow01 mapflag nowarp halloween mapflag nowarp pa2_in02 mapflag nowarp heroton mapflag nowarpto hallow01 mapflag nowarpto halloween mapflag nowarpto pa2_in02 mapflag nowarpto
  15. Couldn't find what the issue in the above script was, so I replaced it with this one and it worked to the refine rate specified in the script. veil,111,199,0 script Vestri#cash 87,{ disable_items; mes "[Vestri]"; mes "I am the Armsmith"; mes "I can refine all kinds of weapons,"; mes "armor and equipment, so let me"; mes "know what you want to refine."; next; setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for(set [email protected],1; [email protected]<=10; set [email protected],[email protected]+1) { if (getequipisequiped([email protected][[email protected]])) { set [email protected]$, [email protected]$ + F_getpositionname([email protected][[email protected]]) + "-[" + getequipname([email protected][[email protected]]) + "]"; set [email protected],1; } set [email protected]$, [email protected]$ + ":"; } if ([email protected] == 0) { mes "[Vestri]"; mes "I don't think I can refine any items you have..."; close; } set [email protected], [email protected][ select([email protected]$) ]; if (!getequipisequiped([email protected])) //custom check close; if (!getequipisenableref([email protected])) { mes "[Vestri]"; mes "Go find another Blacksmith. You can't refine this thing."; close; } if (getequiprefinerycnt([email protected]) >= 13) { mes "[Vestri]"; mes "Hmm... someone perfected this already. I don't think I can work on it further."; close; } [email protected] = getequipid([email protected]); // save id of the item [email protected] = getequiprefinerycnt([email protected]); //save refinery count [email protected] = getequiprefinecost([email protected], REFINE_COST_ENRICHED, REFINE_ZENY_COST); [email protected] = getequiprefinecost([email protected], REFINE_COST_ENRICHED, REFINE_MATERIAL_ID); // Make sure you have the necessary items and Zeny to refine your items // Determines chance of failure and verifies that you want to continue. callsub S_RefineValidate,getequipweaponlv([email protected]),[email protected],[email protected],[email protected],[email protected],[email protected]; mes "[Vestri]"; mes "Clang! Clang! Clang!"; if (getequippercentrefinery([email protected], true) > rand(100)) { successrefitem [email protected]; next; emotion ET_BEST; mes "[Vestri]"; mes "There you go! It's done."; mes "It's been a while since I've made such a fine "+((getequipweaponlv([email protected]))?"weapon":"armor")+". You must be happy because it has become stronger!"; close; } failedrefitem [email protected]; next; emotion (!rand(5))?ET_MONEY:ET_HUK; mes "[Vestri]"; mes "Uuuuuuuuuummmmmph!!!"; next; mes "[Vestri]"; mes "..."; mes "....."; mes ".......Huhuhuhuhu~"; mes "........It was your choice and my ability, no regret."; close; S_RefineValidate: [email protected]_lvl = getarg(0); [email protected]_req = getarg(1); [email protected] = getarg(2); [email protected] = getarg(3); setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3); // If the VIP system is enabled, the prices for non-VIP players are considerably higher. if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) { switch([email protected]_lvl){ case 0: set [email protected], [email protected] * 10; break; case 1: set [email protected], [email protected] * 40; break; case 2: set [email protected], [email protected] * 50; break; case 3: set [email protected], [email protected] * 2; break; case 4: set [email protected], [email protected] * 2; break; } } mes "[Vestri]"; if ([email protected]_lvl) mes "You want to refine a level "+ [email protected]_lvl +" weapon?"; mes "To refine that, you'll need to have one ^ff9999"+ getitemname([email protected]_req) +"^000000 and "+ [email protected] +" zeny."; mes "Would you like to continue?"; next; if(select("Yes:No") == 1) { if (getequippercentrefinery([email protected]) < 100) { if ([email protected]_lvl) { mes "[Vestri]"; mes "Wow!!"; mes "This weapon probably"; mes "looks like it's been refined..."; mes "many times..."; mes "It may break if"; mes "you refine it again."; next; mes "And if it breaks,"; mes "you can't use it anymore!"; mes "All the cards in it and the properties ^ff0000will be lost^000000!"; mes "^ff0000Besides, the equipment will break!^000000"; mes "Are you sure you still want to continue?"; next; if(select("Yes:No") == 2) { mes "[Vestri]"; mes "Good."; mes "Because if the weapon breaks from unreasonable refining, then I get a bad mood, too."; close; } } else { mes "[Vestri]"; mes "Giggle. Giggle. Oh, you have guts, daring to refine this."; mes "You know it's pretty risky, don't you?"; next; mes "If your defensive equipment is broken, you'll never be able to use it again."; mes "Even your cards and your modifications will ^ff0000completely disappear^000000."; //mes "Everything will disappear. As in... GONE!"; mes "Do you really wish to continue?"; next; if(select("Yes:No") == 2) { mes "[Vestri]"; mes "What nonsense. You waste my precious time."; mes "Get lost, punk."; close; } } } if (countitem([email protected]_req) > 0 && Zeny > [email protected]) { delitem [email protected]_req,1; set Zeny, Zeny - [email protected]; // anti-hack if (callfunc("F_IsEquipIDHack", [email protected], getarg(4)) || callfunc("F_IsEquipRefineHack", [email protected], getarg(5)) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3])) { mes "[Holink]"; emotion ET_FRET; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } return; } mes "[Vestri]"; mes "Are these all you have?"; mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?"; close; } mes "[Vestri]"; mes "I can't help it even if you're not happy about it..."; close; }
  16. Couldn't find a simple resolution, so I took the long way. 35251,2nd_Class_Costume,2nd Class Costume,4,20,,0,,0,,0,0xFFFFFFFF,63,2,8192,,0,0,,{ bonus bAllStats,1; },{ if(BaseJob==Job_Knight) { changebase 7; } if(BaseJob==Job_Wizard) { changebase 9; } if(BaseJob==Job_Hunter) { changebase 11; } if(BaseJob==Job_Priest) { changebase 8; } if(BaseJob==Job_Blacksmith) { changebase 10; } if(BaseJob==Job_Assassin) { changebase 12; } if(BaseJob==Job_Crusader) { changebase 14; } if(BaseJob==Job_Sage) { changebase 16; } if(BaseJob==Job_Bard) { changebase 19; } if(BaseJob==Job_Dancer) { changebase 20; } if(BaseJob==Job_Monk) { changebase 15; } if(BaseJob==Job_Alchemist) { changebase 18; } if(BaseJob==Job_Rogue) { changebase 17; } },{ changebase Class; }
  17. Good day, I'm having some troubles finding a resource here for sending a player back to @go 0 (or their saved locaed) when entering a map. I tried using the Mapflags built into the game, but players can still @warp to my GM maps even with nowarp/nowarpto enabled. Anyone have a simple script to remove players from a specified map? I'd appreciate it greatly.
  18. Try running a different client version. If you're too old it may not work.
  19. Good day, I'm trying to make a Trans-Class costume with the itemDB, much like the third class costumes work. Does anyone know the right text for trans classes? 35250,3rd_Class_Costume,3rd Class Costume,4,20,,0,,0,,0,0xFFFFFFFF,7,2,8192,,0,0,,{ bonus bAllStats,1; },{ changebase roclass(eaclass()|EAJL_THIRD); },{ changebase Class; }
  20. Good day, The refiner NPC I added won't read my items, I've tried everything I can think of to fix it but nothing works. Any thoughts? //===== rAthena Script ======================================= //============================================================ //============================================================ // +11 and above Refiners //============================================================ veil,111,199,5 script Vestri#prt 826,{ callfunc "refinenew","Vestri",0; end; } morocc_in,64,41,5 script Vestri#moc 826,{ callfunc "refinenew","Vestri",0; end; } payon_in01,18,132,3 script Vestri#pay 826,{ callfunc "refinenew","Vestri",0; end; } //============================================================ // +11 and above Refiner Function //============================================================ //= To allow auto safe refining/multiple refining set the //= second argument to '1' in the function call. //= If you enable this function, be sure to edit the value of //= [email protected] to the max safe refine in refine_db.txt as well. //= //= On official servers, if an item is unsuccessfully refined //= it will break at a 20% rate and downgrade at an 80% rate. //============================================================ function script refinenew { [email protected]_name$ = getarg(0); disable_items; mes "["+ [email protected]_name$ +"]"; mes "I am the best Armsmith ever!"; mes "I don't refine normal, boring items."; mes "I only refine items that are Level 10 or higher."; next; mes "["+ [email protected]_name$ +"]"; mes "Anyway, you may use my services if your item is Level 10 or higher."; mes "What do you want me to refine?"; next; setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for([email protected] = 1; [email protected]<=10; [email protected]) { if (getequipisequiped([email protected][[email protected]])) { [email protected]$ = [email protected]$ + F_getpositionname([email protected][[email protected]]) + "-[" + getequipname([email protected][[email protected]]) + "]"; [email protected] = 1; } [email protected]$ = [email protected]$ + ":"; } if ([email protected] == 0) { mes "["+ [email protected]_name$ +"]"; mes "I don't think I can refine any items you have..."; close; } [email protected] = [email protected][ select([email protected]$) ]; if (!getequipisequiped([email protected])) { //custom check mes "["+ [email protected]_name$ +"]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion ET_FRET; close; } if (!getequipisenableref([email protected])) { mes "["+ [email protected]_name$ +"]"; mes "I don't think I can"; mes "refine this item at all..."; close; } [email protected] = getequiprefinerycnt([email protected]); //save refinery count if ([email protected] < 10) { mes "["+ [email protected]_name$ +"]"; mes "I said I don't work with items that are lower than Level 10."; close; } if ([email protected] >= 20) { //custom check mes "["+ [email protected]_name$ +"]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } [email protected] = getequipid([email protected]); // save id of the item setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3); [email protected] = getequiprefinecost([email protected], REFINE_COST_OVER10, REFINE_ZENY_COST); [email protected] = getequiprefinecost([email protected], REFINE_COST_OVER10, REFINE_MATERIAL_ID); [email protected] = 10; if (getequipweaponlv([email protected]) >= 1 && getequipweaponlv([email protected]) <= 4) { [email protected]$ = "a"; [email protected]$ = "weapon"; } else { [email protected]$ = "an"; [email protected]$ = "armor"; } mes "["+ [email protected]_name$ +"]"; mes "Hmm " + [email protected]$ + " " + [email protected]$ + ", is that ok?"; mes "If you want to refine this armor,"; mes "I will need 1 ^003366" + getitemname([email protected]) + "^000000 and " + callfunc("F_InsertComma",[email protected]) + " zeny."; mes "Are you sure you want to continue?"; next; if (select("Yes:No") == 2) { mes "["+ [email protected]_name$ +"]"; mes "Hm... if you mind... never mind..."; close; } if (getarg(1) != 1) { if (getequippercentrefinery([email protected]) < 100) { mes "["+ [email protected]_name$ +"]"; mes "This "[email protected]$+" already has been refined serveral times."; mes "It could be destroyed if I try again."; mes "It won't break for sure, but there is has a small chance."; next; mes "["+ [email protected]_name$ +"]"; mes "You could be ^FF0000lowering the upgrade level^000000 of the "[email protected]$+","; mes "or if it breaks, you will lose ^FF0000any cards^000000 or special properties added to it."; next; mes "["+ [email protected]_name$ +"]"; mes "Do you still want me to refine it?"; mes "I think I have given you enough warning."; next; if(select("Yes.:No.") == 2) { mes "["+ [email protected]_name$ +"]"; mes "Well, no challenge is one way to go..."; mes "No risk... that could be wise."; close; } } if (countitem([email protected]) < 1 || Zeny < [email protected]) { mes "["+ [email protected]_name$ +"]"; mes "Hm. You don't seem to have enough money or "+getitemname([email protected])+"."; mes "Please come back when you have them."; close; } Zeny = Zeny - [email protected]; delitem [email protected],1; // anti-hack if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) || callfunc("F_IsEquipRefineHack", [email protected], [email protected])) { mes "["+ [email protected]_name$ +"]"; emotion ET_FRET; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if (getequippercentrefinery([email protected]) > rand(100)) { mes "Clang! Clang! Clang! Clang!"; successrefitem [email protected]; next; emotion ET_BEST; mes "["+ [email protected]_name$ +"]"; mes "Good! Succes!!!"; mes "I am the best Armsmith."; close; } else { if (rand(100) < 80) { mes "["+ [email protected]_name$ +"]"; mes "Clang! Clang! Clang! Clang!"; downrefitem [email protected],3; // Failed refine attempts decrease the item's refine level by 3 next; emotion (!rand(5))?ET_MONEY:ET_HUK; mes "["+ [email protected]_name$ +"]"; mes "Ahhh!!!"; next; mes "["+ [email protected]_name$ +"]"; mes "Oh my god!"; mes "The upgrade level has dropped..."; } else { mes "["+ [email protected]_name$ +"]"; mes "Clang! Clang! Clang!"; failedrefitem [email protected]; next; emotion (!rand(5))?ET_MONEY:ET_HUK; mes "["+ [email protected]_name$ +"]"; mes "Hmmm!"; next; mes "["+ [email protected]_name$ +"]"; mes "Oh my! I've failed to refine stuff..."; mes "I didn't mean it!"; } mes "I could have made a mistake even though I am the best Armsmith ever."; mes "It just wasn't meant to be."; next; mes "["+ [email protected]_name$ +"]"; mes "I will do a better job next time! Don't worry!"; close; } } // New +11 and above Refining Functions ======================== if ([email protected] < [email protected]) { mes "["+ [email protected]_name$ +"]"; mes "I can refine this to the safe limit or a desired number of times. It's your choice."; next; [email protected] = select("To the safe limit, please.","I'll decide how many times.","I've changed my mind..."); } else [email protected] = 2; switch([email protected]){ case 1: [email protected] = [email protected] - [email protected]; break; case 2: mes "["+ [email protected]_name$ +"]"; mes "How many times would you like me to refine your item?"; next; input [email protected]; [email protected] = [email protected] + [email protected]; if ([email protected] < 1 || [email protected] > 20) { mes "["+ [email protected]_name$ +"]"; mes "I can't refine this item that many times."; close; } if ([email protected] > [email protected]) { [email protected] = [email protected] - [email protected]; mes "["+ [email protected]_name$ +"]"; mes "This will try to refine the equipment " + [email protected] + " times past the safe limit. Your equipment may be destroyed... is that ok?"; next; if(select("Yes...","No...") == 2){ mes "["+ [email protected]_name$ +"]"; mes "You said so... So be it."; close; } } break; case 3: mes "["+ [email protected]_name$ +"]"; mes "You said so... So be it."; close; } [email protected] = [email protected] * [email protected]; mes "["+ [email protected]_name$ +"]"; mes "That will cost you " + [email protected] + " " + getitemname([email protected]) + " and " + [email protected] + " Zeny. Is that ok?"; next; if(select("Yes:No...") == 2){ mes "["+ [email protected]_name$ +"]"; mes "You said so... So be it."; close; } if (countitem([email protected]) < [email protected] || Zeny < [email protected]) { mes "["+ [email protected]_name$ +"]"; mes "Hm. You don't seem to have enough money or "+getitemname([email protected])+"."; mes "Please come back when you have them."; close; } Zeny = Zeny - [email protected]; delitem [email protected],[email protected]; while([email protected]){ if (getequipisequiped([email protected]) == 0) { mes "["+ [email protected]_name$ +"]"; mes "Look here... you don't have any items on..."; close; } // anti-hack if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) || callfunc("F_IsEquipRefineHack", [email protected], [email protected])) close; if (getequipid([email protected]) != [email protected] || ([email protected] == 1 && getequippercentrefinery([email protected]) < 100)) { mes "["+ [email protected]_name$ +"]"; mes "Clang... No, but did you imagine I could be so stupid?!"; mes "You changed it..."; mes "Get out before I stun you with my Hammer!!"; close; } if (getequippercentrefinery([email protected]) > rand(100)) { mes "Clang! Clang! Clang! Clang!"; successrefitem [email protected]; [email protected] = [email protected] - 1; next; } else { if (rand(100) < 80) { mes "["+ [email protected]_name$ +"]"; mes "Clang! Clang! Clang! Clang!"; downrefitem [email protected],3; // Failed refine attempts decrease the item's refine level by 3 next; emotion (!rand(5))?ET_MONEY:ET_HUK; mes "["+ [email protected]_name$ +"]"; mes "Ahhh!!!"; next; mes "["+ [email protected]_name$ +"]"; mes "Oh my god!"; mes "The upgrade level has dropped..."; } else { mes "["+ [email protected]_name$ +"]"; mes "Clang! Clang! Clang!"; failedrefitem [email protected]; next; emotion (!rand(5))?ET_MONEY:ET_HUK; mes "["+ [email protected]_name$ +"]"; mes "Hmmm!"; next; mes "["+ [email protected]_name$ +"]"; mes "Oh my! I've failed to refine stuff..."; mes "I didn't mean it!"; } mes "I could have made a mistake even though I am the best Armsmith ever."; mes "It just wasn't meant to be."; next; mes "["+ [email protected]_name$ +"]"; mes "I will do a better job next time! Don't worry!"; close; } [email protected] = getequiprefinerycnt([email protected]); } emotion ET_BEST; mes "["+ [email protected]_name$ +"]"; mes "Good! Succes!!!"; mes "I am the best Blacksmith."; close; } // Ori/Elu to Carnium/Bradium Refiners //============================================================ - script Austri#ref -1,{ if (checkweight(1201,1) == 0) { mes "- Wait a minute !! -"; mes "- Currently you're carrying -"; mes "- too many items with you. -"; mes "- Please try again -"; mes "- after you lose some weight. -"; close; } mes "[Austri]"; mes "If you bring me 3"; mes "Oridecon or Elunium"; mes "I can exchange them for"; mes "Bradium or Carnium."; mes "Just give me 50,000z."; next; switch(select("Oridecon to Bradium.:Elunium to Carnium.:Purified Bradium to Carnium.:No thanks.")) { case 1: setarray [email protected][0],984,3,6224; //Oridecon -> Bradium break; case 2: setarray [email protected][0],985,3,6223; //Elunium -> Carnium break; case 3: setarray [email protected][0],6090,1,6223; //Purified_Bradium -> Carnium break; case 4: mes "[Austri]"; mes "Hmm..."; close; } if (countitem([email protected][0]) >= [email protected][1] && Zeny >= 50000) { delitem [email protected][0],[email protected][1]; Zeny = Zeny - 50000; getitem [email protected][2],1; mes "[Austri]"; if ([email protected][0] == 6090) { mes "Refining with Refined Bradium"; mes "can be a little expensive."; mes "I can exchange it for some Carnium."; } else mes "Ok! Here's your "+getitemname([email protected][2])+"."; mes "Take it and use it well."; close; } mes "[Austri]"; mes "You better not be trying"; mes "to cheat me because you"; mes "don't have enough money"; mes "or "+getitemname([email protected][0])+"."; close; } prt_in,85,71,5 duplicate(Austri#ref) Austri#prt 826 payon_in01,14,125,5 duplicate(Austri#ref) Austri#pay 826 morocc_in,60,38,5 duplicate(Austri#ref) Austri#moc 826 // Malangdo Refiner //============================================================ malangdo,224,172,6 script Clink#mal_normal 544,{ disable_items; mes "[Clink]"; mes "My cool dad Holink said I have the world's greatest refine hammer!!"; mes "Meow Meow~"; mes "Who do you think I am?"; mes "Yes!!! You!! You want to refine?"; next; setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for([email protected] = 1; [email protected]<=10; set [email protected],[email protected]+1) [email protected]$ = [email protected]$ + ( getequipisequiped([email protected][[email protected]]) ? getequipname([email protected][[email protected]]) : F_getpositionname([email protected][[email protected]]) +"-[Empty]" ) +":"; [email protected] = [email protected][ select([email protected]$) ]; if (!getequipisequiped([email protected])) { mes "[Clink]"; switch([email protected]) { case 1: mes "Dad said. There's no cure for stupidity..."; break; case 2: mes "There's nothing to see here!!"; break; case 3: mes "What an arrogant left hand this is!"; break; case 4: mes "What an arrogant right hand this is!"; break; case 5: mes "Get that dirty thing off my face!!"; break; case 6: mes "Kyaong~! Do not provoke me."; break; case 7: case 8: mes "Where is the accessory?"; break; case 9: case 10: mes "Are you talking about the other head part?"; break; } close; } if (!getequipisenableref([email protected])) { mes "[Clink]"; mes "This can't be refined!!"; close; } [email protected] = getequiprefinerycnt([email protected]); //save refinery count if ([email protected] >= 10) { mes "[Clink]"; mes "Perfect refining. Did I do this for you?"; close; } [email protected] = getequipid([email protected]); // save id of the item setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected]art,2), getequipcardid([email protected],3); [email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_ZENY_COST); [email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_MATERIAL_ID); mes "[Clink]"; switch(getequipweaponlv([email protected])) { default: case 0: // Armor [email protected]$ = "armor"; mes "Hmm, an armor refine? Someone like you?"; break; case 1: // Level 1 Weapon [email protected]$ = "weapon"; mes "A level 1 weapon?"; mes "Urr... Annoying... Okay, let's try..."; break; case 2: // Level 2 Weapon [email protected]$ = "weapon"; mes "A level 2 weapon?"; break; case 3: // Level 3 Weapon [email protected]$ = "weapon"; mes "Woot!! A level 3 weapon? Impressive~"; break; case 4: // Level 4 Weapon [email protected]$ = "weapon"; mes "Wow!... A level 4 weapon~!!"; break; } mes "You need ^ff9999"+getitemname([email protected])+"^000000 and ^ff9999"[email protected]+"^000000 Zeny. Do you have them?"; next; if(select("Yes, I do!!:Forget about it!!") == 2) { mes "[Clink]"; mes "I knew it!!"; mes "I knew you were not worth trying my magical refining hammer for."; close; } if (getequippercentrefinery([email protected]) < 100) { mes "[Clink]"; mes "Wow!!"; mes "This "[email protected]$+" has been refined quite a bit, huh?"; mes "You do know that this might break, right?"; next; mes "[Clink]"; mes "If you break the "[email protected]$+", you can never use it again."; mes "Cards and enchant effects..."; mes "the ^ff0000whole thing will disappear^000000."; mes "You still up for this~?"; next; if(select("Yes, I am!!:Forget about it!!") == 2) { mes "[Clink]"; mes "I knew it!!"; mes "You can't even take this big step. Don't think about refining..."; close; } } if (countitem([email protected]) == 0 || Zeny < [email protected]) { mes "[Clink]"; mes "Hey you!! Didn't I tell you"; mes "that you need ^ff9999"+getitemname([email protected])+"^000000 and ^ff9999"[email protected]+"^000000 Zeny??!!"; close; } delitem [email protected],1; Zeny = [email protected]; // anti-hack if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) || callfunc("F_IsEquipRefineHack", [email protected], [email protected])) { mes "[Clink]"; emotion ET_FRET; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if (getequippercentrefinery([email protected]) <= rand(100)) { failedrefitem [email protected]; mes "[Clink]"; mes "Cry Hammer!! Cry!!!"; next; switch(rand(1,5)) { case 1: emotion ET_CRY; break; case 2: emotion ET_PROFUSELY_SWEAT; break; case 3: emotion ET_KEK; break; case 4: emotion ET_SCRATCH; break; case 5: emotion ET_BIGTHROB; break; } mes "[Clink]"; mes "Huh?! I failed?!"; next; mes "[Clink]"; mes "Arrgg~ It's all~ Broken...? What a pity~"; next; mes "[Clink]"; mes "Hey...!! Get me another one."; mes "This is not possible."; mes "How can my hammer fail from refining?"; close; } successrefitem [email protected]; mes "[Clink]"; mes "Cry Hammer!! Cry!!!"; next; emotion ET_CHUP; mes "[Clink]"; mes "Ok!! Perfect!!"; mes "There's nothing I can't refine"; mes "with this special hammer."; mes "You can praise me!!"; mes "What a day!!"; close; }
  21. You resolved my problem, many many thanks!
×
×
  • Create New...

Important Information

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