Jump to content

Quesooo

Members
  • Posts

    883
  • Joined

  • Last visited

Everything posted by Quesooo

  1. oh i already disable that but it seems still affecting the server rates @Sehrentos boss ping me when it done thank you for your fast response
  2. @Musika6988 @Sehrentoshi there thank you for your script - after killing the world boss my server rates go down 1/2 for example my server rate is x50 after killing the world boss or reloading the npc the rates goes to x25 where do i change it so that wont affect my original server rates thank you
  3. Anyone can help me about using @storeall command i know that rathena already have storeall command but my request is different on rathena default @storeall command its store all item inside inventory and equipment of the character when player use @storeall the item inside the inventories can be stored (ETC items only) not included the equipment of the character it self thank you so much
  4. @MathReaper boss if you dont mind please upload a working full client thank you ^_^ english version
  5. @Alayne Please release ogh hard mode using latest rathena emulator ^_^ where are you my friend
  6. @Hurtsky thank you for this amazing theme if you dont mind can i ask different questions where can i edit download links, donation links when i got to login page i cant see a login bar where do i insert my username and password thank you so much so far the theme is working When i click login L when i click register No informations when i click all of this
  7. As the tittle said can i request a savealoot and loadaloot command thank you masters
  8. yeah i think hope someone can help with this one
  9. hi there anyone can help me to make a npc that trigger like and share on facebook thank you the npc gives bubble gums and manuals
  10. Hi there master's i would like to request for charlestone chrisis that can enchant armor garment, shoes and accessory here's some inforamtion should happen https://irowiki.org/wiki/Verus_Enchants thank you so much
  11. how to change exp rate here for base lvl as i test the script its working perfectly but when i finish the quest from joblvl 21 goes to 54 but my base level didnt move to much help thank you
  12. hi everyone, anyone can help me why i cant add skills like this im using 2017-06-14b client thank you
  13. thank you i will try this later
  14. Hi good day i would like to request a mvp custom drop item script example if you kill amon.ra or any mvp monster with a chance of 0.02% the monster will drop a random ( 1 item only ) on this list a random enchanted armor or enchanted weapon +10 just 1 item in random drop with announcement thank you
  15. thank you for the help @Wickedknight2 i want is like this there will be a pub or a waiting room at the top of that npc showing that the world boss will start after 00:00 example the event will start at 6:00 Server time then the count down should be like this 5:59, 5:58, 5:57 etc.etc
  16. error on console po paki paste para mkatulong kung walang error my ndi ka lang po na configure
  17. hi good day how to add countdown timer at the top of this npc script - script WorldBoss -1,{ end; OnInit: // NPC variables .npc_name$ = strnpcinfo(0); // Name of this NPC .event_sleep = 60000; // Event sleep time in milliseconds(60000 = 1 minute) .event_timeout = 7200000; // Event timeout time in milliseconds before Boss is disabled(60000 = 1 minute) .event_access_expire = 900000; // Event access expire time in milliseconds(60000 = 1 minute) // Reward distribution .loot_mode = 4; // Event loot distribution mode. Look npc_loot_mode_desc for descriptions .loop_max = 100; // Maximum number of loops (When selecting a random party member) .treasure_chests = 10; // Number of duplicate Treasure Chest NPC's (Important!) // Experience increases during event .base_exp_multiplier = 3; // Event base exp rating multiplier .job_exp_multiplier = 3; // Event job exp rating multiplier .floating_rates = 1; // Increase servers exp and drop rates for 1 hour after boss kill(0=Disable, 1=Enable) // Monsters default attributes .MOB_MAXHP = 100000000; // How much HP can monster have at maximum .MOB_HP = 5000000; // How much HP monster has on spawn .MOB_SPEED = 130; // Speed .MOB_CRIT = 450; // Crit rate (1000/100%) .MOB_HIT = 300; // Hit rate .MOB_ATKMIN = 1000; // Base Attack Minimum .MOB_ATKMAX = 4000; // Base Attack Maximum .MOB_MATKMIN = 1000; // Magic Attack Minimum .MOB_MATKMAX = 4000; // Magic Attack Maximum .MOB_DEF = 35; // Defence .MOB_MDEF = 35; // Magic Defence .MOB_FLEE = 200; // Flee .MOB_PDODGE = 100; // Perfect Dodge // Event monster ID's setarray .event_mobs[0], 2476, // Amdarias 1719, // Detale 1768, // Gloom Under Night 1779, // Ktullanux 1646, // Lord Knight Seyren 2131; // Lost Dragon // Event reward ID's (One random array is selected) setarray .loots_0, 501, 502, 503, 504, 505, 506; setarray .loots_1, 507, 508, 509, 510, 511, 512; setarray .loots_2, 513, 514, 515, 516, 517, 518; setarray .loots_3, 519, 520, 521, 522, 523, 525; // Event reward ID's array size (Important!) // If you add more loots_<Number> arrays. You must change this accordingly. // Index start from 0 .loots_count = 3; // Event map names setarray .event_maps$[0], "prontera", "morocc", "geffen", "payon", "alberta", "aldebaran", "xmas", "comodo", "yuno", "amatsu", "gonryun", "umbala", "louyang", "ayothaya", "einbroch", "hugel", "rachel", "veins", "moscovia"; // Event loot distribution mode description setarray .loot_mode_desc$[0], "Give all rewards to all party members", // .loot_mode = 0 "Give one reward to one random party member", // .loot_mode = 1 "Give all rewards to one random party member", // .loot_mode = 2 "Give rewards randomly between all party members", // .loot_mode = 3 "Give all rewards to all nearby players and their party members", // .loot_mode = 4 (Skip UI) "Give one reward to all nearby players and their party members", // .loot_mode = 5 (Skip UI) "Give all rewards to all nearby players", // .loot_mode = 6 (Skip UI) "Give one reward to all nearby players", // .loot_mode = 7 (Skip UI) "Give all rewards to all players in the same map", // .loot_mode = 8 (Skip UI) "Give one reward to all players in the same map"; // .loot_mode = 9 (Skip UI) // Log console information // This will report incorrect monster ID's on script load /*for( [email protected] = 0; [email protected] < getarraysize(.event_mobs); [email protected]++ ) { if( getmonsterinfo(.event_mobs[[email protected]], 0) == "null" ) { debugmes .npc_name$ + ":OnInit Monster ID:" + .event_mobs[[email protected]] + " DOES NOT EXIST!"; } }*/ // Start event on script load (For testing purposes) donpcevent .npc_name$ + "::OnEnable"; end; OnEnable: OnClock0402: OnClock2359: // Announce event will start soon announce "[World Boss] A rift on time and space is about to be opened! A World Boss will appear in " + (.event_sleep / 60000) + " minute! Prepare your Team!", bc_all, 0xFF0000; // Sleep until X time have passed and then continue script sleep .event_sleep; // Select random mob and map [email protected]_mob = rand( getarraysize( .event_mobs ) ); // Random mob index number [email protected]_id = .event_mobs[ [email protected]_mob ]; // Select event mob by random mob index SelectRandomMap: // Check if all maps are in use if ( getarraysize([email protected]_MAP$) >= getarraysize(.event_maps$) ) { debugmes .npc_name$+"::OnEnable all event maps are active!"; end; } [email protected]_map = rand( getarraysize( .event_maps$ ) ); // Random map index number [email protected]_name$ = .event_maps$[ [email protected]_map ]; // Select event map by random map index [email protected]_exists = 0; // Search if same map exists for ( [email protected] = 0; [email protected] < getarraysize([email protected]_MAP$); [email protected]++ ) { // Jump to SelectRandomMap if selected map exists in the array jump_zero ([email protected]_MAP$[[email protected]] != .event_maps$[ [email protected]_map ]), SelectRandomMap; } // Get last event index [email protected] = getarraysize([email protected]_GID); // Save event maps original mapflags setarray [email protected]_MF_PARTYLOCK[[email protected]], getmapflag([email protected]_name$, MF_PARTYLOCK); setarray [email protected]_MF_NOMOBLOOT[[email protected]], getmapflag([email protected]_name$, MF_NOMOBLOOT); setarray [email protected]_MF_NOMVPLOOT[[email protected]], getmapflag([email protected]_name$, MF_NOMVPLOOT); setarray [email protected]_MF_NOPENALTY[[email protected]], getmapflag([email protected]_name$, MF_NOPENALTY); setarray [email protected]_MF_NOMOBTELE[[email protected]], getmapflag([email protected]_name$, MF_MONSTER_NOTELEPORT); setarray [email protected]_MF_BASEEXP[[email protected]], getmapflag([email protected]_name$, MF_BEXP); setarray [email protected]_MF_JOBEXP[[email protected]], getmapflag([email protected]_name$, MF_JEXP); setarray [email protected]_MF_FOG[[email protected]], getmapflag([email protected]_name$, MF_FOG); // Set new mapflags setmapflag [email protected]_name$, MF_PARTYLOCK; // Disable changing party(Inviting new players in event map) setmapflag [email protected]_name$, MF_NOMOBLOOT; // Disable Normal monster loot drops setmapflag [email protected]_name$, MF_NOMVPLOOT; // Disable Boss monster loot drops setmapflag [email protected]_name$, MF_NOPENALTY; // Disable Exp and Zeny penalty setmapflag [email protected]_name$, MF_MONSTER_NOTELEPORT; // Disable monster teleport setmapflag [email protected]_name$, MF_BEXP, ([email protected]_MF_BASEEXP[[email protected]] * .base_exp_multiplier); // Set Base Exp rating setmapflag [email protected]_name$, MF_JEXP, ([email protected]_MF_JOBEXP[[email protected]] * .job_exp_multiplier); // Set Job Exp rating setmapflag [email protected]_name$, MF_FOG; // Enable FOG effect // Summon event monster unit monster [email protected]_name$, 0, 0, "World Boss", [email protected]_id, 1, .npc_name$+"::OnMonsterDeath", Size_Large, AI_NONE; // How about indexing event label "::OnMonster_0_Death" and event would call function with index variable? // Get monster Game ID [email protected] = [email protected][0]; // Change unit data to defaults setunitdata [email protected], UMOB_MAXHP, .MOB_MAXHP; setunitdata [email protected], UMOB_HP, .MOB_HP; setunitdata [email protected], UMOB_SPEED, .MOB_SPEED; setunitdata [email protected], UMOB_CRIT, .MOB_CRIT; setunitdata [email protected], UMOB_HIT, .MOB_HIT; setunitdata [email protected], UMOB_ATKMIN, .MOB_ATKMIN; setunitdata [email protected], UMOB_ATKMAX, .MOB_ATKMAX; setunitdata [email protected], UMOB_MATKMIN, .MOB_MATKMIN; setunitdata [email protected], UMOB_MATKMAX, .MOB_MATKMAX; setunitdata [email protected], UMOB_DEF, .MOB_DEF; setunitdata [email protected], UMOB_MDEF, .MOB_MDEF; setunitdata [email protected], UMOB_FLEE, .MOB_FLEE; setunitdata [email protected], UMOB_PDODGE, .MOB_PDODGE; // Get units updated data getunitdata([email protected], [email protected]); // Save event arrays setarray [email protected]_ID[[email protected]], [email protected]_id; setarray [email protected]_GID[[email protected]], [email protected]; setarray [email protected]_TIMEOUT[[email protected]], gettimetick(0); setarray [email protected]_NEAR[[email protected]], 0; setarray [email protected]_MAP$[[email protected]], [email protected]_name$; setarray [email protected]_X[[email protected]], [email protected][UMOB_X]; setarray [email protected]_Y[[email protected]], [email protected][UMOB_Y]; // Unit talk unittalk [email protected], "Tremble before me mortals!", bc_area; // Announce event started announce "[World Boss] A World Boss "+ getmonsterinfo([email protected]onster_id, 0) +" appeared in "+ [email protected]_name$ +" to wreck havoc!! Form a Team and stop it!!", bc_all, 0xFF0000; // Start unit radar if ( getarraysize([email protected]_GID) ) { donpcevent "WorldBossRadar::OnEnable"; } // Start timeout timer if ( !getnpctimer(1, "WorldBossTimeout") ) { donpcevent "WorldBossTimeout::OnEnable"; } end; // Disable event OnDisable: // Stop timeout timer donpcevent "WorldBossTimeout::OnDisable"; // Stop unit radar donpcevent "WorldBossRadar::OnDisable"; // Reset server exp and drop rates if ( .floating_rates ) { donpcevent "WorldBossRates::OnDisable"; } // Loop all events for ( [email protected] = 0; [email protected] < getarraysize([email protected]_GID); [email protected]++ ) { // Kill all units if ( unitexists([email protected]_GID[[email protected]]) ) { unitkill([email protected]_GID[[email protected]]); } // Reset all mapflags to original values callfunc("WB_ResetMapflags", [email protected]_MAP$[[email protected]], [email protected]); } // Kill all script or gm summoned monsters //killmonster .event_map$, "All"; // Reset all event arrays callfunc("WB_ResetAllGlobals"); end; // Event when monster has been killed OnMonsterDeath: // Stop unit radar and timeout if no unit is alive if ( !getarraysize([email protected]_GID) ) { donpcevent "WorldBossRadar::OnDisable"; donpcevent "WorldBossTimeout::OnDisable"; } // Check attached RID if ( !playerattached() ) { // !TODO When player is not attached //debugmes .npc_name$+"::OnMonsterDeath no player attached!"; end; } // Get party ID [email protected]_id = getcharid(1); // Get map coordinates (Treasure Chest NPC will need these) getmapxy(.event_map$, .event_x, .event_y, UNITTYPE_PC); // Announce announce "[World Boss] The World Boss have been killed! Congratulations!", bc_all, 0xFF0000; // Increase server exp and drop rates for limited time if ( .floating_rates ) { donpcevent "WorldBossRates::OnEnable"; } // Get index if map name are same [email protected] = -1; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_MAP$); [email protected]++ ) { if ( [email protected]_MAP$[[email protected]] == .event_map$ ) { [email protected] = [email protected]; break; } } // Check if index was found and stop if not if ( [email protected] == -1 ) { debugmes .npc_name$+"::OnMonsterDeath event index was not found!"; end; } // Reset mapflags to original values callfunc("WB_ResetMapflags", [email protected]_MAP$[[email protected]], [email protected]); // Save event arrays setarray [email protected]_MAP$[[email protected]], .event_map$; setarray [email protected]_X[[email protected]], .event_x; setarray [email protected]_Y[[email protected]], .event_y; setarray [email protected]_PARTY[[email protected]], [email protected]_id; // Enable first available Treasure Chest NPC // Set .event_map$, .event_x, .event_y before enabling ( Important! ) for ( [email protected] = 1; [email protected] <= .treasure_chests; [email protected]++ ) { [email protected]$ = "Treasure Chest#" + [email protected]; // Name of the NPC if ( getnpcid(0, [email protected]$) ) { // If NPC exists if ( !getnpctimer( 1, [email protected]$ ) ) { // If has active timer=1 setarray [email protected]_BOX$[[email protected]], [email protected]$; donpcevent [email protected]$ +"::OnEnable"; break; } } } // Switch by loot mode and save character IDs for access switch( .loot_mode ) { case 0: case 1: case 2: case 3: // In same party or single player // Attach all available party members if ( getcharid(1) ) { addrid(2, 0, getcharid(1)); } break; case 4: case 5: // In range and party // Attach all available players in 20 cells from the killer RID addrid(4, 0, (.event_x - 20),(.event_y - 20), (.event_x + 20),(.event_y + 20)); // Attach all available party members if ( getcharid(1) ) { addrid(2, 0, getcharid(1)); } break; case 6: case 7: // In range // Attach all available players in 20 cells from the killer RID addrid(4, 0, (.event_x - 20),(.event_y - 20), (.event_x + 20),(.event_y + 20)); break; case 8: case 9: // In the same map addrid(1, 0, getcharid(1)); break; } // Find matching character IDs from the access array [email protected]_exists = 0; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_ACCESS); [email protected]++ ) { if ( [email protected]_ACCESS[[email protected]] == getcharid(0) ) { [email protected]_exists++; } } // Leave script if character ID exists if ( [email protected]_exists ) { end; // Already has access } // Save character ID into access array setarray [email protected]_ACCESS[getarraysize([email protected]_ACCESS)], getcharid(0); setarray [email protected]_ACCESS_EXPIRE[getarraysize([email protected]_ACCESS_EXPIRE)], gettimetick(0); // Start access expire timer if not already running if ( !getnpctimer(1, "WorldBossAccessExpire") ) { donpcevent "WorldBossAccessExpire::OnEnable"; } end; // Event when player opens Treasure Chest NPC OnTreasureOpen: // Get map coordinates of the player getmapxy([email protected]_map$, [email protected], [email protected], UNITTYPE_PC); // Search for character ID from the access array [email protected]_index = -1; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_ACCESS); [email protected]++ ) { if ( [email protected]_ACCESS[[email protected]] == getcharid(0) ) { [email protected]_index = [email protected]; break; } } // User has no access! if ( [email protected]_index == -1 ) { message strcharinfo(0), "Treasure Chest is empty."; end; } // Select random reward array [email protected]_reward = rand(0, .loots_count); [email protected]_size = getarraysize( getd(".loots_" + [email protected]_reward) ); copyarray [email protected][0], getd(".loots_" + [email protected]_reward + "[0]"), [email protected]_size; switch( .loot_mode ) { case 0: // All to all members case 2: // All to random member case 3: // Randomly to all members if ( getcharid(1) ) { goto OnPartyLeader; } else { // Has no party for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { getitem [email protected][[email protected]], 1; } } break; case 1: // One to random member if ( getcharid(1) ) { // Party Leader will distribute loots goto OnPartyLeader; } else { // Has no party getitem [email protected][rand([email protected]_size)], 1; } break; case 4: // All in range and party case 6: // All in range case 8: // All in same map default: // No UI for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { getitem [email protected][[email protected]], 1; } break; case 5: // One in range and party case 7: // One in range case 9: // One in same map // No UI getitem [email protected][rand([email protected]_size)], 1; break; } // Remove character ID from the access array (Access is now used) deletearray [email protected]_ACCESS[[email protected]_index], 1; deletearray [email protected]_ACCESS_EXPIRE[[email protected]_index], 1; // Announce player message strcharinfo(0), "Congratulations! You have been rewarded for killing the World Boss."; // Get event index from the map name array [email protected] = -1; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_MAP$); [email protected]++ ) { if ( [email protected]_MAP$[[email protected]] == [email protected]_map$ ) { [email protected] = [email protected]; break; } } // Check if index was found if ( [email protected] == -1 ) { debugmes [email protected]$+"::OnTreasureOpen event map name ( "+ [email protected]_map$ +" ) not found!"; end; } // Disable current NPC Treasure Chest if ( !getarraysize([email protected]_ACCESS) ) { // Disable current NPC Treasure Chest callfunc("WB_ResetBox", [email protected]); // Stop access expire timer donpcevent "WorldBossAccessExpire::OnDisable"; } end; OnPartyLeader: // Get party ID [email protected]_id = getcharid(1); // Check if player is party leader if ( getcharid(0) != getpartyleader( [email protected]_id, 2 ) ) { message strcharinfo(0), "You're not Party Leader."; end; } // Get event index from the party ID array [email protected] = -1; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_PARTY); [email protected]++ ) { if ( [email protected]_PARTY[[email protected]] == [email protected]_id ) { [email protected] = [email protected]; break; } } // Check if party id has access! if ( [email protected] == -1 ) { message strcharinfo(0), "Treasure Chest is empty."; end; } // Select random reward array [email protected]_reward = rand(0, .loots_count); [email protected]_size = getarraysize(getd(".loots_" + [email protected]_reward)); copyarray [email protected][0], getd(".loots_" + [email protected]_reward + "[0]"), [email protected]_size; // Show loot distribution window mes "[ Loot Distributor ]"; mes "Please ensure you distribute the Rewards. If you cancelled this, your party might not able to receive any rewards."; mes "^777777Loot mode : ^000000" + .loot_mode_desc$[.loot_mode]; // Loot mode description next; mes "[ Loot Distributor ]"; for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { mes "^777777 ~ " + getitemname( [email protected][[email protected]] ) + "^000000"; } next; if( select( "Distribute Loots", "Dispose Loots" ) == 1 ) { // Get party data getpartymember [email protected]_id, 1; // Character IDs getpartymember [email protected]_id, 2; // Account IDs // Copy the temporary party data [email protected]_size = [email protected]; copyarray [email protected]_cid[0], [email protected][0], [email protected]_size; copyarray [email protected]_aid[0], [email protected][0], [email protected]_size; // LOOT MODE 0: Give all rewards to all party members if( .loot_mode == 0 ) { mes "[ Loot Distributor ]"; // Loop through each party member for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { // Online check if( isloggedin([email protected]_aid[[email protected]], [email protected]_cid[[email protected]]) ) { mes " ~ " + strcharinfo(0, [email protected]_cid[[email protected]]) + " was rewarded!"; // Loop through each reward for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { getitem [email protected][[email protected]], 1, [email protected]_aid[[email protected]]; } } } } // LOOT MODE 1: Give one reward to one random party member else if( .loot_mode == 1 ) { // Select random party member X times. SelectRandom1: [email protected] = 0; // Counter for random player select [email protected]_party = rand([email protected]_size); while( !isloggedin([email protected]_aid[[email protected]_party], [email protected]_cid[[email protected]_party]) ) { if( [email protected] >= .loop_max ) break; [email protected]_party = rand([email protected]_size); [email protected]++; } // Max attempts reached if( [email protected] >= .loop_max ) { mes "[ Player not found ]"; mes "Tried to select random player " + [email protected] + " times!"; mes "Do you want to try again?"; next; if( select("Yes:No") == 1 ) { goto SelectRandom1; } else { goto OnClose; } } // Backup online check (next; will pause script and players can disconnect) if( !isloggedin([email protected]_aid[[email protected]_party], [email protected]_cid[[email protected]_party]) ) { mes "[ Player not online ]"; mes "Member is ^777777offline^000000"; mes "Do you want to try again?"; next; if( select("Yes:No") == 1 ) { goto SelectRandom1; } else { goto OnClose; } } // Give random reward [email protected]_item = rand([email protected]_size); [email protected]$ = strcharinfo(0, [email protected]_cid[[email protected]_party]); mes "[ Loot Distributor ]"; mes [email protected]$ + "^777777 ~ " + getitemname( [email protected][[email protected]_item] ) + "^000000"; message [email protected]$, "Gained " + getitemname( [email protected][[email protected]_item] ) + " ( Distributed Randomly )"; getitem [email protected][[email protected]_item], 1, [email protected]_aid[[email protected]_party]; } // LOOT MODE 2: Give all rewards to one random party member else if( .loot_mode == 2 ) { // Select random party member X times. SelectRandom2: [email protected] = 0; // Counter for random player select [email protected]_party = rand([email protected]_size); while( !isloggedin([email protected]_aid[[email protected]_party], [email protected]_cid[[email protected]_party]) ) { if( [email protected] >= .loop_max ) break; [email protected]_party = rand([email protected]_size); [email protected]++; } // Max attempts reached if( [email protected] >= .loop_max ) { mes "[ Player not found ]"; mes "Tried to select random player " + [email protected] + " times!"; mes "Do you want to try again?"; next; if( select("Yes:No") == 1 ) { goto SelectRandom2; } else { goto OnClose; } } // Backup online check (next; will pause script and players can disconnect) if( !isloggedin([email protected]_aid[[email protected]_party], [email protected]_cid[[email protected]_party]) ) { mes "[ Player not online ]"; mes "Member is ^777777offline^000000"; mes "Do you want to try again?"; next; if( select("Yes:No") == 1 ) { goto SelectRandom2; } else { goto OnClose; } } // Give rewards [email protected]$ = strcharinfo(0, [email protected]_cid[[email protected]_party]); mes "[ Loot Distributor ]"; // Loop through each reward for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { mes [email protected]$ + "^777777 ~ " + getitemname( [email protected][[email protected]] ) + "^000000"; message [email protected]$, "Gained " + getitemname( [email protected][[email protected]] ) + " ( Distributed Randomly )"; getitem [email protected][[email protected]], 1, [email protected]_aid[[email protected]_party]; } } // LOOT MODE 3: Give rewards randomly between all party members else if( .loot_mode == 3 ) { mes "[ Loot Distributor ]"; // Loop through each reward for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { // Select random party member X times. SelectRandom3: [email protected] = 0; // Counter for random player select [email protected]_party = rand([email protected]_size); while( !isloggedin([email protected]_aid[[email protected]_party], [email protected]_cid[[email protected]_party]) ) { if( [email protected] >= .loop_max ) break; [email protected]_party = rand([email protected]_size); [email protected]++; } // Max attempts reached if( [email protected] >= .loop_max ) { mes "[ Player not found ]"; mes "Tried to select random player " + [email protected] + " times!"; mes "Do you want to try again?"; next; if( select("Yes:No") == 1 ) { goto SelectRandom3; } else { goto OnClose; } } // Backup online check (next; will pause script and players can disconnect) if( !isloggedin([email protected]_aid[[email protected]_party], [email protected]_cid[[email protected]_party]) ) { mes "[ Player not online ]"; mes "Member is ^777777offline^000000"; mes "Do you want to try again?"; next; if( select("Yes:No") == 1 ) { goto SelectRandom3; } else { goto OnClose; } } // Give single reward [email protected]$ = strcharinfo(0, [email protected]_cid[[email protected]_party]); mes [email protected]$ + "^777777 ~ " + getitemname( [email protected][[email protected]] ) + "^000000"; message [email protected]$, "Gained " + getitemname( [email protected][[email protected]] ) + " ( Distributed Randomly )"; getitem [email protected][[email protected]], 1, [email protected]_aid[[email protected]_party]; } } } else { // Disposed loots mes "[ Loot Distributor ]"; } mes "Congratulations!"; // Remove all party members access callfunc("WB_ResetPartyAccess", [email protected]_id); close2; // Disable current NPC Treasure Chest callfunc("WB_ResetBox", [email protected]); end; OnClose: // Close reward window mes "[ Loot Distributor ]"; mes "Good bye."; close; } // Function: Reset all party members access IDs // callfunc("WB_ResetPartyAccess", <party id>) function script WB_ResetPartyAccess { [email protected]_id = getarg(0); getpartymember [email protected]_id, 1; // Character IDs [email protected]_size = [email protected]; copyarray [email protected]_cid[0], [email protected][0], [email protected]_size; for ( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ) { for ( [email protected] = 0; [email protected] < getarraysize([email protected]_ACCESS); [email protected]++ ) { if ( [email protected]_ACCESS[[email protected]] == [email protected]_cid[[email protected]] ) { deletearray [email protected]_ACCESS[[email protected]], 1; deletearray [email protected]_ACCESS_EXPIRE[[email protected]], 1; } } } // Remove party id /*for ( [email protected] = 0; [email protected] < getarraysize([email protected]_PARTY); [email protected]++ ) { if ( [email protected]_PARTY[[email protected]] == [email protected]_id ) { deletearray [email protected]_PARTY[[email protected]], 1; } }*/ return; } // Function: Reset specific WorldBoss event global arrays // callfunc("WB_ResetEventGlobals", <index>) function script WB_ResetEventGlobals { [email protected] = getarg(0, 0); // Event index Default=0 deletearray [email protected]_ID[[email protected]], 1; deletearray [email protected]_GID[[email protected]], 1; deletearray [email protected]_TIMEOUT[[email protected]], 1; deletearray [email protected]_NEAR[[email protected]], 1; deletearray [email protected]_MAP$[[email protected]], 1; deletearray [email protected]_X[[email protected]], 1; deletearray [email protected]_Y[[email protected]], 1; deletearray [email protected]_PARTY[[email protected]], 1; deletearray [email protected]_BOX$[[email protected]], 1; //deletearray [email protected]_ACCESS[[email protected]], 1; //deletearray [email protected]_ACCESS_EXPIRE[[email protected]],1; deletearray [email protected]_MF_PARTYLOCK[[email protected]], 1; deletearray [email protected]_MF_NOMOBLOOT[[email protected]], 1; deletearray [email protected]_MF_NOMVPLOOT[[email protected]], 1; deletearray [email protected]_MF_NOPENALTY[[email protected]], 1; deletearray [email protected]_MF_NOMOBTELE[[email protected]], 1; deletearray [email protected]_MF_BASEEXP[[email protected]], 1; deletearray [email protected]_MF_JOBEXP[[email protected]], 1; deletearray [email protected]_MF_FOG[[email protected]], 1; return; } // Function: Reset all WorldBoss event global arrays // callfunc("WB_ResetAllGlobals") function script WB_ResetAllGlobals { deletearray [email protected]_ID[0], getarraysize([email protected]_ID); deletearray [email protected]_GID[0], getarraysize([email protected]_GID); deletearray [email protected]_TIMEOUT[0], getarraysize([email protected]_TIMEOUT); deletearray [email protected]_NEAR[0], getarraysize([email protected]_NEAR); deletearray [email protected]_MAP$[0], getarraysize([email protected]_MAP$); deletearray [email protected]_X[0], getarraysize([email protected]_X); deletearray [email protected]_Y[0], getarraysize([email protected]_Y); deletearray [email protected]_PARTY[0], getarraysize([email protected]_PARTY); deletearray [email protected]_BOX$[0], getarraysize([email protected]_BOX$); deletearray [email protected]_ACCESS[0], getarraysize([email protected]_ACCESS); deletearray [email protected]_ACCESS_EXPIRE[0], getarraysize([email protected]_ACCESS_EXPIRE); deletearray [email protected]_MF_PARTYLOCK[0], getarraysize([email protected]_MF_PARTYLOCK); deletearray [email protected]_MF_NOMOBLOOT[0], getarraysize([email protected]_MF_NOMOBLOOT); deletearray [email protected]_MF_NOMVPLOOT[0], getarraysize([email protected]_MF_NOMVPLOOT); deletearray [email protected]_MF_NOPENALTY[0], getarraysize([email protected]_MF_NOPENALTY); deletearray [email protected]_MF_NOMOBTELE[0], getarraysize([email protected]_MF_NOMOBTELE); deletearray [email protected]_MF_BASEEXP[0], getarraysize([email protected]_MF_BASEEXP); deletearray [email protected]_MF_JOBEXP[0], getarraysize([email protected]_MF_JOBEXP); deletearray [email protected]_MF_FOG[0], getarraysize([email protected]_MF_FOG); return; } // Function: Reset all mapflags to original values // callfunc("WB_ResetMapflags", <map name>, <index>) function script WB_ResetMapflags { [email protected]$ = getarg(0, "null"); // Map name Default="null" [email protected] = getarg(1, 0); // Event index Default=0 // Map name exists if ([email protected]$ == "null") return; // Party Lock if ( [email protected]_MF_PARTYLOCK[[email protected]] ) setmapflag [email protected]$, MF_PARTYLOCK; else removemapflag [email protected]$, MF_PARTYLOCK; // No mob loot if ( [email protected]_MF_NOMOBLOOT[[email protected]] ) setmapflag [email protected]$, MF_NOMOBLOOT; else removemapflag [email protected]$, MF_NOMOBLOOT; // No MVP loot if ( [email protected]_MF_NOMVPLOOT[[email protected]] ) setmapflag [email protected]$, MF_NOMVPLOOT; else removemapflag [email protected]$, MF_NOMVPLOOT; // No penalty if ( [email protected]_MF_NOPENALTY[[email protected]] ) setmapflag [email protected]$, MF_NOPENALTY; else removemapflag [email protected]$, MF_NOPENALTY; // No mob teleport if ( [email protected]_MF_NOMOBTELE[[email protected]] ) setmapflag [email protected]$, MF_MONSTER_NOTELEPORT; else removemapflag [email protected]$, MF_MONSTER_NOTELEPORT; // Base Exp setmapflag [email protected]$, MF_BEXP, [email protected]_MF_BASEEXP[[email protected]]; // Job Exp setmapflag [email protected]$, MF_JEXP, [email protected]_MF_JOBEXP[[email protected]]; // Effect FOG if ( [email protected]_MF_FOG[[email protected]] ) setmapflag [email protected]$, MF_FOG; else removemapflag [email protected]$, MF_FOG; return; } // Function: Reset specific Treasure Chest NPC // callfunc("WB_ResetBox", <index>) function script WB_ResetBox { [email protected] = getarg(0, 0); // Event index Default=0 if ( [email protected]_BOX$[[email protected]] != "" ) { if ( getnpcid(0, [email protected]_BOX$[[email protected]]) ) { // Do these checks or this will select all NPCs on the server when fail donpcevent [email protected]_BOX$[[email protected]]+"::OnDisable"; } } } // Function: Reset all Treasure Chest NPC's // callfunc("WB_ResetAllBoxes") function script WB_ResetAllBoxes { for ( [email protected] = 0; [email protected] < getarraysize([email protected]_BOX$); [email protected]++ ) { if ( [email protected]_BOX$[[email protected]] != "" ) { if ( getnpcid(0, [email protected]_BOX$[[email protected]]) ) { // Do these checks or this will select all NPCs on the server when fail donpcevent [email protected]_BOX$[[email protected]]+"::OnDisable"; } } } } // Treasure chest NPC alberta,0,0,5 script Treasure Chest#1 1324,{ emotion ET_SURPRISE, getcharid(3); // Emotion on the player // Disable current NPC Treasure Chest if empty if ( !getarraysize([email protected]_ACCESS) ) { message strcharinfo(0), "Treasure Chest is empty."; donpcevent strnpcinfo(0)+"::OnDisable"; // Stop access expire timer donpcevent "WorldBossAccessExpire::OnDisable"; end; } doevent "WorldBoss::OnTreasureOpen"; end; OnInit: [email protected]$ = strnpcinfo(0); //rid2name( [email protected] ); [email protected] = getnpctimer(1, [email protected]$); getmapxy(.map$, .x, .y, UNITTYPE_NPC); disablenpc [email protected]$; //debugmes [email protected]$+"::OnInit target=" + .map$ + " NPC="+ [email protected]$ + " timer="+ [email protected]; end; OnEnable: // if enabled getnpctimer(1, strnpcinfo(0)) will return 1 [email protected] = getnpcid(0); [email protected]$ = strnpcinfo(0); //rid2name( [email protected] ); [email protected] = getnpctimer(1, [email protected]$); [email protected]$ = "WorldBoss"; [email protected]$ = getvariableofnpc(.event_map$, [email protected]$); [email protected] = getvariableofnpc(.event_x, [email protected]$); [email protected] = getvariableofnpc(.event_y, [email protected]$); enablenpc( [email protected]$ ); unitwarp( [email protected], [email protected]$, [email protected], [email protected] ); // Move to new position initnpctimer( [email protected]$ ); // Start timeout timer //debugmes [email protected]$+"::OnEnable target="+ [email protected]$ +", "+ [email protected] +", "+ [email protected] +" NPC="+ [email protected]$ +" timer="+ [email protected]; end; // Disable Treasure NPC and clean event array OnDisable: [email protected] = getnpcid(0); [email protected]$ = strnpcinfo(0); //rid2name( [email protected] ); [email protected] = getnpctimer(1, [email protected]$); getmapxy([email protected]_map$, [email protected], [email protected], UNITTYPE_NPC); stopnpctimer( [email protected]$ ); // Stop timeout timer unitwarp( [email protected], .map$, .x, .y ); // Return to default position disablenpc( [email protected]$ ); // Clean event data // Get event index from the map name array [email protected] = -1; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_MAP$); [email protected]++ ) { if ( [email protected]_MAP$[[email protected]] == [email protected]_map$ ) { [email protected] = [email protected]; break; } } // Check if index was found if ( [email protected] == -1 ) { debugmes [email protected]$+"::OnDisable event map name ( "+ [email protected]_map$ +" ) not found!"; end; } // Remove current event from the arrays callfunc("WB_ResetEventGlobals", [email protected]); //debugmes [email protected]$+"::OnDisable target="+ [email protected]_map$ +", "+ [email protected] +", "+ [email protected] +" NPC="+ [email protected]$ +" timer="+ [email protected]; end; //OnTimer30000: // 30 seconds //OnTimer120000: // 2 minutes //OnTimer300000: // 5 minutes OnTimer600000: // 10 minutes //OnTimer900000: // 15 minutes [email protected]$ = strnpcinfo(0); getmapxy([email protected]$, [email protected], [email protected], UNITTYPE_NPC); //debugmes [email protected]$+"::OnTimeout target="+ [email protected]$ +", "+ [email protected] +", "+ [email protected] +" NPC="+ [email protected]$; donpcevent [email protected]$+"::OnDisable"; end; } // Treasure Chest duplicates (Add more if you run out) alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#2 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#3 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#4 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#5 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#6 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#7 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#8 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#9 1324 alberta,0,0,5 duplicate(Treasure Chest#1) Treasure Chest#10 1324 // World Boss timeout timer - script WorldBossTimeout -1,{ end; OnEnable: initnpctimer; end; OnDisable: stopnpctimer; end; // Update every 1 minutes OnTimer60000: [email protected] = gettimetick(0); [email protected] = getvariableofnpc(.event_timeout, "WorldBoss"); for ( [email protected] = 0; [email protected] < getarraysize([email protected]_GID); [email protected]++ ) { // Unit must be alive if ( unitexists([email protected]_GID[[email protected]]) && [email protected] > ([email protected]_TIMEOUT[[email protected]] + [email protected]) ) { announce "[World Boss] World Boss time in "+ [email protected]_MAP$[[email protected]] +" has expired!", bc_all, 0xFF0000; unitkill( [email protected]_GID[[email protected]] ); // Reset event mapflags callfunc("WB_ResetMapflags", [email protected]_MAP$[[email protected]], [email protected]); // Remove event global arrays callfunc("WB_ResetEventGlobals", [email protected]); } } initnpctimer; end; } // World Boss Unit's Radar // Count users around the world boss and increase it's HP by each Player nearby - script WorldBossRadar -1,{ end; OnInit: .npc_name$ = strnpcinfo(0); .radius = 15; // Cell radius .HPLevel = 1500000; // HP increase per player .MinHP = .HPLevel * 2; // Minimum HP when to stop decreasing HP end; OnEnable: initnpctimer; end; OnDisable: stopnpctimer; end; // Every 10 secods update all World Boss unit data OnTimer10000: for ( [email protected] = 0; [email protected] < getarraysize([email protected]_GID); [email protected]++ ) { [email protected] = [email protected]_GID[[email protected]]; if ( unitexists([email protected]) ) { getunitdata([email protected], [email protected]); [email protected] = [email protected][UMOB_HP]; [email protected] = [email protected][UMOB_MAXHP]; [email protected] = [email protected][UMOB_X]; [email protected] = [email protected][UMOB_Y]; [email protected] = getareausers(mapid2name([email protected][UMOB_MAPID]), ([email protected] - .radius), ([email protected] - .radius), ([email protected] + .radius), ([email protected] + .radius)); if ( [email protected] > [email protected]_NEAR[[email protected]] ) { // Increase HP per each player nearby [email protected]_hp = [email protected] + ( .HPLevel * [email protected] ); // Stop increasing HP after maximum has been reached if ( [email protected]_hp < [email protected] ) { setunitdata [email protected], UMOB_HP, [email protected]_hp; unittalk [email protected], rid2name([email protected]) + " : Mortals has entered my sight!", bc_area; } } else if ( [email protected] < [email protected]_NEAR[[email protected]] ) { // Decrease HP per each player nearby [email protected]_hp = [email protected] - .HPLevel; // Stop decreasing HP after minimum has been reached if ( [email protected]_hp > .MinHP ) { setunitdata [email protected], UMOB_HP, [email protected]_hp; unittalk [email protected], rid2name([email protected]) + " : Mortals has left my sight!", bc_area; } } // Update users count setarray [email protected]_NEAR[[email protected]], [email protected]; } } initnpctimer; end; } // World Boss access expire timer // This will clean event access array from getting too big in time. - script WorldBossAccessExpire -1,{ end; OnEnable: //debugmes strnpcinfo(0)+"::OnEnable"; initnpctimer; end; OnDisable: //debugmes strnpcinfo(0)+"::OnDisable"; stopnpctimer; end; // Update every 5 minutes OnTimer300000: //debugmes strnpcinfo(0)+"::OnTimer"; [email protected] = gettimetick(0); [email protected] = getvariableofnpc(.event_access_expire, "WorldBoss"); for ( [email protected] = 0; [email protected] < getarraysize([email protected]_ACCESS); [email protected]++ ) { // Check if access has expired if ( [email protected] > ([email protected]_ACCESS_EXPIRE[[email protected]] + [email protected]) ) { // Current access has expired! Remove access and expire time. deletearray [email protected]_ACCESS[[email protected]], 1; deletearray [email protected]_ACCESS_EXPIRE[[email protected]], 1; } } // Continue timer if access is not empty if ( getarraysize([email protected]_ACCESS) ) { initnpctimer; } end; } // World Boss Floating Rates - script WorldBossRates -1,{ OnInterIfInitOnce: // Set once on server start $wb_battle_flags = 0; // Set servers default battle flags $wb_base_exp_rate = getBattleFlag("base_exp_rate"); $wb_job_exp_rate = getBattleFlag("job_exp_rate"); $wb_item_rate_common = getBattleFlag("item_rate_common"); $wb_item_rate_common_boss = getBattleFlag("item_rate_common_boss"); $wb_item_rate_common_mvp = getBattleFlag("item_rate_common_mvp"); $wb_item_rate_heal = getBattleFlag("item_rate_heal"); $wb_item_rate_heal_boss = getBattleFlag("item_rate_heal_boss"); $wb_item_rate_heal_mvp = getBattleFlag("item_rate_heal_mvp"); $wb_item_rate_use = getBattleFlag("item_rate_use"); $wb_item_rate_use_boss = getBattleFlag("item_rate_use_boss"); $wb_item_rate_use_mvp = getBattleFlag("item_rate_use_mvp"); $wb_item_rate_equip = getBattleFlag("item_rate_equip"); $wb_item_rate_equip_boss = getBattleFlag("item_rate_equip_boss"); $wb_item_rate_equip_mvp = getBattleFlag("item_rate_equip_mvp"); $wb_item_rate_card = getBattleFlag("item_rate_card"); $wb_item_rate_card_boss = getBattleFlag("item_rate_card_boss"); $wb_item_rate_card_mvp = getBattleFlag("item_rate_card_mvp"); $wb_item_rate_mvp = getBattleFlag("item_rate_mvp"); $wb_item_rate_adddrop = getBattleFlag("item_rate_adddrop"); $wb_item_rate_treasure = getBattleFlag("item_rate_treasure"); end; OnInit: // Reset rates on script load if ( $wb_base_exp_rate && getBattleFlag("base_exp_rate") != $wb_base_exp_rate ) donpcevent strnpcinfo(0)+"::OnDisable"; end; OnEnable: // Check already enabled if ( !$wb_battle_flags ) { // Double server ratings setBattleFlag("base_exp_rate", $wb_base_exp_rate * 2); setBattleFlag("job_exp_rate", $wb_job_exp_rate * 2); setBattleFlag("item_rate_common", $wb_item_rate_common * 2); setBattleFlag("item_rate_common_boss", $wb_item_rate_common_boss * 2); setBattleFlag("item_rate_common_mvp", $wb_item_rate_common_mvp * 2); setBattleFlag("item_rate_heal", $wb_item_rate_heal * 2); setBattleFlag("item_rate_heal_boss", $wb_item_rate_heal_boss * 2); setBattleFlag("item_rate_heal_mvp", $wb_item_rate_heal_mvp * 2); setBattleFlag("item_rate_use", $wb_item_rate_use * 2); setBattleFlag("item_rate_use_boss", $wb_item_rate_use_boss * 2); setBattleFlag("item_rate_use_mvp", $wb_item_rate_use_mvp * 2); setBattleFlag("item_rate_equip", $wb_item_rate_equip * 2); setBattleFlag("item_rate_equip_boss", $wb_item_rate_equip_boss * 2); setBattleFlag("item_rate_equip_mvp", $wb_item_rate_equip_mvp * 2); setBattleFlag("item_rate_card", $wb_item_rate_card * 2); setBattleFlag("item_rate_card_boss", $wb_item_rate_card_boss * 2); setBattleFlag("item_rate_card_mvp", $wb_item_rate_card_mvp * 2); setBattleFlag("item_rate_mvp", $wb_item_rate_mvp * 2); setBattleFlag("item_rate_adddrop", $wb_item_rate_adddrop * 2); setBattleFlag("item_rate_treasure", $wb_item_rate_treasure * 2); } announce "[World Boss] Experience and Drop rates has been doubled for one hour! Enjoy!", bc_all, 0x00FF00; $wb_battle_flags = 1; initnpctimer; end; OnDisable: // Reset normal rates setBattleFlag("base_exp_rate", $wb_base_exp_rate); setBattleFlag("job_exp_rate", $wb_job_exp_rate); setBattleFlag("item_rate_common", $wb_item_rate_common); setBattleFlag("item_rate_common_boss", $wb_item_rate_common_boss); setBattleFlag("item_rate_common_mvp", $wb_item_rate_common_mvp); setBattleFlag("item_rate_heal", $wb_item_rate_heal); setBattleFlag("item_rate_heal_boss", $wb_item_rate_heal_boss); setBattleFlag("item_rate_heal_mvp", $wb_item_rate_heal_mvp); setBattleFlag("item_rate_use", $wb_item_rate_use); setBattleFlag("item_rate_use_boss", $wb_item_rate_use_boss); setBattleFlag("item_rate_use_mvp", $wb_item_rate_use_mvp); setBattleFlag("item_rate_equip", $wb_item_rate_equip); setBattleFlag("item_rate_equip_boss", $wb_item_rate_equip_boss); setBattleFlag("item_rate_equip_mvp", $wb_item_rate_equip_mvp); setBattleFlag("item_rate_card", $wb_item_rate_card); setBattleFlag("item_rate_card_boss", $wb_item_rate_card_boss); setBattleFlag("item_rate_card_mvp", $wb_item_rate_card_mvp); setBattleFlag("item_rate_mvp", $wb_item_rate_mvp); setBattleFlag("item_rate_adddrop", $wb_item_rate_adddrop); setBattleFlag("item_rate_treasure", $wb_item_rate_treasure); $wb_battle_flags = 0; stopnpctimer; end; OnTimer3600000: // 1 hour donpcevent strnpcinfo(0)+"::OnDisable"; end; } // NPC World Boss Information prontera,147,174,4 script World Boss#info 495,5,5,{ mes "[ " + strnpcinfo(1) + " ]"; mes "About the world bosses."; if ( getarraysize([email protected]_GID) ) { [email protected] = gettimetick(0); [email protected] = getvariableofnpc(.event_timeout, "WorldBoss"); mes "Status: ^00CC36Active^000000"; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_GID); [email protected]++ ) { [email protected] = ([email protected]_TIMEOUT[[email protected]] + [email protected]) - [email protected]; mes ([email protected] + 1) + ". Location : " + [email protected]_MAP$[[email protected]]; mes " ^777777 Time Left :^000000 " + ([email protected] / 60000) + " min."; } mes "Good luck!"; } else { mes "Status: ^CC3300Inactive^000000"; mes "Event timetable:"; mes "^777777 ~ 04:02 ^000000"; mes "^777777 ~ 23:59 ^000000"; mes "Wait until the event starts."; } // GM level 60+ has access to menu if( getgmlevel() >= 60 ) { next; switch( select("Information:Start Event:Skip Start Timer:Stop Event:Change Loot Mode:Change Unit Data:Map Flags:Leave") ) { case 1: callsub S_Info; break; case 2: callsub S_Start; break; case 3: callsub S_Skip; break; case 4: callsub S_Stop; break; case 5: callsub S_Loot; break; case 6: callsub S_Unit; break; case 7: callsub S_Mapflags; break; default: break; } } close; S_Info: // Set variables [email protected] = getarraysize([email protected]_GID); [email protected]_mode = getvariableofnpc(.loot_mode, .event_npc$); [email protected] = gettimetick(0); [email protected] = getvariableofnpc(.event_timeout, "WorldBoss"); mes "[ " + strnpcinfo(1) + " ]"; mes "^777777Status: ^000000" + ([email protected] ? "^00CC36Active^000000" : "^CC3300Inactive^000000"); mes "^777777Loot mode: ^000000" + .event_loot_modes$[[email protected]_mode]; [email protected]$ = "Leave:"; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_GID); [email protected]++ ) { if ( [email protected]_GID[[email protected]] || [email protected]_BOX$[[email protected]] != "" ) { // Monster Unit [email protected] = ([email protected]_TIMEOUT[[email protected]] + [email protected]) - [email protected]; // ms // Get unit data if ( unitexists([email protected]_GID[[email protected]]) ) { // Monster unit getunitdata([email protected]_GID[[email protected]], [email protected]); mes ([email protected] + 1) +". Monster: " + [email protected]_ID[[email protected]] +" / "+ getmonsterinfo([email protected]_ID[[email protected]], 0); mes " ^777777 GID: ^000000" + [email protected]_GID[[email protected]]; mes " ^777777 Name: ^000000" + rid2name([email protected]_GID[[email protected]]); mes " ^777777 HP: ^000000" + [email protected][UMOB_HP] + " / " + [email protected][UMOB_MAXHP]; mes " ^777777 Location: ^000000" + mapid2name([email protected][UMOB_MAPID]) + " ^777777 x ^000000" + [email protected][UMOB_X] + " ^777777 y ^000000" + [email protected][UMOB_Y]; mes " ^777777 Time Left :^000000 " + ([email protected] / 60000) + " min."; } else if (unitexists(getnpcid(0, [email protected]_BOX$[[email protected]]))) { // NPC unit getunitdata(getnpcid(0, [email protected]_BOX$[[email protected]]), [email protected]); mes ([email protected] + 1) +". Treasure Chest"; mes " ^777777 GID: ^000000" + getnpcid(0, [email protected]_BOX$[[email protected]]); mes " ^777777 Name: ^000000" + [email protected]_BOX$[[email protected]]; mes " ^777777 Location: ^000000" + mapid2name([email protected][UNPC_MAPID]) + " ^777777 x ^000000" + [email protected][UNPC_X] + " ^777777 y ^000000" + [email protected][UNPC_Y]; } mes "^777777-------^000000"; [email protected]$ += "Go to "[email protected]_MAP$[[email protected]]; } [email protected]$ += ":"; } [email protected] = select([email protected]$) - 2; if ( [email protected] >= 0 ) { if ( unitexists([email protected]_GID[[email protected]]) ) { // Warp to the monster location getunitdata([email protected]_GID[[email protected]], [email protected]); warp mapid2name([email protected][UMOB_MAPID]), [email protected][UMOB_X], [email protected][UMOB_Y]; } else if ( [email protected]_BOX$[[email protected]] != "" ) { // Warp to the NPC location if (unitexists(getnpcid(0, [email protected]_BOX$[[email protected]]))) { getunitdata(getnpcid(0, [email protected]_BOX$[[email protected]]), [email protected]); warp mapid2name([email protected][UNPC_MAPID]), [email protected][UNPC_X], [email protected][UNPC_Y]; } } end; } return; S_Mapflags: mes "[ " + strnpcinfo(1) + " ] Mapflags"; [email protected] = getarraysize([email protected]_GID); if ( [email protected] ) { for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { [email protected]$ = [email protected]_MAP$[[email protected]]; mes [email protected]$ + " : Original Flags"; mes " ^777777 PartyLock : " + [email protected]_MF_PARTYLOCK[[email protected]] + "^000000"; mes " ^777777 NoMobLoot : " + [email protected]_MF_NOMOBLOOT[[email protected]] + "^000000"; mes " ^777777 NoMVPLoot : " + [email protected]_MF_NOMVPLOOT[[email protected]] + "^000000"; mes " ^777777 NoPenalty : " + [email protected]_MF_NOPENALTY[[email protected]] + "^000000"; mes " ^777777 NoMobTele : " + [email protected]_MF_NOMOBTELE[[email protected]] + "^000000"; mes " ^777777 BaseExp : " + [email protected]_MF_BASEEXP[[email protected]] + "^000000"; mes " ^777777 JobExp : " + [email protected]_MF_JOBEXP[[email protected]] + "^000000"; mes " ^777777 Fog : " + [email protected]_MF_FOG[[email protected]] + "^000000"; mes [email protected]$ + " : New Flags"; mes " ^777777 PartyLock : " + getmapflag([email protected]$, MF_PARTYLOCK) + "^000000"; mes " ^777777 NoMobLoot : " + getmapflag([email protected]$, MF_NOMOBLOOT) + "^000000"; mes " ^777777 NoMVPLoot : " + getmapflag([email protected]$, MF_NOMVPLOOT) + "^000000"; mes " ^777777 NoPenalty : " + getmapflag([email protected]$, MF_NOPENALTY) + "^000000"; mes " ^777777 NoMobTele : " + getmapflag([email protected]$, MF_MONSTER_NOTELEPORT) + "^000000"; mes " ^777777 BaseExp : " + getmapflag([email protected]$, MF_BEXP) + "^000000"; mes " ^777777 JobExp : " + getmapflag([email protected]$, MF_JEXP) + "^000000"; mes " ^777777 Fog : " + getmapflag([email protected]$, MF_FOG) + "^000000"; mes "^777777-------^000000"; } } else { mes "No mapflags has been set."; } return; S_Start: donpcevent .event_npc$ + "::OnEnable"; message strcharinfo(0), "Event has been started!"; return; S_Skip: awake .event_npc$; // Cancels any running sleep timers on the NPC message strcharinfo(0), "Event timer has been skipped!"; return; S_Stop: awake .event_npc$; // Cancels any running sleep timers on the NPC donpcevent .event_npc$ + "::OnDisable"; // Announce event stopped announce "[World Boss] The event has been stopped!", bc_all, 0xFF0000; message strcharinfo(0), "Event has been stopped!"; return; S_Loot: [email protected] = getarraysize(.event_loot_modes$); for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) { message strcharinfo(0), "Loot mode "+ [email protected] +" : " + .event_loot_modes$[[email protected]]; } // Change event loot mode option input [email protected], 0, [email protected]; set getvariableofnpc(.loot_mode, .event_npc$), [email protected]; message strcharinfo(0), "Event loot mode changed: " + .event_loot_modes$[[email protected]]; return; S_Unit: // Create menu [email protected]$ = "Leave:"; for ( [email protected] = 0; [email protected] < getarraysize([email protected]_GID); [email protected]++ ) { if ( unitexists([email protected]_GID[[email protected]]) ) { [email protected]$ += [email protected]_MAP$[[email protected]] +" - "+ getmonsterinfo([email protected]_ID[[email protected]], 0); } [email protected]$ += ":"; } [email protected] = select([email protected]$) - 2; // Change unit data (HP,Level,Atk,Etc.) if ( [email protected] >= 0 ) { mes "[ " + strnpcinfo(1) + " ]"; getunitdata([email protected]_GID[[email protected]], [email protected]); for ([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ) { mes .UMOB$[[email protected]] + " = " + [email protected][[email protected]]; } [email protected] = select(.UMOB_menu$) - 1; message strcharinfo(0), "Write a new unit ( " + .UMOB$[[email protected]] + " ) value."; input [email protected], 0, 1000000000; setunitdata([email protected]_GID[[email protected]], [email protected], [email protected]); // Confim data has changed getunitdata([email protected]_GID[[email protected]], [email protected]_udata); message strcharinfo(0), "New unit data is: " + [email protected]_udata[[email protected]]; } return; OnInit: // Event NPC name .event_npc$ = "WorldBoss"; // Event loot mode descriptions setarray .event_loot_modes$[0], "Give all rewards to all party members", // .loot_mode = 0 "Give one reward to one random party member", // .loot_mode = 1 "Give all rewards to one random party member", // .loot_mode = 2 "Give rewards randomly between all party members", // .loot_mode = 3 "Give all rewards to all nearby players and their party members", // .loot_mode = 4 (Skip UI) "Give one reward to all nearby players and their party members", // .loot_mode = 5 (Skip UI) "Give all rewards to all nearby players", // .loot_mode = 6 (Skip UI) "Give one reward to all nearby players", // .loot_mode = 7 (Skip UI) "Give all rewards to all players in the same map", // .loot_mode = 8 (Skip UI) "Give one reward to all players in the same map"; // .loot_mode = 9 (Skip UI) // Unit data attibute names setarray .UMOB$[0], "Size","Level","Hp","Max Hp", "Master AID","Map ID","Map X","Map Y", "Speed","Mode","Ai","Scoption", "Sex","Class","Hair style","Hair color", "Head bottom","Head middle","Head top","Cloth color", "Shield","Weapon","Look dir","Can move tick", "Str","Agi","Vit","Int", "Dex","Luk","Slave cpymstrmd","Dmg immune", "Atk range","Atk min","Atk max","Matk min", "Matk max","Def","Mdef","Hit", "Flee","Pdodge","Crit","Race", "Ele type","Ele level","A-motion","A-delay", "D-motion"; // Unit data menu string .UMOB_menu$ = implode(.UMOB$, ":"); // Set NPC size if class_id supports [email protected]_class = rand(495, 498); [email protected]_size = rand(0, 2); // 0=normal, 1=small, 2=big setnpcdisplay(strnpcinfo(0), strnpcinfo(1), [email protected]_class, [email protected]_size); end; OnTouch: // Player attached end; OnTouchNPC: // Monster attached [email protected]_GID = getattachedrid(); //[email protected]_NAME$ = rid2name([email protected]_GID); //debugmes "Target unit name:" + [email protected]_NAME$; // Get unit data as Array getunitdata([email protected]_GID, [email protected]); [email protected]_AID = [email protected][UMOB_MASTERAID]; // UMOB_MASTERAID=4 // Unit has a master if ( [email protected]_AID ) { [email protected]_NAME$ = rid2name([email protected]_AID); [email protected] = isloggedin([email protected]_AID); if ( [email protected] ) { end; // Do not target players unit } } // NPC emotion emotion ET_KEK; // Warp monsters away from the NPC unitwarp 0, "this", -1, -1; end; } something like this
  18. Hi everyone anyone can help with this maps arug_cas06 arug_cas07 arug_cas08 bat_a03 bat_a04 bat_a05 bat_b03 bat_b04 bat_b05 bat_c04 bat_c04 bat_c05 bat_c06 bat_c07 bat_c08 region_8 rush_cas01 rush_cas02 rush_cas03 rush_cas04 schg_cas06 schg_cas07 schg_cas08 thank you so much
×
×
  • Create New...

Important Information

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