

Racaae
Members-
Posts
263 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Racaae
-
You can find the NPC in /npc/re/merchants/guild_warehouse.txt
-
Hello. Using NoNPC: true will block the copying of all NPCs on the map moc_fild17, including custom ones or those with the OnInstanceInit label (e.g., InstanceSpawner#DD). To enable your custom NPC inside the instance, you must duplicate them manually after the instance is created. *duplicate "<NPC name>","<map>",<x>,<y>{,"<Duplicate NPC name>"{,<sprite>{,<dir>{,<xs>{,<xy>}}}}}; This command will duplicate the NPC with the given <NPC name> on <map> at <x>/<y>. If <Duplicate NPC name>, <sprite>, <dir>, <xs> or <ys> is not provided the value of the original NPC will be used. The Unique name of the new duplicated NPC is returned on success. An empty string is returned on failure. NOTE: Duplicates will always have the same NPC variables as the original NPC. Editing a NPC variable in a duplicate or the original NPC will change it for the others. Example: .@md_name$ = "Phreeoni"; .@id = instance_create(.@md_name$); if (.@id < 0) { mes "Party Name: "+ getpartyname(.@party_id); mes "Party Leader: "+strcharinfo(0); mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!"; close; } //NPC to duplicate setarray .@npc_name$,"Phreeoni Helper#DD", "InstanceSpawner#DD"; .@m$ = instance_mapname(instance_info(.@md_name$,IIT_ENTER_MAP), .@id); for ( .@i = 0; .@i < getarraysize(.@npc_name$); .@i++ ) { if (getmapxy(.@mapname$, .@mapx, .@mapy, BL_NPC, .@npc_name$[.@i]) == 0) { if (duplicate(.@npc_name$[.@i], .@m$, .@mapx, .@mapy) == "") debugmes "NPC: " + .@npc_name$[.@i] + " not found for duplication."; } } // Instance Controller NPC (Triggers OnInstanceInit) moc_fild17,37,289,0 script InstanceSpawner#DD 1001,10,10,{ end; OnInit: // Hide if outside instance — needed due to NoNpc: true if (countstr(strnpcinfo(4), "#") == 0) disablenpc; end; OnTouch: // Do nothing if outside instance — needed due to NoNpc: true if (countstr(strnpcinfo(4), "#") == 0) end; disablenpc; //disable itself so that it triggers only once // Broadcast to the instance map mapannounce strnpcinfo(4), "[System]: The monsters have arrived!", bc_map; // Spawn mobs in the instance monster strnpcinfo(4), 75, 265, "Phreeoni Minion", 1002, 10; monster strnpcinfo(4), 78, 268, "Phreeoni", 1159, 1; end; } // Instance-Only NPC (initially hidden) moc_fild17,42,292,0 script Phreeoni Helper#DD 100,{ mes "Hello!"; mes "Welcome to the Phreeoni Instance."; close; OnInit: // Hide if not inside instance — needed due to NoNpc: true if (countstr(strnpcinfo(4), "#") == 0) disablenpc; end; } NPCs created using the duplicate command will not trigger OnInstanceInit. It's recommended to use strnpcinfo(3) instead of instance_npcname, and strnpcinfo(4) instead of instance_mapname.
-
The main storage (ID 0) is the only one that's always loaded. Extra storages (IDs 1, 2, 3...) are only loaded when requested, and only one can be loaded at a time. When the code requests storage ID 2, it doesn't load fast enough, so the lines that add the item and close the storage are executed too early. That's why the storage remains open the first time. The same thing happens when the player opens another extra storage, since storage ID 2 gets switched to a different one.
-
The NPC shouldn't have a location. Find: prontera,155,177,5 script MVP_vs_MVP 100,{ And replace: - script MVP_vs_MVP 100,{
-
Hello, change storage to premiumStorage. You can try my changes. I can't test it with just the code provided. // @autostore [Cydh] if (autostoring && sd->state.autostore && !item->expire_time && !id->flag.autoequip && !sd->state.storage_flag && !sd->npc_id) { if ((!sd->autostore_weight || (sd->autostore_weight && get_percentage(sd->weight, sd->max_weight) >= sd->autostore_weight)) && ( (sd->autostore_type&1 && (id->type == IT_HEALING || id->type == IT_USABLE || id->type == IT_DELAYCONSUME || id->type == IT_CASH)) || (sd->autostore_type&2 && (id->type == IT_ARMOR || id->type == IT_WEAPON || id->type == IT_SHADOWGEAR || id->type == IT_PETEGG || id->type == IT_PETARMOR)) || (sd->autostore_type&4 && (id->type == IT_ETC || id->type == IT_AMMO || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2)) || (sd->autostore_type&8 && id->type == IT_CARD) ) ) { char output[CHAT_SIZE_MAX]; sd->weight += w; clif_updatestatus(*sd, SP_WEIGHT); int32 stor_id = 2; //Storage ID to autostore if (stor_id) storage_premiumStorage_load(sd, stor_id, STOR_MODE_PUT); if (sd->state.storage_flag == 3) { storage_storageadd(sd, &sd->premiumStorage, i, amount); storage_premiumStorage_close(sd); } else { storage_storageadd(sd, &sd->storage, i, amount); storage_storageclose(sd); clif_storageclose(*sd); } sprintf(output, "[ Autostore ] %dx %s", amount, id->ename.c_str()); clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], output, false, SELF); achievement_update_objective(sd, AG_GET_ITEM, 1, id->value_sell); return ADDITEM_SUCCESS; } }
-
The sql table is working fine for me. Does any error appear on the server console? Stat Points Doesnt clear out after rebirth only the allocated stats. Changed. In what line I can edit the reward for Grand Reset, all I can see was the reward for the Reset after they reach 150 reset. It's the same reward. Is it possible that after grand reset all of the "STAT POINTS" earned during Rebirth can be wiped and start as new rebirth. Added config for this. GM selection to clear out rankings for Rebirths and Grand Rebirths. Added character log in SQL should be per character not per account ( Ex: char1 have 5 rebirth char2 has 3 when you check in DB char1 has 8 Rebirths already ) tried this but still same Added config for this. Drop the old table. //===== rAthena Script ======================================= //= Rebirth System //===== Description: ========================================= //- Go back to Level 1 to gain bonus status points //===== Changelogs: ========================================== //= 1.0 First version. [Capuche] //= 1.6 Added Grand Rebirth. [Racaae] //============================================================ /* CREATE TABLE IF NOT EXISTS `rebirth_system` ( `player_id` int(11) unsigned NOT NULL default 0, `name` varchar(255) NOT NULL DEFAULT 'NULL', `num_rebirth` int(11) unsigned NOT NULL default 0, `num_grand` int(11) unsigned NOT NULL default 0, `last_ip` varchar(100) NOT NULL default '', PRIMARY KEY (`player_id`) ) ENGINE=MyISAM; */ prontera,141,179,5 script Rebirth System 531,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward //function weightreq; // check if your current weight is highter than weight high novice if (.grand_reset_max > -1 && num_grand_rebirth >= .grand_reset_max) { mes "You can only grand rebirth x"+ .grand_reset_max +"."; emotion e_gasp; } else { .@eac = eaclass(); if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) mes "You must be max level/max job level to rebirth."; else { if ( num_rebirth == .reset_max ) { mes "You have reached the maximum rebirth."; emotion e_gasp; .@s2$ = "^777777~ Grand Rebirth"; } else .@s1$ = "^777777~ Rebirth"; mes "Items need :"; displayItemneed(); } } next; switch( select( .@s1$, .@s2$, "^777777~ Informations", (.rebirth_ranking?"~ Rebirth ranking":""), (.grand_ranking?"~ Grand Rebirth ranking":""), "~ Good bye^000000", (getgroupid() < 90 ?"":"^FF0000[GM]^000000 Reset Rebirth Rankings") )) { case 1: checkItem(); deleteItem(); num_rebirth += 1; .@account_id = getcharid(3); if (.ranking_type) .@player_id = .@account_id; else .@player_id = getcharid(0); query_sql "insert into `rebirth_system` ( `player_id`, `name`, `num_rebirth`, `last_ip` ) select "+ .@player_id +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ .@account_id +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0; break; case 2: checkItem(); deleteItem(); getItemReward(); num_grand_rebirth += 1; num_rebirth = 0; .@account_id = getcharid(3); if (.ranking_type) .@player_id = .@account_id; else .@player_id = getcharid(0); query_sql "insert into `rebirth_system` ( `player_id`, `name`, `num_grand`, `last_ip` ) select "+ .@player_id + ", '" + escape_sql( strcharinfo(0) ) +"', '"+ num_grand_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ .@account_id +" on duplicate key update `rebirth_system`.`num_grand` = `rebirth_system`.`num_grand` +1, `rebirth_system`.`num_rebirth` = 0"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Grand Rebirth!", 0; specialeffect2 EF_GLOW4; break; case 3: do { switch(select("My status", "Rebirth", (.grand_reset_max!=0?"Grand Rebirth":""), "Cancel")) { case 1: if (num_grand_rebirth) mes "You performed Grand Rebirth ^ff0000x"+ num_grand_rebirth +"^000000."; if (num_rebirth) mes "You already rebirth ^ff0000x"+ num_rebirth +"^000000."; else if (num_grand_rebirth == 0) mes "You did not rebirth."; break; case 2: mes "Rebirthing can be done when one reaches the pinnacle, that is, maximum base and job level."; mes "It reverts your base level back to 1 and gives you ^ff0000"+ .num_status +" bonus status points^000000."; next; mes "Items required each time:"; displayItemneed(); mes "After ^ff0000"+ .change_reward +" rebirths^000000, more items are necessary."; next; if (.reset_job) mes "You will be back as a simple novice."; else mes "You will maintain your job class, job level and skills."; mes "One can only rebirth ^ff0000x"+ .reset_max +"^000000."; if (.grand_reset_max != 0) mes "When you reach the maximum you can perform the ^0000FFGrand Rebirth^000000."; break; case 3: mes "After rebirthing "+ .reset_max +" times you can merge all past rebirth into a powerful ^0000FFGrand Rebirth^000000 upon reaching max level!"; next; mes "The process will reward you with item:"; for (.@i = 0 ; .@i < .size_reward; .@i += 2 ) mes .reward[ .@i+1 ] + " " + mesitemlink(.reward[.@i]); mes "Also all bonus status points gained are forfeit since the rebirth count goes back to zero."; next; mes "Then you can repeat the process of Rebirths and ^0000FFGrand Rebirth^000000 for even more glory."; if (.grand_reset_max > 0) mes "^0000FFGrand Rebirth^000000 can be perfomed " + .grand_reset_max + " times."; else mes "There is no limit on how many ^0000FFGrand Rebirth^000000 can be perfomed."; break; case 4: mes F_Bye; close; } mes "What do you want to know about?"; next; } while (true); case 4: mes "TOP " + .rebirth_ranking + " of rebirth"; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` WHERE num_rebirth > 0 ORDER BY `num_rebirth` desc limit " + .rebirth_ranking, .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ F_GetNumSuffix( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; case 5: mes "TOP " + .grand_ranking + " of grand rebirth"; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_grand` from `rebirth_system` WHERE num_grand > 0 ORDER BY `num_grand` desc limit " + .grand_ranking, .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ F_GetNumSuffix( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; case 6: mes "Bye."; close; case 7: callsub S_GM; close; } if (.reset_job) { if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; } resetlvl 1; resetstatus; // Will reset the statpoints //StatusPoint = .default_statuspoints; StatusPoint += .num_status * num_rebirth; if (.grand_reset_points == false) StatusPoint += .num_status * (num_grand_rebirth * .reset_max); mes "Done!"; close2; sleep2 10000; removespecialeffect2 EF_GLOW4; end; S_GM: switch(select("Cancel", (.rebirth_ranking?"^FF0000Confirm Reset Rebirth Ranking!":""), (.grand_ranking?"^FF0000Confirm Reset Grand Rebirth Ranking!":""))) { case 1: close; case 2: query_sql "UPDATE rebirth_system SET num_rebirth = 0"; announce "[ Rebirth system ] : The Rebirth Ranking has been reset!", 0; break; case 3: query_sql "UPDATE rebirth_system SET num_grand = 0"; announce "[ Rebirth system ] : The Grand Rebirth Ranking has been reset!", 0; break; } query_sql "DELETE FROM rebirth_system WHERE num_rebirth = 0 AND num_grand = 0"; mes "Reset done."; close; function checkItem { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000"; close; } if ( num_rebirth >= .change_reward ) if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) { mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000"; close; } return; } function colorItemrequired { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000"; return "^00ff00"; } function deleteItem { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth ); if ( num_rebirth >= .change_reward ) delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward ); return; } function displayItemneed { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ (PACKETVER>=20230302?"^i["+ .item_req[.@i] + "]":"") + getitemname( .item_req[.@i] ); if ( num_rebirth >= .change_reward ) { if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) .@color$ = "^ff0000"; else .@color$ = "^00ff00"; mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ (PACKETVER>=20230302?"^i["+ .item_req[.@i] + "]":"") + getitemname( .add_item_req[0] ); } return; } function getItemReward { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; return; } function weightreq { if ( Weight > 50000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 10; // how many reset max .grand_reset_max = 100; // how many grand rebirth max (-1:unlimited) (0:disable) .change_reward = 6; // after the set rebirth, change reward .num_status = 10; // + X number of status points .reset_job = false; // character will go back to Novice? .rebirth_ranking = 0; // How many tops in normal rebirth ranking? (0=disable) .grand_ranking = 5; // How many tops in grand rebirhh ranking? (0=disable) .ranking_type = 0; // 0 = ranking by character. | 1 = ranking by account. .grand_reset_points = true; // Bonus status points will be back to 0 upon Grand Rebirth? .default_statuspoints = 48; // Default status points upon Lv1 in your server // item required <item ID>, <number> setarray .item_req, 7179, 50, 7227, 50, 969, 300; // additionnal items after rebirth >> .change_reward // <item ID>, <number> setarray .add_item_req, 7179, 100; // Grand Rebirth rewards <item ID>, <number> setarray .reward, 674, 50; .size_item = getarraysize( .item_req ); .size_reward = getarraysize( .reward ); query_sql("CREATE TABLE IF NOT EXISTS `rebirth_system` (" + " `player_id` int(11) unsigned NOT NULL default 0," + " `name` varchar(255) NOT NULL DEFAULT 'NULL'," + " `num_rebirth` int(11) unsigned NOT NULL default 0," + " `num_grand` int(11) unsigned NOT NULL default 0," + " `last_ip` varchar(100) NOT NULL default ''," + " PRIMARY KEY (`player_id`)" + " ) ENGINE=MyISAM;"); end; }
-
Hex edit: look for this 00 00 44 AC 00 00 and change it to 00 00 22 56 00 00
-
[Solved ] Q> Regarding Group ID Permission
Racaae replied to Sallycantdance's question in Source Support
Hello. Change trade_unconditional: true to trade_unconditional: false. You can learn more about the functions of each permission in: /doc/permissions.txt -
How to have custom option name for item_randomopt_db
Racaae replied to ahakiko's question in Source Support
Hi. Yes, it it possible to have custom name and id without adding custom one to the source. No, you can't use const.yml. Add the custom random options in \db\import\item_randomopt_db.yml. (The Id and Option values are unique and need to be the same in all 3 files.) Example: Body: - Id: 255 Option: VAR_SUPERAHAKIKO Script: | bonus bMaxHP,getrandomoptinfo(ROA_VALUE); - Id: 256 Option: VAR_HYPERCUSTOMEFFECT Script: | bonus bMaxSP,getrandomoptinfo(ROA_VALUE); Then save the file and use @reloaditemdb or restart the server. You have custom random options! Now to add names, inside the client folder/grf: open \data\LuaFiles514\Lua Files\Datainfo\enumvar.lub and add your custom options following the example: VAR_HEAL_PLUS = { 253, 254 }, VAR_CRITICAL_RATE = { 254, 253 }, VAR_SUPERAHAKIKO = { 255, 255 }, VAR_HYPERCUSTOMEFFECT = { 256, 256 }, EnumVAR_LAST = { 257, 0 } Then open \data\LuaFiles514\Lua Files\Datainfo\addrandomoptionnametable.lub and follow the example to add the ingame names. [EnumVAR.VAR_HEAL_PLUS[1]] = "H.PLUS + %d", [EnumVAR.VAR_CRITICAL_RATE[1]] = "C.RATE + %d", [EnumVAR.VAR_SUPERAHAKIKO[1]] = "All stats + %d", [EnumVAR.VAR_HYPERCUSTOMEFFECT[1]] = "All traits + %d", [EnumVAR.EnumVAR_LAST[1]] = "END" -
Hello. RecommendedQuestInfoList_True_EN is part of the old translation process. Current ROenglishRE project uses the renamed System folder (SystemEN). Avoid mixing components from the old and new. If you want to continue using RecommendedQuestInfoList_True_EN: Check your client folder/grf for the following files: /System/RecommendedQuestInfoList_True_EN.lub /System/OngoingQuestInfoList_True_EN.lub Did you find them in the correct folder? Are they decompiled? Are they in the language you want? Also, check: /data/luafiles514/lua files/datainfo/questinfo_f.lub Try opening this file. It should not contain the following lines — if it does, delete the file. dofile("SystemEN/OngoingQuests_C.lub") dofile("SystemEN/RecommendedQuests_C.lub")
-
Hello. Put this in \conf\import\battle_conf.txt. Then save the file and use @reloadbattleconf or restart the server. skill_trap_type: 1
-
getinventorycardid getinventoryrefinerycnt getinventoryidentify do not exist. Check getinventorylist for the correct usage. *getinventorylist {<char_id>}; This command sets a bunch of arrays with a complete list of whatever the invoking character has in their inventory, including all the data needed to recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_id[] - array of item ids. @inventorylist_idx[] - array of item inventory index. @inventorylist_amount[] - their corresponding item amounts. @inventorylist_equip[] - on which position the item is equipped (see EQP_* constants) It will contain 0 if the item is not equipped. @inventorylist_refine[] - for how much it is refined. @inventorylist_identify[] - whether it is identified. @inventorylist_attribute[] - whether it is broken. @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific craftsman. @inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires. @inventorylist_bound[] - the bound type of the items (see BOUND_* constants) @inventorylist_enchantgrade[] - the enchantgrade of the items @inventorylist_count - the number of items in these lists. @inventorylist_option_id1[] - first array of random option IDs @inventorylist_option_value1[] - first array of random option values @inventorylist_option_parameter1[] - first array of random option parameters @inventorylist_option_id2[] - second array of random option IDs @inventorylist_option_value2[] - second array of random option values @inventorylist_option_parameter2[] - second array of random option parameters @inventorylist_option_id3[] - third array of random option IDs @inventorylist_option_value3[] - third array of random option values @inventorylist_option_parameter3[] - third array of random option parameters @inventorylist_option_id4[] - fourth array of random option IDs @inventorylist_option_value4[] - fourth array of random option values @inventorylist_option_parameter4[] - fourth array of random option parameters @inventorylist_option_id5[] - fifth array of random option IDs @inventorylist_option_value5[] - fifth array of random option values @inventorylist_option_parameter5[] - fifth array of random option parameters @inventorylist_tradable - Returns if an item is tradable or not (Pass item_db.yml, bound, and rental restrictions). @inventorylist_favorite - Returns if an item is favorite or not I made an example for you: prontera,173,176,4 script CatalogoVendaTeste 4_M_FAIRYKID6,{ mes "Vai colocar qual item no catálogo de venda?"; next; getinventorylist; for(.@i = 0; .@i < @inventorylist_count; .@i++) { //ignorar items que não são equipamentos .@type = getiteminfo(@inventorylist_id[.@i], ITEMINFO_TYPE); if (.@type != IT_ARMOR && .@type != IT_WEAPON && .@type != IT_SHADOWGEAR) continue; //coloca o item no menu .@n$ = ""; .@item_id = @inventorylist_id[.@i]; .@item_ref = getarraysize(.@equipment_id_list); if (countinarray(.@equipment_id_list, .@item_id)) continue; .@equipment_id_list[.@item_ref] = @inventorylist_id[.@i]; if (@inventorylist_refine[.@i]) .@n$ += "+" + @inventorylist_refine[.@i] + " "; .@n$ += getitemname(@inventorylist_id[.@i]); if (getiteminfo(@inventorylist_id[.@i], ITEMINFO_SLOT)) .@n$ += " [" + getiteminfo(@inventorylist_id[.@i], ITEMINFO_SLOT) + "]"; .@menu_labels$[.@item_ref] = .@n$; } if (!.@equipment_id_list[0]) { mes "Você não tem nenhum equipamento no seu inventário."; close; } .@index = select(implode(.@menu_labels$, ":")) - 1; .@item = .@equipment_id_list[.@index]; mes "Você quer colocar " + getitemname(.@item) + " no catálogo?"; getinventorylist; .@i2 = inarray(@inventorylist_id, .@item); .@refine = @inventorylist_refine[.@i2]; .@card0 = @inventorylist_card1[.@i2]; .@card1 = @inventorylist_card2[.@i2]; .@card2 = @inventorylist_card3[.@i2]; .@card3 = @inventorylist_card4[.@i2]; .@grade = @inventorylist_enchantgrade[.@i2]; for(.@i = 0; .@i < (MAX_ITEM_RDM_OPT); .@i++) { .@r_id[.@i] = getd("@inventorylist_option_id" + (.@i + 1) + "[" + .@i2 + "]"); .@r_v[.@i] = getd("@inventorylist_option_value" + (.@i + 1) + "[" + .@i2 + "]"); .@r_p[.@i] = getd("@inventorylist_option_parameter" + (.@i + 1) + "[" + .@i2 + "]"); } mes "Salvei as informaçoes do item:"; mes "refino: +" + .@refine; mes "slot 1: " + (.@card0>0?getitemname(.@card0):"vazio"); mes "slot 2: " + (.@card1>0?getitemname(.@card1):"vazio"); mes "slot 3: " + (.@card2>0?getitemname(.@card2):"vazio"); mes "slot 4: " + (.@card3>0?getitemname(.@card3):"vazio"); setarray .@grade_names$,"Sem grade","[D]","[C]","[B]","[A]"; mes "Grade: " + .@grade_names$[.@grade]; next; mes "Use getitem4 para dar uma cópia exata para o comprador."; //Devolve o item ao comprador com os dados completos getitem4 .@item, 1, 1, .@refine, 0, .@card0, .@card1, .@card2, .@card3, .@grade, .@r_id, .@r_v, .@r_p; end; }
-
Npc value in import\castle_db.yml is mandatory. You can put any name. Map: job3_arch01 Name: Emperium Test Room Npc: Emperium Breaker Save the file and restart the map-server.
-
Issue with query_sql: SELECT id fails, but SELECT COUNT(*) works on the same table
Racaae replied to Gabsu's question in Scripting Support
Hey. I can't reproduce this error, it's working fine here. If you made any changes to the script, could you share it? What is the message displayed in the map-server console? -
How to change the cast of agi up to be like blessing/angelus?
Racaae replied to skitsx's question in Source Support
Hi. Find this line in \src\map\skill.cpp and cut it (around line 8197): case AL_INCAGI: Then find the following line in \src\map\skill.cpp and paste that line (around line 9233): case CASH_ASSUMPTIO: > case CASH_ASSUMPTIO: case AL_INCAGI: Add the following in \db\import\skill_db.yml: Body: - Id: 29 Description: Increase AGI TargetType: Self DamageFlags: Splash: true SplashArea: -1 Save the files and recompile your server. -
Requesting a script for assassin job only can enter inside the pvp room
Racaae replied to Astro Young's question in Scripting Support
prt_ext,165,138,5 script PvP Arena 574,{ if(agitcheck()) goto nowoetime; mes "[PvP Battle Room]"; mes "Let's Go!!!!!"; menu "No limit [" + getmapusers("guild_vs3") + "]",pvp1, "Non Donate [" + getmapusers("guild_vs4") + "]",spvp, "Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1, "Sinx [" + getmapusers("guild_vs1") + "]",sinx; nowoetime: mes "[PvP Battle Room]"; mes "You cannot enter to PvP Room during WoE!"; close; pvp1: warp "guild_vs3",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; close; gvg1: warp "guild_vs2",0,0; announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; close; spvp: if(countitem(59138) > 0 || countitem(59139) > 0 || countitem(59140) > 0 || countitem(59141) > 0 || countitem(59142) > 0 || countitem(59143) > 0 || countitem(59144) > 0 || countitem(59145) > 0 || countitem(59146) > 0 || countitem(59147) > 0 || countitem(59148) > 0 || countitem(59149) > 0 || countitem(59155) > 0 || countitem(59150) > 0 || countitem(59151) > 0 || countitem(59152) > 0 || countitem(59153) > 0 || countitem(59154) > 0 //donate weapon || countitem(59000) > 0 || countitem(59001) > 0 || countitem(59002) > 0 || countitem(59003) > 0 || countitem(59004) > 0 || countitem(59005) > 0 || countitem(59006) > 0 || countitem(59007) > 0 || countitem(59008) > 0 || countitem(59009) > 0 || countitem(59010) > 0 || countitem(59011) > 0 || countitem(59012) > 0 || countitem(59013) > 0 || countitem(59014) > 0 //Pointers || countitem(501) > 0) goto donator; warp "guild_vs4",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; close; donator: mes "You are a donator you are not allowed to this room"; close; sinx: //Put the Custom Items IDs here setarray .@sinx_CustomItems,59000,59001,59002,59003,59004,59005,59006,59007, 59008,59009,59010,59011,59012,59013,59014,59138,59139,59140, 59141,59142,59143,59144,59145,59146,59147,59148,59149,59150, 59151,59152,59153,59154,59155; clear; mes "[PvP Battle Room]"; mes "This room is for ^0000FFAssassin job only^000000."; if (BaseJob != Job_Assassin) close; switch(select("Enter", "Restricted items list", "Cancel")) { case 1: break; case 2: clear; mes "[PvP Battle Room]"; mes "You can't use the following inside:"; for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) mes "" + getitemname(.@sinx_CustomItems[.@i]); close; case 3: close; } for (.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) { if (countitem(.@sinx_CustomItems[.@i])) .@has_forbidden[.@count++] =.@sinx_CustomItems[.@i]; } if (.@has_forbidden[0]) { clear; mes "[PvP Battle Room]"; mes "You can't enter the room with the following items in your inventory:"; for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++) mes "" + getitemname(.@has_forbidden[.@i]); close; } announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; warp "guild_vs1",0,0; end; //OnPCDieEvent: // set @Die,@Die + 1; // if( @Die % 2 == 0 ) warp "SavePoint",0,0; // end; } -
Requesting a script for assassin job only can enter inside the pvp room
Racaae replied to Astro Young's question in Scripting Support
That's your request, right? "only custom item will allowed to use inside the sinx pvp room". Is it allow custom items and block everything else or block custom items and allow everything else? -
Requesting a script for assassin job only can enter inside the pvp room
Racaae replied to Astro Young's question in Scripting Support
Your rAthena is outdated. You can update it or use this version below: prt_ext,165,138,5 script PvP Arena 574,{ if(agitcheck()) goto nowoetime; mes "[PvP Battle Room]"; mes "Let's Go!!!!!"; menu "No limit [" + getmapusers("guild_vs3") + "]",pvp1, "Non Donate [" + getmapusers("guild_vs4") + "]",spvp, "Guild vs Guild [" + getmapusers("guild_vs2") + "]",gvg1, "Sinx [" + getmapusers("guild_vs1") + "]",sinx; nowoetime: mes "[PvP Battle Room]"; mes "You cannot enter to PvP Room during WoE!"; close; pvp1: warp "guild_vs3",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room.",bc_all; close; gvg1: warp "guild_vs2",0,0; announce ""+ strcharinfo(0) +" Has Entered The GVG Room.",bc_all; close; spvp: if(countitem(59138) > 0 || countitem(59139) > 0 || countitem(59140) > 0 || countitem(59141) > 0 || countitem(59142) > 0 || countitem(59143) > 0 || countitem(59144) > 0 || countitem(59145) > 0 || countitem(59146) > 0 || countitem(59147) > 0 || countitem(59148) > 0 || countitem(59149) > 0 || countitem(59155) > 0 || countitem(59150) > 0 || countitem(59151) > 0 || countitem(59152) > 0 || countitem(59153) > 0 || countitem(59154) > 0 //donate weapon || countitem(59000) > 0 || countitem(59001) > 0 || countitem(59002) > 0 || countitem(59003) > 0 || countitem(59004) > 0 || countitem(59005) > 0 || countitem(59006) > 0 || countitem(59007) > 0 || countitem(59008) > 0 || countitem(59009) > 0 || countitem(59010) > 0 || countitem(59011) > 0 || countitem(59012) > 0 || countitem(59013) > 0 || countitem(59014) > 0 //Pointers || countitem(501) > 0) goto donator; warp "guild_vs4",0,0; announce ""+ strcharinfo(0) +" Has Entered The PVP Room Non Donate.",bc_all; close; donator: mes "You are a donator you are not allowed to this room"; close; sinx: //Put the Custom Items IDs here setarray .@sinx_CustomItems,2538,2435,2378,2721,13036,13411,1279,13037,13410,1280,2772,2773,2774,1281,1282; clear; mes "[PvP Battle Room]"; mes "This room is for ^0000FFAssassin job only^000000."; if (BaseJob != Job_Assassin) close; switch(select("Enter", "Allowed items list", "Cancel")) { case 1: break; case 2: clear; mes "[PvP Battle Room]"; mes "You can use only the following inside:"; for(.@i = 0; .@i < getarraysize(.@sinx_CustomItems); .@i++) mes "" + getitemname(.@sinx_CustomItems[.@i]); close; case 3: close; } getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) { .@item_id = @inventorylist_id[.@i]; if (getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_ARMOR && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_WEAPON && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_SHADOWGEAR) continue; if (inarray(.@sinx_CustomItems, .@item_id) > -1 || inarray(.@has_forbidden, .@item_id) > -1) continue; .@has_forbidden[.@count++] = .@item_id; } if (.@has_forbidden[0]) { clear; mes "[PvP Battle Room]"; mes "You have forbidden items in your inventory. Store or put them away before entering:"; for(.@i = 0; .@i < getarraysize(.@has_forbidden); .@i++) mes "" + getitemname(.@has_forbidden[.@i]); close; } announce strcharinfo(0) +" has entered the PVP Room Sinx.",bc_all; warp "guild_vs1",0,0; end; //OnPCDieEvent: // set @Die,@Die + 1; // if( @Die % 2 == 0 ) warp "SavePoint",0,0; // end; } -
help NPC invoking an MVP with modified stats via setunitdata
Racaae replied to deafity's question in Scripting Support
Hello, getmonsterinfo will return "null" if you requested a invalid monster's name. getmonsterinfo(.@mvp_id, MOB_NAME) == "null" monster sets an array with the game ID of the spawned monster(s). Array is stored in $@mobid[]. .@mob_gid = $@mobid[0]; setunitdata monster parameters are UMOB_. setunitdata(.@mob_gid, UMOB_HP, 20000000); setunitdata(.@mob_gid, UMOB_MAXHP, 20000000); setunitdata(.@mob_gid, UMOB_ATKMIN, 10000); setunitdata(.@mob_gid, UMOB_ATKMAX, 15000); setunitdata(.@mob_gid, UMOB_DEF, 200); setunitdata(.@mob_gid, UMOB_MDEF, 200); setunitdata(.@mob_gid, UMOB_AGI, 150); setunitdata(.@mob_gid, UMOB_STR, 200); setunitdata(.@mob_gid, UMOB_VIT, 200); setunitdata(.@mob_gid, UMOB_INT, 150); setunitdata(.@mob_gid, UMOB_HIT, 600); setunitdata(.@mob_gid, UMOB_FLEE, 500); Parameters (indexes) for monsters Use sleep2 instead of sleep. sleep will not keep the rid (to display the mes text), while sleep2 does. -
Requesting a script for assassin job only can enter inside the pvp room
Racaae replied to Astro Young's question in Scripting Support
Hi -
Need help with storing the skill info of player
Racaae replied to Some0ne's question in Scripting Support
Hello, the data is stored on sql database table skill. You can use script command getskilllist. /doc/script_commands.txt#L3662 *getskilllist({<char_id>}); This command sets a bunch of arrays with a complete list of skills the invoking character has. Here's what you get: @skilllist_id[] - skill ids. @skilllist_lv[] - skill levels. @skilllist_flag[] - see 'skill' for the meaning of skill flags. @skilllist_count - number of skills in the above arrays. -
Hi //===== rAthena Script ======================================= //= World Boss Apparition //===== By: ================================================== //= Alayne //===== Current Version: ===================================== //= 1.0 First version. //= 2.0 Updated. [Racaae] //============================================================ - script WorldBoss::alawboss -1,{ OnInit: //===== CONF .rewardMode = 2; // 1:inventory - 2:mailed - 3:drop on floor // Rewards // setarray .reward_id[0], <itemID>{,<itemID>,...} // setarray .reward_amount[0], <amount>{,<amount>,...} setarray .reward_id[0],969; setarray .reward_amount[0],1; .special_reward_id = 607; //item id for person who gave the final blow .special_reward_amount = 3; //amount for person who gave the final blow .reward_zeny = 0; // Zeny reward .rewardCount = -1; //How many items to drop on floor? (rewardMode:3 Only) .ip_check = true; //No rewards for double login set .bossAliveDuration, 30; //in minutes setarray .rebirthXY[0],120,202,202,120,119,37,37,119; //X, then Y. Only used if only one map is used set $lastPopMap$, ""; set $wordBossPop, 0; setarray .wbMap$[0], "prontera"; setarray .wbMapName$[0], "Prontera"; setarray .wBossIds[0], 2320,2483,1917,2942,2131; setarray .wBossHp[0], 20000000,30000000,40000000,50000000,60000000; //Storm Gust, Meteor Storm, Lord of Vermillion, Bowling Bash, Kyrie Eleison setarray .wbSummonSkillId[0], 89, 83, 85, 62, 73; setarray .wBossName$[0], "Hoktarrh","Giashim","Deathres","Cerbere","Citrak"; setarray .wbSlaveMobsId[0], 1098, 2023, 2365, 2019, 2472; setarray .wbSlaveMobsCount[0], 25, 15, 10, 15, 5; setarray .deadMonstersId[0], 1865, 2603, 1870, 2473, 2474, 2283; //===== CONF END set .timerCount, 0; .reward_id_size = getarraysize(.reward_id); bindatcmd "worldboss", strnpcinfo(3) + "::OnStartWBoss",90,90; end; OnStartWBoss: .@force = 1; OnMinute30: OnStarted: if($WorldBoss_cd <= gettimetick(2) || .@force) { set .@chosenMap$, "[ "; set .@spawnRand, rand(0, getarraysize(.wbMap$)-1); set .lastRandId, rand(0, getarraysize(.wBossIds) - 1); //RATHENA monster .wbMap$[.@spawnRand],82,55,.wBossName$[.lastRandId],.wBossIds[.lastRandId],1,strnpcinfo(3) + "::OnWorldBossDied",2; set .wBossId, $@mobId[0]; setunitdata .wBossId, UMOB_MAXHP, .wBossHp[.@spawnRand]; set .@chosenMap$, .@chosenMap$ + .wbMapName$[.@spawnRand] + "]"; announce "[ System ] World Boss appeared in " + .@chosenMap$ + " !",bc_all,0xFF0000; set $WorldBoss_cd, gettimetick(2) + 21600; //next pop in 3 days, 60 for debug (1 min) - 21600 6hours set $lastPopMap$, .wbMap$[.@spawnRand]; set $lastPopIdRank, .@spawnRand; deletearray $wbFighters[0], getarraysize($wbFighters); set $wordBossPop, 1; set .deadCount, 0; set .timerCount, 0; initnpctimer; donpcevent "World Boss#wb_board::OnEvent"; } else { if(.debug == 1) { debugmes "Not ready yet."; } } end; OnTimer1000: .timerCount += 1; freeloop(1); if(.timerCount == .bossAliveDuration * 60) { stopnpctimer; killmonster $lastPopMap$, strnpcinfo(3) + "::OnWorldBossDied"; killmonster $lastPopMap$, strnpcinfo(3) + "::OnSaveDied"; killmonster $lastPopMap$, strnpcinfo(3) + "::OnCloneDied"; killmonster $lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied"; set $wordBossPop, 0; announce "[ System ] World Boss vanished without being killed...",bc_all,0x00FF00; } set .@cellRange, 25; switch(.timerCount) { case 60: //1 min mapannounce $lastPopMap$, "[ World Boss ] Raise! Raise, my army!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { for(set .@j,0; .@j<.wbSlaveMobsCount[.@i]; set .@j,.@j+1) { areamonster $lastPopMap$, .@x - .@cellRange, .@y - .@cellRange, .@x + .@cellRange, .@y + .@cellRange, "Slaves", .wbSlaveMobsId[.@i], 1, strnpcinfo(3) + "::OnSaveDied"; } } break; case 120: //2 min, all summon cast skills mapannounce $lastPopMap$, "[ World Boss ] You are all far beyond my control!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], .wbSummonSkillId[.lastRandId], 5, 3000,1,ET_KIK,3; } break; case 180: //3 min, pop 15 reduced clone of the mob mapannounce $lastPopMap$, "[ World Boss ] You won't go away with this, humans!", bc_map, 0xFF0000; monster $lastPopMap$,0,0,.wBossName$[.lastRandId],.wBossIds[.lastRandId],15,strnpcinfo(3) + "::OnReducedBossDied"; copyarray .@tempMobId[0], $@mobId[0], 15; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@hp, .@worldBossData[UMOB_HP]; set .@tempHp, .@hp / 15; for(set .@i,0; .@i<getarraysize(.@tempMobId); set .@i,.@i+1) { //RATHENA setunitdata .@tempMobId[.@i], UMOB_MAXHP, .@tempHp; setunitdata .@tempMobId[.@i], UMOB_HP, .@tempHp; } break; case 240: //4 min, raise dead bodies mapannounce $lastPopMap$, "[ World Boss ] Even the deads are on my side! You can't win!", bc_map, 0xFF0000; set .@deadSplit, .deadCount / getarraysize(.deadMonstersId); if(.@deadSplit <= 0) { set .@deadSplit, 2; } //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.deadMonstersId); set .@i,.@i+1) { areamonster $lastPopMap$, .@x - .@cellRange, .@y - .@cellRange, .@x + .@cellRange, .@y + .@cellRange, "Dead Corpses", .deadMonstersId[.@i], .@deadSplit, strnpcinfo(3) + "::OnSaveDied"; } break; case 300: //5 min, pop clone of each player mapannounce $lastPopMap$, "[ World Boss ] Fight against your own power you're so proud of, shall you?!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize($wbFighters); set .@i,.@i+1) { if(attachrid($wbFighters[.@i]) == 1 && strcharinfo(3) == $lastPopMap$) { clone $lastPopMap$, rand(.@x - .@cellRange, .@x + .@cellRange), rand(.@y - .@cellRange, .@y + .@cellRange), strnpcinfo(3) + "::OnCloneDied", getcharid(0); } else { deletearray $wbFighters[.@i], 1; } } break; case 360: //6 min mapannounce $lastPopMap$, "[ World Boss ] Raise! Raise, my army!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { for(set .@j,0; .@j<.wbSlaveMobsCount[.@i]; set .@j,.@j+1) { areamonster $lastPopMap$, .@x - .@cellRange * 2, .@y - .@cellRange * 2, .@x + .@cellRange * 2, .@y + .@cellRange * 2, "Slaves", .wbSlaveMobsId[.@i], 1, strnpcinfo(3) + "::OnSaveDied"; } } break; case 420: //7 min, autocast earthquake at 10% hp cost mapannounce $lastPopMap$, "[ World Boss ] STOP BOTHERING ME, HUMANS!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@hp, .@worldBossData[UMOB_HP]; set .@mhp, .@worldBossData[UMOB_MAXHP]; set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; if(.@hp > 10 * .@mhp / 100) { //RATHENA setunitdata .wBossId, UMOB_HP, .@hp - 10 * .@mhp / 100; set .@id, .wbSlaveMobsId[rand(getarraysize(.wbSlaveMobsId) - 1)]; areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .@id, 653, 3, 3000, 1, ET_KIK, 3; } else { //only world boss pop, but stronger areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wBossIds[$lastPopIdRank], 653, 10, 3000, 1, ET_KIK, 3; } break; case 480: //8 min, wide bleeding mapannounce $lastPopMap$, "[ World Boss ] You don't even deserve me to fight you!", bc_map, 0xFF0000; areamobuseskill $lastPopMap$, .@x, .@y, 50, .wBossIds[$lastPopIdRank], 665, 5, 3000, 1, ET_KIK, 3; break; case 540: //9 min, random kill over fighters mapannounce $lastPopMap$, "[ World Boss ] Feel my rage! Limitless is my power!!", bc_map, 0xFF0000; set .@killCount, rand(getarraysize($wbFighters)); for(set .@i,0; .@i<getarraysize($wbFighters); set .@i,.@i+1) { if(attachrid($wbFighters[.@i]) == 1 && strcharinfo(3) == $lastPopMap$) { charcommand "#nuke " + strcharinfo(0) + " " + strcharinfo(0); } else { deletearray $wbFighters[.@i], 1; } } break; case 600: //10 min, raise life according to alive clones mapannounce $lastPopMap$, "[ World Boss ] I'll feast from your bones!!", bc_map, 0xFF0000; set .@mobCount, mobcount($lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied"); killmonster $lastPopMap$, strnpcinfo(3) + "::OnReducedBossDied"; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@hp, .@worldBossData[UMOB_HP]; set .@mhp, .@worldBossData[UMOB_MAXHP]; if( .@hp + .@mobCount * 50000 > .@mhp ) setunitdata .wBossId, UMOB_HP, .@mhp; else setunitdata .wBossId, UMOB_HP, .@hp + .@mobCount * 50000; break; case 660: //11 min, slave skill area mapannounce $lastPopMap$, "[ World Boss ] Life and death are nothing to me!", bc_map, 0xFF0000; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; for(set .@i,0; .@i<getarraysize(.wbSlaveMobsId); set .@i,.@i+1) { //BASILICA 362 (5) OR EVILLAND 670 (1) if(rand(1) == 0) { areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], 362, 5, 3000,1,ET_KIK,3; } else { areamobuseskill $lastPopMap$, .@x, .@y, .@cellRange * 2, .wbSlaveMobsId[.@i], 670, 1, 3000,1,ET_KIK,3; } } break; } setnpctimer 0; freeloop(0); end; OnPCDieEvent: if(strcharinfo(3) == $lastPopMap$ && getarraysize(.wbMap$) == 1) { set .@rebirthArea, rand(4); warp $lastPopMap$, .rebirthXY[.@rebirthArea * 2], .rebirthXY[.@rebirthArea * 2 + 1]; charcommand "#alive " + strcharinfo(0); } addtimer 10000, strnpcinfo(3) + "::OnPopClone"; set .deadCount, .deadCount + 1; end; OnPopClone: if(Hp > 0) { set .@cellRange, 25; //RATHENA getunitdata(.wBossId, .@worldBossData); set .@x, .@worldBossData[UMOB_X]; set .@y, .@worldBossData[UMOB_Y]; clone $lastPopMap$, rand(.@x - .@cellRange, .@x + .@cellRange), rand(.@y - .@cellRange, .@y + .@cellRange), strnpcinfo(3) + "::OnCloneDied", getcharid(0); } end; OnSaveDied: OnCloneDied: OnReducedBossDied: //nothing, used to clean end; OnWorldBossDied: stopnpctimer; set $wordBossPop, 0; donpcevent "World Boss#wb_board::OnEvent"; killmonster $lastPopMap$, "All"; announce "[ System ] "+strcharinfo(0)+" gave the final blow to the World Boss !",bc_all,0x0000FF; if (.special_reward_id && .special_reward_amount) getitem .special_reward_id, .special_reward_amount; callsub OnReward; end; OnReward: if (!.reward_id_size && !.reward_zeny) return; if (.rewardMode == 3) { if (.rewardCount == -1) { set .rewardCount, getmapusers($lastPopMap$); } for (set .@i,0; .@i < .rewardCount; set .@i,.@i+1) { set .@rand, rand(getarraysize(.@reward_id)); //edit 150 if the map length and height is different of 150 cell makeitem .reward_id[.@rand],.reward_amount[.@rand],$lastPopMap$,rand(150),rand(150); } return; } if (.rewardMode) .@str$ = gettimestr("%B %d, %Y",21); freeloop(1); .@size = getmapunits(BL_PC,$lastPopMap$,.@aid[0]); if (.ip_check) { for ( .@j = 0; .@j < .@size; ++.@j ) { // .@ip$ = replacestr(getcharip(.@aid[.@j]),".",""); .@ip$ = getcharip(.@aid[.@j]); .@duplicate = inarray(.@iplist$, .@ip$); if (.@duplicate < 0) .@iplist$[.@iplistcount++] = .@ip$; else { message rid2name(.@aid[.@j]), "Another character with the same IP address has received the World Boss reward."; deletearray .@aid[.@j],1; .@j--; } } .@size = getarraysize(.@aid[0]); } for (.@j = 0; .@j < .@size; .@j++) { if (.rewardMode == 2) { .@charid = convertpcinfo(.@aid[.@j],CPC_CHAR); .@sender$ = "Rune-Midgarts Kingdom"; .@title$ = "World Boss Reward"; .@body$ = "Congratulations on defeating the World Boss!\r\n "+.@str$+".\r\n \r\n \r\n \r\n \r\n [ Your reward is attached. ]"; if (.reward_id_size) mail .@charid, .@sender$, .@title$, .@body$, .reward_zeny, .reward_id, .reward_amount; else mail .@charid, .@sender$, .@title$, .@body$, .reward_zeny; if (PACKETVER < 20150513 && !getd(".@str_"+.@cid[.@j]) && .@online) { setd ".@str_"+.@cid[.@j],1; message rid2name(.@aid[.@j]),"You've got mail!"; } } else { attachrid( .@aid[.@j], true ); .@name$ = strcharinfo( 0 ); for ( .@k = 0; .@k < .reward_id_size; .@k++ ) { if (checkweight(.reward_id[.@k], .reward_amount[.@k])) getitem .reward_id[.@k], .reward_amount[.@k]; else dispbottom "You can't receive x" + .reward_amount[.@k] + " " + getitemname(.reward_id[.@k]) + " for defeating the World Boss because you're overweight."; } Zeny += .reward_zeny; dispbottom "You have been rewarded for defeating the World Boss."; } } return; } prontera,144,198,4 script World Boss#wb_board 2_BOARD1,{ mes "[World Boss]"; if ($wordBossPop == 1) { mes "Hurry up, " + strcharinfo(0) + "."; mes "A World Boss threat has been raised, a few ago!"; mes "We need all fighters to join!"; if(select("Send me there","No way, I'm not going") == 1) { next; mes "[World Boss Area]"; mes "Right, get ready."; set $wbFighters[getarraysize($wbFighters)], getcharid(3); warp $lastPopMap$, 0, 0; } else { next; mes "[World Boss Area]"; mes "What are you? A coward?"; mes "You'll be blessed when we all be dead..."; } } else { mes "I'm the one you should come to visit when a World Boss will appear."; mes "And believe, it will."; mes "Those monsters are regular, in some kind."; mes "Al mortal, giant...And ridiculously strong..."; } close; OnInit: OnTimer60000: OnEvent: stopnpctimer; initnpctimer; delwaitingroom; if ($wordBossPop) { waitingroom "World Boss Alive",0; end; } .@time = ($WorldBoss_cd - gettimetick(2)); if (.@time < 1) { donpcevent "alawboss::OnStarted"; end; } .@remaining_d = .@time / 86400; .@remaining_h = (.@time % 86400) / 3600; .@remaining_m = (.@time % 3600) / 60; .@remaining_s = .@time % 60; if (.@remaining_d) .@s$[.@i++] = .@remaining_d + " day" + (.@remaining_d>1?"s":""); if (.@remaining_h) .@s$[.@i++] = .@remaining_h + " hour" + (.@remaining_h>1?"s":""); if (.@remaining_m) .@s$[.@i++] = .@remaining_m + " minute" + (.@remaining_m>1?"s":""); if (!.@remaining_d && !.@remaining_h && !.@remaining_m) .@s$[.@i++] = .@remaining_s + " second" + (.@remaining_s>1?"s":""); waitingroom implode(.@s$," "),0; end; }
-
The commands/functions getunitdmginfo and mobcountunitdmg are custom. These commands are not part of the default scripting commands, you need to add (or remove) them so the script can work.