

Racaae
-
Posts
212 -
Joined
-
Last visited
-
Days Won
31
Community Answers
-
Racaae's post in Looking for this Monster/NPC Sprite file was marked as the answer
sprite 20995 DEADSOUL.rar
-
Racaae's post in need help random option NPC by sader1992 was marked as the answer
OP shared solution on the script topic:
-
Racaae's post in Regarding the Chat/PUB Room, I don’t really know what its function is. was marked as the answer
Try chatID.
if( sd->chatID )
-
Racaae's post in Lucky Pick Event was marked as the answer
Hi. You can use INNER JOIN in the sql query to make the event check for your event_pick database. Example:
.@sql$ = "SELECT `char`.`char_id`, `name`" + " FROM `char`" + " INNER JOIN `event_pick`" + " ON `char`.`char_id` = `event_pick`.`char_id`" + " WHERE `char`.`online` = 1" + " AND `event_pick`.`qualified` = 1" + " ORDER BY RAND()"; query_sql .@sql$, .@cid, .@name$; (Multiple lines not necessary. It's just for better readability.)
byako,83,154,4 script Who's Online Event 99,{ mes "[Who's Online Event]"; if (getgroupid() < 99) { mes "Greetings! I see you're curious about our ^0000FFWho's Online Event^000000. Allow me to explain how it works."; next; mes "[Who's Online Event]"; mes "Every three hours I will select " + .winners + " random adventurers in the cities of Midgard to receive " + .prize_amt + " " + mesitemlink(.prize_id) + ". Only VIPs are eligible for the event."; close; } else { mes "Enable event?"; if (.winners_date$ != "") { mes " ", "^EE8800Winners " + .winners_date$ + "^000000"; for (.@i = 0; .@i < getarraysize(.winners_cid); .@i++) mes "- ^0000FF" + .winners_name$[.@i] + "^000000"; } if (select("Yes", "No") == 1) { mes "Event started."; donpcevent strnpcinfo(3) + "::OnStart"; } } close; OnHour00: OnHour03: OnHour06: OnHour09: OnHour12: OnHour15: OnHour18: OnHour21: OnStart: .winners_date$ = ""; deletearray .winners_cid[0]; deletearray .winners_name$[0]; .@sql$ = "SELECT `char`.`char_id`, `name`" + " FROM `char`" + " INNER JOIN `event_pick`" + " ON `char`.`char_id` = `event_pick`.`char_id`" + " WHERE `char`.`online` = 1" + " AND `event_pick`.`qualified` = 1" + " ORDER BY RAND()"; query_sql .@sql$, .@cid, .@name$; for (.@i = 0; .@i < getarraysize(.@cid); .@i++) { if (!checkvending(.@name$[.@i]) && getgroupid(.@cid[.@i]) >= 2 && inarray(.map$, strcharinfo(3,.@cid[.@i])) > -1) { setarray .winners_cid[.@i2], .@cid[.@i]; setarray .winners_name$[.@i2], .@name$[.@i]; .@i2++; if (getarraysize(.winners_cid) >= .winners) break; } } .winners_date$ = gettimestr("%Y/%m/%d %H:%M",21); if (getarraysize(.winners_cid) == 0) { announce "There were no eligible adventurers for the Exiled Lucky Pick.", bc_all, 0x00FF00; end; } .@size = getarraysize(.winners_cid); for (.@i = 0; .@i < .@size; .@i++) { .@text$ += .winners_name$[.@i]; if (.@size > 1) { if ((.@i + 2) == .@size) .@text$ += " and "; else if ((.@i + 1) < .@size) .@text$ += ", "; } getitem .prize_id, .prize_amt, convertpcinfo(.winners_cid[.@i],CPC_ACCOUNT); dispbottom "You won " + .prize_amt + " " + itemlink(.prize_id) + " in Exiled Lucky Pick!", 0x000000, .winners_cid[.@i]; } announce .@text$ + " won " + .prize_amt + " " + itemlink(.prize_id) + " in Exiled Lucky Pick!", bc_all, 0x00FF00; end; OnInit: setarray .map$, "prontera", "izlude", "payon"; .prize_id = 50043; //50043 .prize_amt = 1; .winners = 5; end; }
-
Racaae's post in [Error]: npc_parsesrcfile: Unknown syntax in file was marked as the answer
Good evening, use TAB instead of SPACE in NPC headers. Also please use english in this forum section. There's a portuguese section available.
PT:
-
Racaae's post in Changing weapons and not removing the enchantment was marked as the answer
Hi. Add this in \db\import\status.yml. Then save and use @reloadstatusdb or restart the server.
# Remove the first line if your file already has Body: Body: - Status: Encpoison Flags: RemoveOnUnequipWeapon: false - Status: Aspersio Flags: RemoveOnUnequipWeapon: false - Status: Fireweapon Flags: RemoveOnUnequipWeapon: false - Status: Waterweapon Flags: RemoveOnUnequipWeapon: false - Status: Windweapon Flags: RemoveOnUnequipWeapon: false - Status: Earthweapon Flags: RemoveOnUnequipWeapon: false - Status: Enchantarms Flags: RemoveOnUnequipWeapon: false
-
Racaae's post in Need help script summon monster [SOLVED] was marked as the answer
Hello
//===== rAthena Script ======================================= //= https://rathena.org/board/topic/142407-need-help-script-summon-monster/ //= Modified from AnnieRuru's Private MVP & Branch Room //============================================================ askald,166,237,1 script The Dimensions Tournament 110,{ set .@npc$,"^F904EA[ Human King ]^000000"; switch( select( "I would like more information", "Let's go" ) ) { case 1: mes .@npc$; mes "In a remote corner of the world of Midgard, a mysterious rift has opened, connecting our world to another dimension populated by fearsome human warriors."; next; mes .@npc$; mes "These warriors, coming from a parallel universe called ^FF7700Terra Nova^000000, have skills and powers different from those known in Midgard. "; next; mes .@npc$; mes "Their abilities often surpass those of our world's greatest heroes. An ancient prophecy says that these interdimensional warriors would be drawn to tournaments of strength and honor."; next; mes .@npc$; mes "So the king of Prontera, eager to test the bravery and skill of the adventurers of Midgard, organized a great tournament called The ^FF0000Tournament of Dimensions^000000."; next; mes .@npc$; mes "Each of these warriors has a unique strength and ability that makes them formidable. However, each victory against one of these fighters guarantees the winning hero a reward of"; next; mes .@npc$; mes "Registration for the tournament is open to all adventurers brave enough to challenge these fighters from another world."; next; mes .@npc$; mes "Rumors have it that the ultimate winner will receive not only a vast fortune in zeny, but also an artifact from Terra Nova, an item of immeasurable power capable of changing the course of Midgard's history."; close; case 2: mes .@npc$; if (.warped) { mes "I already sent a hero through the rift."; mes "We need to wait for their return so I can send someone else."; close; } mes "I'm counting on you !"; close2; warp "cell_game",150,143; .warped = true; initnpctimer; end; } end; OnTimer30000: stopnpctimer; if (getmapusers("cell_game")) initnpctimer; else .warped = false; end; } cell_game,155,150,5 script Human King? 110,{ if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) { npctalk strnpcinfo(1) + " : Defeat the Warrior!"; end; } mes "^808080[ Human King? ]^000000"; mes "You are here, finally!"; next; switch ( select( "Tournament of Dimensions", "Return to our world") ) { case 1: if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) { mes "^808080[ Human King? ]^000000"; mes "I cannot summon another MVP when there are monsters around."; close; } else if ( .cost_id ) { mes "^808080[ Human King? ]^000000"; mes "The cost to summon an Warrior is "+ F_InsertComma(.cost_amt) + " " + mesitemlink(.cost_id) + ".";; next; set .@menu, select(.mvpid_menu$) -1; mes "^808080[ Human King? ]^000000"; if (countitem(.cost_id) < .cost_amt ) { mes "You don't have the item."; close; } } else { set .@menu, select(.mvpid_menu$) -1; mes "^808080[ Human King? ]^000000"; } mes "Please get ready."; specialeffect EF_MAP_MAGICZONE4; close2; if ( countitem(.cost_id) < .cost_amt ) end; delitem .cost_id, .cost_amt; monster "this", 0, 0, "--ja--", .mvpid[.@menu], 1, strnpcinfo(3)+"::OnMobDead"; sleep 3000; removespecialeffect EF_MAP_MAGICZONE4; end; case 2: mes "^808080[ Human King? ]^000000"; mes "Are you sure you want to leave?"; next; if ( select( "Yes:No") == 1 ) warp .respawnmap$, .respawnx, .respawny; close; } OnMobDead: .@i = rand(.zeny_reward_min, .zeny_reward_max); Zeny += .@i; mapannounce strnpcinfo(4), strnpcinfo(1) + " : The Warrior dropped " + F_InsertComma(.@i) + "z!", 0; end; OnInit: // Config --------------------------------------------------------------------------------------- set .cost_id, 909; // Item ID to summon an MVP set .cost_amt, 6; // Item amount to summon an MVP .zeny_reward_min = 100000; // Minimum Zeny reward .zeny_reward_max = 999999; // Maximum Zeny reward setarray .mvpid[0], 1647,// Assassin Cross Eremes 1649,// High Priest Magaleta 1651,// High Wizard Katrinn 1646,// Lord Knight Seyren 1650,// Sniper Shecil 1648,// Whitesmith Harword 1658;// Ygnizem // Respawn point when players leave set .respawnmap$, "askald"; set .respawnx, 162; set .respawny, 237; // Config Ends ------------------------------------------------------------------------ .@size = getarraysize( .mvpid ); for ( .@i = 0; .@i < .@size; .@i++ ) .mvpid_menu$ = .mvpid_menu$ + getmonsterinfo( .mvpid[.@i], MOB_NAME ) +":"; mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; end; }
-
Racaae's post in question about transfer enchant npc (random option) was marked as the answer
Hi. It is possible. Here's a example for you.
//===== Script for rAthena by Racaae ========================= //= https://rathena.org/board/topic/142357-question-about-transfer-enchant-npc-random-option/ //===== Additional Comments: ================================= //= Modified from Sader1992' enchant npc //============================================================ prontera,165,215,5 script Costume Enchant Transfer 4_BULL,{ disable_items; mes "[Costume Enchant Transferer]"; mes "Hello!"; mes "Do you want to transfer enchantment from your equipped costume to another item?"; if (.ZenyCost) mes "This will cost ^0000FF" + F_InsertComma(.ZenyCost) + "z^000000 only!"; next; if (select("Random Option Transfer", "Enchant Socket Transfer") == 1) .@mode = true; for(.@i = 0; .@i < getarraysize(.s_all$); .@i++) { if (getequipid(.s_all_loc[.@i])>-1) set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^E81B02" + getitemname(getequipid(.s_all_loc[.@i])) + "^000000 ]:"; else set .@armor_menu$, .@armor_menu$ + .s_all$[.@i] + " - [ ^D6C4E8" + "No Equip" + "^000000 ]:"; } .@input_loc = select(.@armor_menu$) -1; mes "[Costume Enchant Transferer]"; if (getequipid(.s_all_loc[.@input_loc]) < 0){ mes "You don't have item equipped there."; close; } .@item = getequipid(.s_all_loc[.@input_loc]); .@refine = getequiprefinerycnt(.s_all_loc[.@input_loc]); .@card0 = getequipcardid(.s_all_loc[.@input_loc],0); .@card1 = getequipcardid(.s_all_loc[.@input_loc],1); .@card2 = getequipcardid(.s_all_loc[.@input_loc],2); .@card3 = getequipcardid(.s_all_loc[.@input_loc],3); for(.@i=0; .@i < (MAX_ITEM_RDM_OPT); .@i++) { .@r_id[.@i] = getequiprandomoption(.s_all_loc[.@input_loc],.@i,ROA_ID); .@r_v[.@i] = getequiprandomoption(.s_all_loc[.@input_loc],.@i,ROA_VALUE); .@r_p[.@i] = getequiprandomoption(.s_all_loc[.@input_loc],.@i,ROA_PARAM); } if (.@mode) { if (getarraysize(.@r_id) == 0) { mes "This costume has no Random Options..."; close; } } else if (!.@card0 && !.@card1 && !.@card2 && !.@card3) { mes "This costume has no enchants..."; close; } mes "Which enchantment to transfer?"; if (.@mode) { for(.@i=0; .@i < 5; .@i++) { if (.@r_id[.@i]) .@slot_menu$ += F_RDMOPT_Name(.@r_id[.@i],.@r_v[.@i]); .@slot_menu$ += ":"; } .@input_slot = select(.@slot_menu$) -1; } else { for(.@i=0; .@i < 4; .@i++) { if (getequipcardid(.s_all_loc[.@input_loc], .@i)) .@slot_menu$ += "[ ^E81B02" + getitemname(getequipcardid(.s_all_loc[.@input_loc],.@i)) + "^000000 ]:"; else .@slot_menu$ += ":"; } .@input_slot = select(.@slot_menu$) -1; } set .@item, getequipid(.s_all_loc[.@input_loc]); clear; mes "[Costume Enchant Transferer]"; mes "To what costume in your inventory you want to transfer?"; next; .@armor_menu$ = ""; for(.@i=0; .@i < getarraysize(.s_all$); .@i++) .@armor_menu$ += .s_all$[.@i] + ":"; .@output_type = select(.@armor_menu$) -1; getinventorylist; for(.@i = 0; .@i < @inventorylist_count; .@i++) { .@item_type = getiteminfo(@inventorylist_id[.@i], ITEMINFO_LOCATIONS); .@item_id = @inventorylist_id[.@i]; if (.@item_type & .s_all_loc2[.@output_type] && !@inventorylist_equip[.@i]) { .@item_ref = getarraysize(.@equipment_id_list); if (countinarray(.@equipment_id_list, .@item_id)) continue; .@equipment_id_list[.@item_ref] = @inventorylist_id[.@i]; .@menu_labels$[.@item_ref] = getitemname(@inventorylist_id[.@i]); } } if (!getarraysize(.@equipment_id_list[0])) { mes "[Costume Enchant Transferer]"; mes "There are no items of this category in your inventory."; close; } .@index = select(implode(.@menu_labels$, ":")) - 1; .@output_id = .@equipment_id_list[.@index]; mes "[Costume Enchant Transferer]"; mes "You selected " + getitemname(.@output_id) + "."; if (countitem(.@output_id) > 1) { mes "You have more than one of this item."; close; } getinventorylist; .@i2 = inarray(@inventorylist_id, .@output_id); .@output_refine = @inventorylist_refine[.@i2]; .@output_card0 = @inventorylist_card1[.@i2]; .@output_card1 = @inventorylist_card2[.@i2]; .@output_card2 = @inventorylist_card3[.@i2]; .@output_card3 = @inventorylist_card4[.@i2]; for(.@i = 0; .@i < (MAX_ITEM_RDM_OPT); .@i++) { .@output_r_id[.@i] = getd("@inventorylist_option_id" + (.@i + 1) + "[" + .@i2 + "]"); .@output_r_v[.@i] = getd("@inventorylist_option_value" + (.@i + 1) + "[" + .@i2 + "]"); .@output_r_p[.@i] = getd("@inventorylist_option_parameter" + (.@i + 1) + "[" + .@i2 + "]"); } if (.@mode) { for(.@i = 0; .@i < MAX_ITEM_RDM_OPT; .@i++) { if (.@output_r_id[.@i] == 0) { .@output_slot = .@i; .@ok = true; break; } } if (!.@ok) { mes "You already have full Random Options in this item."; close; } } else { mes "Transfer to which slot?"; .@slot_menu$ = ""; for(.@i = 0; .@i < 4; .@i++) { if (getd(".@output_card" + .@i)) .@slot_menu$ += "[^E81B02" + getitemname(getd(".@output_card" + .@i)) + "^000000 ]:"; else .@slot_menu$ += "[^D6C4E8" + "Empty" + "^000000 ]:"; } .@output_slot = select(.@slot_menu$) -1; if (!.Overwrite) { if(getd(".@output_card" + .@output_slot)) { mes "You already have enchant in this slot."; close; } } } clear; mes "[Costume Enchant Transferer]"; if (.@mode) mes "Transfer: ^FF7700" + F_RDMOPT_Name(.@r_id[.@input_slot],.@r_v[.@input_slot]) + "^000000"; else mes "Transfer: " + mesitemlink(getequipcardid(.s_all_loc[.@input_loc], .@input_slot)); mes "^FF0000From: " + getitemname(getequipid(.s_all_loc[.@input_loc])) + "^000000"; mes "^0000FFTo: " + getitemname(.@output_id) + "^000000"; mes "Are you sure?"; next; if(select("Cancel.", "Confirm") == 1) close; mes "[Costume Enchant Transferer]"; if (.ZenyCost && Zeny < .ZenyCost) { mes "Sorry, but you don't have enough zeny."; close; } mes "Stay put while the process is ongoing."; close2; specialeffect2 EF_MAPPILLAR; progressbar "ffff00", .progress_time; // anti-hack if (callfunc("F_IsEquipIDHack", .s_all_loc[.@input_loc], .@item) || callfunc("F_IsEquipCardHack", .s_all_loc[.@input_loc], .@card0, .@card1, .@card2, .@card3) || callfunc("F_IsEquipRefineHack", .s_all_loc[.@input_loc], .@refine) || countitem(.@output_id) != 1) { mes "[Costume Enchant Transferer]"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if (.ZenyCost && Zeny < .ZenyCost) { mes "Sorry, but you don't have enough zeny."; close; } Zeny -= .ZenyCost; if (.@mode) { .@output_r_id[.@output_slot] = .@r_id[.@input_slot]; .@output_r_v[.@output_slot] = .@r_v[.@input_slot]; .@output_r_p[.@output_slot] = .@r_p[.@input_slot]; deletearray .@r_id[.@input_slot], 1; deletearray .@r_v[.@input_slot], 1; deletearray .@r_p[.@input_slot], 1; } else { setd(".@output_card" + .@output_slot, getd(".@card" + .@input_slot)); setd(".@card" + .@input_slot, 0); } delequip .s_all_loc[.@input_loc]; delitem .@output_id, 1; getitem3 .@item, 1, 1, .@input_refine, 0, .@card0, .@card1, .@card2, .@card3,.@r_id,.@r_v,.@r_p; getitem3 .@output_id, 1, 1, .@output_refine, 0, .@output_card0, .@output_card1, .@output_card2, .@output_card3,.@output_r_id,.@output_r_v,.@output_r_p; equip .@item; npctalk "Enchant Transfer successful!", strnpcinfo(0), bc_self; end; OnInit: //--------------------------------------------------------------// //-------------------- configuration -----------------------// //--------------------------------------------------------------// //--------------------------------------------------------------// //if you want to remove one from the menu you need to remove it down too!! /or add //--------------------------------------------------------------// setarray .s_all$,"Upper","Middle","Lower","Garment"; setarray .s_all_loc,EQI_COSTUME_HEAD_TOP,EQI_COSTUME_HEAD_MID,EQI_COSTUME_HEAD_LOW,EQI_COSTUME_GARMENT; setarray .s_all_loc2,EQP_COSTUME_HEAD_TOP,EQp_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT; //--------------------------------------------------------------// //other configuration //--------------------------------------------------------------// .ZenyCost = 1000000; //if you don't want zeny requirment set it to 0 .Overwrite = true; //if true then you can overwrite the enchant .progress_time = 4; //the time that needed to wait until the socket end end; }
You need to use this function to display random options in the NPC.
////////////////////////////////////////////////////////////////////////////////// // Returns Random Option name and value // -- callfunc "F_RDMOPT_Name",<ROA_ID>{,<Value>{,<2nd value>}}; ////////////////////////////////////////////////////////////////////////////////// function script F_RDMOPT_Name { if (getargcount() > 2) .@s$ = getarg(1) + "~" + getarg(2); else if (getargcount() > 1) .@s$ = getarg(1); else .@s$ = "?"; if (#langtype = 8) { //POR switch(getarg(0)){ case 3: return "FOR +" + .@s$; case 6: return "INT +" + .@s$; case 7: return "DES +" + .@s$; case 8: return "SOR +" + .@s$; case 232: return "EXP ganha de Amorfos +" + .@s$ + "%"; case 233: return "EXP ganha de Morto-Vivos +" + .@s$ + "%"; case 234: return "EXP ganha de Brutos +" + .@s$ + "%"; case 235: return "EXP ganha de Plantas +" + .@s$ + "%"; case 236: return "EXP ganha de Insetos +" + .@s$ + "%"; case 237: return "EXP ganha de Peixes +" + .@s$ + "%"; case 238: return "EXP ganha de Demônios +" + .@s$ + "%"; case 239: return "EXP ganha de Humanoides +" + .@s$ + "%"; case 240: return "EXP ganha de Anjos +" + .@s$ + "%"; case 241: return "EXP ganha de Dragões +" + .@s$ + "%"; case 242: return "EXP ganha de todas raças +" + .@s$ + "%"; } } switch(getarg(0)){ case 1: return "MaxHP +" + .@s$; case 2: return "MaxSP +" + .@s$; case 3: return "STR +" + .@s$; case 4: return "AGI +" + .@s$; case 5: return "VIT +" + .@s$; case 6: return "INT +" + .@s$; case 7: return "DEX +" + .@s$; case 8: return "LUK +" + .@s$; case 9: return "MaxHP +" + .@s$ + "%"; case 10: return "MaxSP +" + .@s$ + "%"; case 11: return "HP regen +" + .@s$ + "%"; case 12: return "SP regen +" + .@s$ + "%"; case 13: return "ATK +" + .@s$ + "%"; case 14: return "MATK +" + .@s$ + "%"; case 15: return "ASPD +" + .@s$; case 16: return "Delay after attack -" + .@s$ + "%"; case 17: return "ATK +" + .@s$; case 18: return "HIT +" + .@s$; case 19: return "MATK +" + .@s$; case 20: return "DEF +" + .@s$; case 21: return "MDEF +" + .@s$; case 22: return "FLEE +" + .@s$; case 23: return "Perfect dodge +" + .@s$; case 24: return "CRIT +" + .@s$; case 25: return "Neutral elemental resistance +" + .@s$ + "%"; case 26: return "Water elemental resistance +" + .@s$ + "%"; case 27: return "Earth elemental resistance +" + .@s$ + "%"; case 28: return "Fire elemental resistance +" + .@s$ + "%"; case 29: return "Wind elemental resistance +" + .@s$ + "%"; case 30: return "Poison elemental resistance +" + .@s$ + "%"; case 31: return "Holy elemental resistance +" + .@s$ + "%"; case 32: return "Shadow elemental resistance +" + .@s$ + "%"; case 33: return "Ghost elemental resistance +" + .@s$ + "%"; case 34: return "Undead elemental resistance +" + .@s$ + "%"; case 35: return "All elemental (except Neutral) resistance +" + .@s$ + "%"; case 36: return "Neutral monster resistance +" + .@s$ + "%"; case 37: return "ATK +" + .@s$ + "% against Neutral monster"; case 38: return "Water monster resistance +" + .@s$ + "%"; case 39: return "ATK +" + .@s$ + "% against Water monster"; case 40: return "Earth monster resistance +" + .@s$ + "%"; case 41: return "ATK +" + .@s$ + "% against Earth monster"; case 42: return "Fire monster resistance +" + .@s$ + "%"; case 43: return "ATK +" + .@s$ + "% against Fire monster"; case 44: return "Wind monster resistance +" + .@s$ + "%"; case 45: return "ATK +" + .@s$ + "% against Wind monster"; case 46: return "Poison monster resistance +" + .@s$ + "%"; case 47: return "ATK +" + .@s$ + "% against Poison monster"; case 48: return "Holy monster resistance +" + .@s$ + "%"; case 49: return "ATK +" + .@s$ + "% against Holy monster"; case 50: return "Shadow monster resistance +" + .@s$ + "%"; case 51: return "ATK +" + .@s$ + "% against Shadow monster"; case 52: return "Ghost monster resistance +" + .@s$ + "%"; case 53: return "ATK +" + .@s$ + "% against Ghost monster"; case 54: return "Undead monster resistance +" + .@s$ + "%"; case 55: return "ATK +" + .@s$ + "% against Undead monster"; case 56: return "Neutral monster magic resistance +" + .@s$ + "%"; case 57: return "MATK +" + .@s$ + "% against Neutral monster"; case 58: return "Water monster magic resistance +" + .@s$ + "%"; case 59: return "MATK +" + .@s$ + "% against Water monster"; case 60: return "Earth monster magic resistance +" + .@s$ + "%"; case 61: return "MATK +" + .@s$ + "% against Earth monster"; case 62: return "Fire monster magic resistance +" + .@s$ + "%"; case 63: return "MATK +" + .@s$ + "% against Fire monster"; case 64: return "Wind monster magic resistance +" + .@s$ + "%"; case 65: return "MATK +" + .@s$ + "% against Wind monster"; case 66: return "Poison monster magic resistance +" + .@s$ + "%"; case 67: return "MATK +" + .@s$ + "% against Poison monster"; case 68: return "Holy monster magic resistance +" + .@s$ + "%"; case 69: return "MATK +" + .@s$ + "% against Holy monster"; case 70: return "Shadow monster magic resistance +" + .@s$ + "%"; case 71: return "MATK +" + .@s$ + "% against Shadow monster"; case 72: return "Ghost monster magic resistance +" + .@s$ + "%"; case 73: return "MATK +" + .@s$ + "% against Ghost monster"; case 74: return "Undead monster magic resistance +" + .@s$ + "%"; case 75: return "MATK +" + .@s$ + "% against Undead monster"; case 76: return "Armor element Neutral"; case 77: return "Armor element Water"; case 78: return "Armor element Earth"; case 79: return "Armor element Fire"; case 80: return "Armor element Wind"; case 81: return "Armor element Poison"; case 82: return "Armor element Holy"; case 83: return "Armor element Shadow"; case 84: return "Armor element Ghost"; case 85: return "Armor element Undead"; case 87: return "Formless monster resistance +" + .@s$ + "%"; case 88: return "Undead monster resistance +" + .@s$ + "%"; case 89: return "Brute monster resistance +" + .@s$ + "%"; case 90: return "Plant monster resistance +" + .@s$ + "%"; case 91: return "Insect monster resistance +" + .@s$ + "%"; case 92: return "Fish monster resistance +" + .@s$ + "%"; case 93: return "Demon monster resistance +" + .@s$ + "%"; case 94: return "Demihuman monster resistance +" + .@s$ + "%"; case 95: return "Angel monster resistance +" + .@s$ + "%"; case 96: return "Dragon monster resistance +" + .@s$ + "%"; case 97: return "ATK +" + .@s$ + "% against Formless monster"; case 98: return "ATK +" + .@s$ + "% against Undead monster"; case 99: return "ATK +" + .@s$ + "% against Brute monster"; case 100: return "ATK +" + .@s$ + "% against Plant monster"; case 101: return "ATK +" + .@s$ + "% against Insect monster"; case 102: return "ATK +" + .@s$ + "% against Fish monster"; case 103: return "ATK +" + .@s$ + "% against Demon monster"; case 104: return "ATK +" + .@s$ + "% against Demihuman monster"; case 105: return "ATK +" + .@s$ + "% against Angel monster"; case 106: return "ATK +" + .@s$ + "% against Dragon monster"; case 107: return "MATK +" + .@s$ + "% against Formless monster"; case 108: return "MATK +" + .@s$ + "% against Undead monster"; case 109: return "MATK +" + .@s$ + "% against Brute monster"; case 110: return "MATK +" + .@s$ + "% against Plant monster"; case 111: return "MATK +" + .@s$ + "% against Insect monster"; case 112: return "MATK +" + .@s$ + "% against Fish monster"; case 113: return "MATK +" + .@s$ + "% against Devil monster"; case 114: return "MATK +" + .@s$ + "% against Demihuman monster"; case 115: return "MATK +" + .@s$ + "% against Angel monster"; case 116: return "MATK +" + .@s$ + "% against Dragon monster"; case 117: return "CRIT +" + .@s$ + " against Formless monster"; case 118: return "CRIT +" + .@s$ + " against Undead monster"; case 119: return "CRIT +" + .@s$ + " against Brute monster"; case 120: return "CRIT +" + .@s$ + " against Plant monster"; case 121: return "CRIT +" + .@s$ + " against Insect monster"; case 122: return "CRIT +" + .@s$ + " against Fish monster"; case 123: return "CRIT +" + .@s$ + " against Demon monster"; case 124: return "CRIT +" + .@s$ + " against Demihuman monster"; case 125: return "CRIT +" + .@s$ + " against Angel monster"; case 126: return "CRIT +" + .@s$ + " against Dragon monster"; case 127: return "Pierces " + .@s$ + "% DEF of Formless monster"; case 128: return "Pierces " + .@s$ + "% DEF of Undead monster"; case 129: return "Pierces " + .@s$ + "% DEF of Brute monster"; case 130: return "Pierces " + .@s$ + "% DEF of Plant monster"; case 131: return "Pierces " + .@s$ + "% DEF of Insect monster"; case 132: return "Pierces " + .@s$ + "% DEF of Fish monster"; case 133: return "Pierces " + .@s$ + "% DEF of Demon monster"; case 134: return "Pierces " + .@s$ + "% DEF of Demihuman monster"; case 135: return "Pierces " + .@s$ + "% DEF of Angel monster"; case 136: return "Pierces " + .@s$ + "% DEF of Dragon monster"; case 137: return "Pierces " + .@s$ + "% MDEF of Formless monster"; case 138: return "Pierces " + .@s$ + "% MDEF of Undead monster"; case 139: return "Pierces " + .@s$ + "% MDEF of Brute monster"; case 140: return "Pierces " + .@s$ + "% MDEF of Plant monster"; case 141: return "Pierces " + .@s$ + "% MDEF of Insect monster"; case 142: return "Pierces " + .@s$ + "% MDEF of Fish monster"; case 143: return "Pierces " + .@s$ + "% MDEF of Demon monster"; case 144: return "Pierces " + .@s$ + "% MDEF of Demihuman monster"; case 145: return "Pierces " + .@s$ + "% MDEF of Angel monster"; case 146: return "Pierces " + .@s$ + "% MDEF of Dragon monster"; case 147: return "ATK +" + .@s$ + "% against Normal monster"; case 148: return "ATK +" + .@s$ + "% against Boss monster"; case 149: return "Normal monster resistance +" + .@s$ + "%"; case 150: return "Boss monster resistance +" + .@s$ + "%"; case 151: return "MATK +" + .@s$ + "% against Normal monster"; case 152: return "MATK +" + .@s$ + "% against Boss monster"; case 153: return "Pierces " + .@s$ + "% DEF of Normal monster"; case 154: return "Pierces " + .@s$ + "% DEF of Boss monster"; case 155: return "Pierces " + .@s$ + "% MDEF of Normal monster"; case 156: return "Pierces " + .@s$ + "% MDEF of Boss monster"; case 157: return "ATK +" + .@s$ + "% against Small size monster"; case 158: return "ATK +" + .@s$ + "% against Medium size monster"; case 159: return "ATK +" + .@s$ + "% against Large size monster"; case 160: return "Small monster resistance +" + .@s$ + "%"; case 161: return "Medium monster resistance +" + .@s$ + "%"; case 162: return "Large monster resistance +" + .@s$ + "%"; case 163: return "Nullify weapon's DMG size penalty"; case 164: return "Critical attack +" + .@s$ + "%"; case 165: return "Critical DMG -" + .@s$ + "%"; case 166: return "Long range physical attack +" + .@s$ + "%"; case 167: return "Long range physical DMG -" + .@s$ + "%"; case 168: return "Healing skills +" + .@s$ + "%"; case 169: return "Restoration gained from Healing skills +" + .@s$ + "%"; case 170: return "Variable cast time -" + .@s$ + "%"; case 171: return "After cast delay -" + .@s$ + "%"; case 172: return "Reduces SP cost by " + .@s$ + "%"; case 175: return "Weapon element Neutral"; case 176: return "Weapon element Water"; case 177: return "Weapon element Earth"; case 178: return "Weapon element Fire"; case 179: return "Weapon element Wind"; case 180: return "Weapon element Poison"; case 181: return "Weapon element Holy"; case 182: return "Weapon element Shadow"; case 183: return "Weapon element Ghost"; case 184: return "Weapon element Undead"; case 185: return "Indestructible in battle"; case 186: return "Indestructible in battle"; case 187: return "MATK against Small size monster +" + .@s$ + "%"; case 188: return "MATK against Medium size monster +" + .@s$ + "%"; case 189: return "MATK against Large size monster +" + .@s$ + "%"; case 190: return "Small monster magic resistance +" + .@s$ + "%"; case 191: return "Medium monster magic resistance +" + .@s$ + "%"; case 192: return "Large monster magic resistance +" + .@s$ + "%"; case 193: return "Elemental attacks resistance +" + .@s$ + "%"; case 194: return "Formless monster resistance +" + .@s$ + "%"; case 195: return "Undead monster resistance +" + .@s$ + "%"; case 196: return "Brute monster resistance +" + .@s$ + "%"; case 197: return "Plant monster resistance +" + .@s$ + "%"; case 198: return "Insect monster resistance +" + .@s$ + "%"; case 199: return "Fish monster resistance +" + .@s$ + "%"; case 200: return "Demon monster resistance +" + .@s$ + "%"; case 201: return "Demihuman monster resistance +" + .@s$ + "%"; case 202: return "Angel monster resistance +" + .@s$ + "%"; case 203: return "Dragon monster resistance +" + .@s$ + "%"; case 206: return "Demi-Human players resistance + " + .@s$ + "%"; case 207: return "Doram players resistance +" + .@s$ + "%"; case 208: return "ATK against Demi-Human players +" + .@s$ + "%"; case 209: return "ATK against Doram players +" + .@s$ + "%"; case 210: return "MATK against Demi-Human players +" + .@s$ + "%"; case 211: return "MATK against Doram players +" + .@s$ + "%"; case 212: return "Critical +" + .@s$ + " for Demi-Human players"; case 213: return "Critical +" + .@s$ + " for Doram players"; case 214: return "Pierces " + .@s$ + "% DEF of Demi-Human players"; case 215: return "Pierces " + .@s$ + "% DEF of Doram players"; case 216: return "Pierces " + .@s$ + "% MDEF of Demi-Human players"; case 217: return "Pierces " + .@s$ + "% MDEF of Doram players"; case 218: return "Received reflected DMG -" + .@s$ + "%"; case 219: return "Melee physical DMG +" + .@s$ + "%"; case 220: return "Melee physical DMG -" + .@s$ + "%"; case 221: return "Neutral elemental magic skill DMG +" + .@s$ + "%"; case 222: return "Water elemental magic skill DMG +" + .@s$ + "%"; case 223: return "Earth elemental magic skill DMG +" + .@s$ + "%"; case 224: return "Fire elemental magic skill DMG +" + .@s$ + "%"; case 225: return "Wind elemental magic skill DMG +" + .@s$ + "%"; case 226: return "Poison elemental magic skill DMG +" + .@s$ + "%"; case 227: return "Holy elemental magic skill DMG +" + .@s$ + "%"; case 228: return "Shadow elemental magic skill DMG +" + .@s$ + "%"; case 229: return "Ghost elemental magic skill DMG +" + .@s$ + "%"; case 230: return "Undead elemental magic skill DMG +" + .@s$ + "%"; case 231: return "All elemental magic skill DMG +" + .@s$ + "%"; case 232: return "EXP gained from Formless race +" + .@s$ + "%"; case 233: return "EXP gained from Undead race +" + .@s$ + "%"; case 234: return "EXP gained from Brute race +" + .@s$ + "%"; case 235: return "EXP gained from Plant race +" + .@s$ + "%"; case 236: return "EXP gained from Insect race +" + .@s$ + "%"; case 237: return "EXP gained from Fish race +" + .@s$ + "%"; case 238: return "EXP gained from Demon race +" + .@s$ + "%"; case 239: return "EXP gained from Demi-Human race +" + .@s$ + "%"; case 240: return "EXP gained from Angel race +" + .@s$ + "%"; case 241: return "EXP gained from Dragon race +" + .@s$ + "%"; case 242: return "EXP gained from all races +" + .@s$ + "%"; case 243: return "POW + " + .@s$; case 244: return "SPL + " + .@s$; case 245: return "STA + " + .@s$; case 246: return "WIS + " + .@s$; case 247: return "CON + " + .@s$; case 248: return "CRT + " + .@s$; case 249: return "P.ATK + " + .@s$; case 250: return "S.MATK + " + .@s$; case 251: return "RES + " + .@s$; case 252: return "MRES + " + .@s$; case 253: return "H.PLUS + " + .@s$; case 254: return "C.RATE + " + .@s$; default: return "Unknow Random Option"; } }
-
Racaae's post in Help Needed: Script Error with atcommand was marked as the answer
atcommand "<command>"; Hi, atcommand has no parameter for char/account ID.
Find:
.@command$ = "@summony " + .@mob_id + " " + .@qty; atcommand(.@command$, getcharid(3)); Replace:
.@command$ = "@summony " + .@mob_id + " " + .@qty + " " + getcharid(3); atcommand(.@command$);
-
Racaae's post in Custom Quest Description Not Showing - RecommendedQuestInfoList_True_EN.lub was marked as the answer
Hi, RecommendedQuestInfoList and OngoingQuestInfoList have some little different fields.
Try using QuestInfo1 instead of Description.
Example:
RecommendedQuestInfoList = {} RecommendedQuestInfoList = { [1] = { Title = "Prontera Field 01", IconName = "ico_nq.bmp", NpcSpr = "4_M_JOB_HUNTER", NpcNavi = "moc_para01", NpcPosX = 39, NpcPosY = 36, BgName = "reco_01.bmp", QuestInfo1 = { "Hunt following monster list.", "300 Poring", "300 Pupa", "300 Fabre" }, QuestInfo2 = { "Quest reset at 24 hours and account bounded.", }, QuestInfo3 = { "^ff0000This page is intended for exclusive content news. Please note that completing quests will not remove them from this page.^000000" }, Summary = "Quest reset at 24 hours and account bounded.", RewardEXP = "2100", RewardJEXP = "2100", RewardItemList = { {ItemID = 40221, ItemNum = 1}, {ItemID = 40222, ItemNum = 1} }, } }
-
Racaae's post in How to make my custom quest account bound and base lvl restriction ? was marked as the answer
Replace all EXCOOLDOWN with #EXCOOLDOWN
-
Racaae's post in SOLVED Help for limite quest / day / was marked as the answer
Hi. Find this line:
set @npc$,"[ ^0000FFClaude^000000 ]" And insert below:
if (#hideseek_cd == gettime(DT_YYYYMMDD)) { mes @npc$; mes "You can come back to play again tomorrow."; close; }
Find the line with getitem and insert below:
#hideseek_cd = gettime(DT_YYYYMMDD);
-
Racaae's post in Automatic Leave party was marked as the answer
Hi. Option 2:
- script Automatic_Leave_Party HIDDEN_WARP_NPC,{ OnInit: //Put here Maintowns maps names setarray .maps$,"prontera","geffen","aldebaran"; for(.@i = 0; .@i < getarraysize(.maps$); .@i++) setmapflag .maps$[.@i], mf_loadevent; end; OnPCLoadMapEvent: if (inarray(.maps$, strcharinfo(3)) >= 0) party_delmember; end; }
-
Racaae's post in Private branch room script was marked as the answer
Hi. Try this one if you do not want to use instance system, modified from AnnieRuru' Private MVP & Branch Room in \npc\custom\etc\mvp_room.txt
//===== rAthena Script ======================================= //= Private MVP & Branch Room //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Allows players to rent an MVP room for personal use, //= or for a party or guild. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ prontera,148,174,5 script DB Room Manager 4_F_RUSGREEN,{ mes "[^EFCC00 DB Room Manager ^000000]"; mes "How are thing with you?", " "; mes "I offer two types of DB Room. Choose what best suits your need."; switch(select("Public DB Room", "Private DB Room", "Buy Branches", "Cancel")) { case 1: .@room = select( "Enter Room 1 ["+ getmapusers("06guild_01") +"]", "Enter Room 2 ["+ getmapusers("06guild_02") +"]", "Enter Room 3 ["+ getmapusers("06guild_03") +"]", "Enter Room 4 ["+ getmapusers("06guild_04") +"]"); warp "06guild_0"+ .@room, 0,0; end; case 2: clear; mes "[^EFCC00 DB Room Manager ^000000]"; if ( getvariableofnpc( .rentcost, "DB Room Helper" ) ) mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "DB Room Helper" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "DB Room Helper" ) ) +"z."; else mes "You can only use the room for only "+ getvariableofnpc( .timeout, "DB Room Helper" ) +" minutes."; mes " "; .@menu$ = ""; for ( .@i = 5; .@i <= 8; .@i++ ) { if ( getvariableofnpc( .renttime[.@i], "DB Room Helper" ) ) { //mes "Room #"+ .@i +" = "+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000"; .@menu$ += "Enter Room " + .@i + " ["+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000]:"; } else .@menu$ += "Rent Room " + .@i + ":"; } next; .@room = select(.@menu$)+4; if ( getvariableofnpc( .renttime[.@room], "DB Room Helper" ) ) { if ( .inuseid[.@room] == getcharid( .type[.@room] ) ) { warp "06guild_0"+ .@room, 0,0; close; } else { mes "[^EFCC00 DB Room Manager ^000000]"; mes "This room is reserved for "; mes .color$[ .type[.@room] ] + .whoinuse$[.@room] +"^000000."; mes "Please select another."; close; } } mes "[^EFCC00 DB Room Manager ^000000]"; mes "Reserve this room for..."; next; .@type = select( "For my party members", "For my guild members", "For personal account use" ); if ( !getcharid(.@type) ) { mes "[^EFCC00 DB Room Manager ^000000]"; mes "You do not own a "+( ( .@type == 1 )? "Party" : "Guild" )+"."; close; } else if ( Zeny < getvariableofnpc( .rentcost, "DB Room Helper" ) ) { mes "You don't have enough zeny to rent a room."; close; } else if ( getvariableofnpc( .renttime[.@room], "DB Room Helper" ) ) { mes "[^EFCC00 DB Room Manager ^000000]"; mes "I'm sorry, somebody else has already registered this room faster than you."; close; } for ( .@i = 1; .@i <= 8; .@i++ ) { if ( ( getvariableofnpc( .renttime[.@i], "DB Room Helper" ) ) && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) { mes "[^EFCC00 DB Room Manager ^000000]"; mes "You already rented Room#"+ .@i +". Use that room instead."; close; } } set .type[.@room], .@type; set .inuseid[.@room], getcharid(.@type); set .whoinuse$[.@room], strcharinfo( ( .@type == 3 )? 0 : .@type ); Zeny -= getvariableofnpc( .rentcost, "DB Room Helper" ); warp "06guild_0"+ .@room, 0,0; killmonsterall "06guild_0"+ .@room; donpcevent "Private DB Room Helper#"+ .@room +"::OnEnterMap"; close; case 3: close2; callshop "DB_Room#branch", 1; end; case 4: close; } OnInit: .color$[1] = "^EE8800"; // party color .color$[2] = "^70CC11"; // guild color .color$[3] = "^0000FF"; // account color end; } - script DB Room Helper -1,{ if (.renttime[ atoi( strnpcinfo(2) ) ]) npctalk "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 ),strnpcinfo(0),bc_self; switch ( select(.menu$ + "Leave this room:" + (compare(strnpcinfo(1),"Private")?"Give up this room":"") ) ) { case 1: if ( mobcount( "this","" ) ) { npctalk "I cannot offer heal service when there are monsters around.",strnpcinfo(0),bc_self; end; } sc_end SC_STONE; sc_end SC_SLOWDOWN; sc_end SC_FREEZE; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLEEDING; sc_end SC_DECREASEAGI; sc_end SC_POISON; sc_end SC_HALLUCINATION; sc_end SC_STRIPWEAPON; sc_end SC_STRIPARMOR; sc_end SC_STRIPHELM; sc_end SC_STRIPSHIELD; sc_end SC_CHANGEUNDEAD; sc_end SC_ORCISH; sc_end SC_BERSERK; sc_end SC_SKE; sc_end SC_SWOO; sc_end SC_SKA; percentheal 100,100; specialeffect2 EF_HEAL; npctalk "You are completely healed.",strnpcinfo(0),bc_self; end; case 2: npctalk "Are you sure you want to leave this room?",strnpcinfo(0),bc_self; if ( select( "No, stay here","Yes, leave now") == 2 ) warp .respawnmap$, .respawnx, .respawny; end; case 3: if ( getmapusers( strcharinfo(3) ) > 1 ) { npctalk "There are still some players in this room. Make sure you are the last member in this room to use this option.",strnpcinfo(0),bc_self; end; } mes "[DB Room Helper]"; mes "Are you sure you want to give up this room?"; if ( .rentcost ) mes "You will need to pay again to enter this room."; next; if ( select( "Yes", "No" ) == 2 ) close; awake strnpcinfo(0); end; } close; OnEnterMap: .@id = atoi( strnpcinfo(2) ); .renttime[.@id] = gettimetick(2); sleep .timeout * 60000; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; .renttime[.@id] = 0; killmonsterall strnpcinfo(4); end; OnInit: if ( !getstrlen( strnpcinfo(2) ) ) { // Config --------------------------------------------------------------------------------------- // Room rental time, in minutes. // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! .timeout = 60; .rentcost = 100000; // Zeny cost for renting a room (0 = free) // Options setting inside the room .@menu[1] = 1; // Turn Heal option On/Off // Respawn point when players leave the room set .respawnmap$, "prontera"; set .respawnx, 150; set .respawny, 174; // Config Ends ------------------------------------------------------------------------ if ( !.timeout ) set .timeout, 60; .menu$ = ( .@menu[1] ? "Heal" : "" ) +":" ; } else { mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map; mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny; } end; } - shop DB_Room#branch -1,604:100000,12103:10000000 06guild_01,49,49,4 duplicate(DB Room Helper) DB Room Helper#1 4_F_RUSGREEN 06guild_02,49,49,4 duplicate(DB Room Helper) DB Room Helper#2 4_F_RUSGREEN 06guild_03,49,49,4 duplicate(DB Room Helper) DB Room Helper#3 4_F_RUSGREEN 06guild_04,49,49,4 duplicate(DB Room Helper) DB Room Helper#4 4_F_RUSGREEN 06guild_05,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#5 4_F_RUSGREEN 06guild_06,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#6 4_F_RUSGREEN 06guild_07,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#7 4_F_RUSGREEN 06guild_08,49,49,4 duplicate(DB Room Helper) Private DB Room Helper#8 4_F_RUSGREEN 06guild_01 mapflag nowarpto 06guild_02 mapflag nowarpto 06guild_03 mapflag nowarpto 06guild_04 mapflag nowarpto 06guild_05 mapflag nowarpto 06guild_06 mapflag nowarpto 06guild_07 mapflag nowarpto 06guild_08 mapflag nowarpto 06guild_01 mapflag nomemo 06guild_02 mapflag nomemo 06guild_03 mapflag nomemo 06guild_04 mapflag nomemo 06guild_05 mapflag nomemo 06guild_06 mapflag nomemo 06guild_07 mapflag nomemo 06guild_08 mapflag nomemo 06guild_01 mapflag noteleport 06guild_02 mapflag noteleport 06guild_03 mapflag noteleport 06guild_04 mapflag noteleport 06guild_05 mapflag noteleport 06guild_06 mapflag noteleport 06guild_07 mapflag noteleport 06guild_08 mapflag noteleport 06guild_01 mapflag nosave SavePoint 06guild_02 mapflag nosave SavePoint 06guild_03 mapflag nosave SavePoint 06guild_04 mapflag nosave SavePoint 06guild_05 mapflag nosave SavePoint 06guild_06 mapflag nosave SavePoint 06guild_07 mapflag nosave SavePoint 06guild_08 mapflag nosave SavePoint 06guild_01 mapflag nopenalty 06guild_02 mapflag nopenalty 06guild_03 mapflag nopenalty 06guild_04 mapflag nopenalty 06guild_05 mapflag nopenalty 06guild_06 mapflag nopenalty 06guild_07 mapflag nopenalty 06guild_08 mapflag nopenalty
-
Racaae's post in Ajuda, Por favor! Erro com NPC ''Estilista Doram'' was marked as the answer
Oi, a causa do erro é que o NPC não terminava a conversa para jogadores não-Doram.
prontera,170,180,1 script Estilista Doram 122,{ //================================================ mes "[^0000FF Estilista Doram ^000000]"; mes "Oi, bebê!"; if (BaseClass != Job_Summoner) { mes "Infelizmente eu atendo apenas gatinhos."; close; } mes "Eu posso deixar você fabulos" + (Sex?"o":"a") + "!"; mes "O que deseja?"; setarray .@Styles[1], 35, 10, 11; setarray .@Look[1], LOOK_CLOTHES_COLOR, LOOK_HAIR, LOOK_HAIR_COLOR; .@s = select("^FF0000 ^000000 Cor da Roupa:^FF0000 ^000000 Estilo do Pelo:^FF0000 ^000000 Cor do Pelo"); .@Revert = getlook(.@Look[.@s]); .@Style = .@Revert; while(1) { setlook .@Look[.@s], .@Style; message strcharinfo(0),"Este é o estlio #"+.@Style+"."; set .@menu$, " ~ Próximo (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Anterior (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Pular para...: ~ Voltar ao original (^0055FF"+.@Revert+"^000000)"; switch(select(.@menu$)) { case 1: set .@Style, ((.@Style != .@Styles[.@s]) ? .@Style+1 : 1); break; case 2: set .@Style, ((.@Style != 1) ? .@Style-1 : .@Styles[.@s]); break; case 3: message strcharinfo(0),"Escolha um estilo entre 0 e "+.@Styles[.@s]+"."; input .@Style,0,.@Styles[.@s]; if (!.@Style) set .@Style, rand(1,.@Styles[.@s]); break; case 4: set .@Style, .@Revert; setlook .@Look[.@s], .@Revert; break; } } }
-
Racaae's post in reset quest (just any quest) was marked as the answer
Hi. Most quests use variables to track player progression. So changing said variables to 0 is the same as resetting it's questline.
Just ANY quest, you would need to find each and every variable used in the scripts.
Example:
Terra Gloria NPCs are in \npc\re\quests\quests_16_2.txt, inside the file you can see the variable used in the main quest is terra_gloria_main.
Make the NPC set terra_gloria_main to 0 to reset the whole questline.
prontera,150,150,3 script Quest Resetter 99,{ mes "Which questline do you want to reset?"; next; switch(select("Rachel", "Terra Gloria")) { case 1: mes "Are you sure you want to reset Rachel quests?"; if(select("No", "Yes") == 1) close; rachel_quest = 0; mes "Done!"; close; case 2: mes "Are you sure you want to reset Terra Gloria quests?"; if(select("No", "Yes") == 1) close; terra_gloria_main = 0; mes "Done!"; close; } }
-
Racaae's post in R > Safe Refine NPC Script was marked as the answer
/npc/re/merchants/ticket_refiner.txt
-
Racaae's post in timer for cheffenia event was marked as the answer
Hi. You can use addtimer command. Example:
- script cheffenia_time HIDDEN_WARP_NPC,{ OnPCLoadMapEvent: if (compare(strcharinfo(3),"bossnia")) { // MINUTOS QUE PODE FICAR DENTRO DA CHEFFENIA .@tempo = 60; deltimer strnpcinfo(0)+"::OnTimeEnd"; deltimer strnpcinfo(0)+"::OnCountdown"; sleep2 1; if (.@tempo < 2) addtimer 60000, strnpcinfo(0)+"::OnTimeEnd"; else addtimer (.@tempo-1)*60000, strnpcinfo(0)+"::OnCountdown"; } end; OnCountdown: if (compare(strcharinfo(3),"bossnia")) { announce "[Cheffênia] Seu tempo acabará em 1 minuto.", bc_self,0xFFF618,FW_NORMAL,30;; addtimer (60000), strnpcinfo(0)+"::OnTimeEnd"; } end; OnTimeEnd: if (compare(strcharinfo(3),"bossnia")) { announce "[Cheffênia] Seu tempo acabou.", bc_self,0xFFF618,FW_NORMAL,30;; sleep2 500; warp "SavePoint", 0, 0; } end; } bossnia_01 mapflag loadevent bossnia_02 mapflag loadevent bossnia_03 mapflag loadevent bossnia_04 mapflag loadevent
-
Racaae's post in how to add other languages in the command @langtype was marked as the answer
Hi, open this file: /src/common/msg_conf.hpp and find this part:
enum lang_types { LANG_RUS = 0x01, LANG_SPN = 0x02, LANG_GRM = 0x04, LANG_CHN = 0x08, LANG_MAL = 0x10, LANG_IDN = 0x20, LANG_FRN = 0x40, LANG_POR = 0x80, LANG_THA = 0x100, LANG_MAX }; #ifndef LANG_ENABLE // Multilanguage System. // Define which languages to enable (bitmask). // 0xFFF will enable all, while 0x000 will enable English only. #define LANG_ENABLE 0x000
Change 0x000 in the last line to the desired bitmask value (sum of numbers of the languages you want to use). Save and then compile your server. Examples:
Enable Russian and Spanish (0x01 + 0x02 = 0x03)
#define LANG_ENABLE 0x03 Enable German and Chinese (0x04 + 0x08 = 0x12)
#define LANG_ENABLE 0x12 Enable Spanish and French and Portuguese (0x02 + 0x40 + 0x80 = 0x122)
#define LANG_ENABLE 0x122 EDIT: Do note that @langtype have no effect on client-side text. It's only for server messages.
-
Racaae's post in Requesting for Credit Agent modification was marked as the answer
Hi. please put scripts inside a code box next time, the indentation is all lost otherwise.
//==== DarkRO Scripts ==================================== //= Credit Exchanger //===== By: ================================================== //= //===== Current Version: ===================================== //= 1.4 //===== Description: ========================================= //= Allow to Convert Zeny into a Ticket. //===== Changelog: =========================================== //= Not yet tested for bugs //= 1.0 Implementation //= 1.1 Re-script (added quest) //= 1.2 Automated zeny-to-credit exchange and vice-versa //= 1.3 Added @security checking. //= 1.4 Added Black Credit Exchange feature //============================================================ - script Credit Agent -1,{ set @header$,"[^FF8000 Credit Agent ^000000]"; .@credit_id = 40000; //Credit Item ID if (checksecurity()) { message strcharinfo(0), "You can't do this action, Protected by @security."; end; } if(#CREDITPASSPORT > gettimetick(2)) { disable_items; setpcblock(PCBLOCK_COMMANDS, true, getcharid(3)); getinventorylist(); mes @header$; mes "Hello, I can see that you still have your Intergalactical Passport."; mes " "; mes "What can I do for you?"; mes " "; mes "^FF0000Your current credit: " + F_InsertComma(countitem(.@credit_id)); next; switch(prompt("I want to change Zeny to Credit:I want to change Credit to Zeny.:Nothing, just passing by.")){ case 255: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; case 1: if (@inventorylist_count == MAX_INVENTORY && !countitem(.@credit_id)) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "You need to clear your inventory first."; close(); } mes @header$; mes "The exchange rate is fixed and its ^00008810,000,000^000000 Zeny = 1 ^FF0000Credit^000000."; mes " "; mes "How will you exchange your Zeny?"; next; .@i = prompt("Decide on how many Credits I need.:Exchange all my Zeny:Cancel"); if (.@i == 3) goto L_Cancel; else if (.@i == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } else if (.@i == 1) { mes @header$; mes "How much Credits do you need?"; mes " "; mes "^FF0000(Enter '0' to cancel the transaction)^000000"; next; input @ZTC; if (@ZTC <= 0) goto L_Cancel; else if (@ZTC > MAX_ZENY / 10000000) { L_Exceed: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Sorry, but you have"; mes "exceeded from the limit."; close(); } else if (@ZTC > Zeny / 10000000) { L_LessZeny: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "You don't have enough zeny."; close(); } else { L_ConvertZTC: if (!checkweight(.@credit_id,@ZTC)) { mes @header$; mes "Sorry. You can't hold this amount of credit."; mes "Such amount would exceed your weight limit."; for(; @ZTC; @ZTC--) if (checkweight(.@credit_id,@ZTC)) break; if (@ZTC) { mes "You can only hold up to " + @ZTC + "."; mes "Would this amount do?"; next; if (select("Ok, " + @ZTC + " is acceptable", "No, just cancel") == 2) callsub L_Cancel; } else { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); close; } } mes @header$; mes "You will be receiving ^FF0000"+@ZTC+" Credit"+(@ZTC != 1 ? "s":"")+"^000000."; mes " "; mes "Proceed?"; next; .@menu = prompt("I changed my mind:Proceed!"); if (.@menu == 1) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); close(); break; } if (.@menu == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); Zeny -= @ZTC * 10000000; getitem .@credit_id, @ZTC; mes @header$; mes "Here you go!"; mes "Thank you for using our service."; close(); } } else { @ZTC = Zeny / 10000000; if (@ZTC == 0) goto L_LessZeny; else goto L_ConvertZTC; } break; case 2: goto L_ConvertCTZ_Main; break; default: L_Cancel: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Please do come back, Have a nice day!."; close; break; } end; } if(#CRED_Q == 1) { disable_items; setpcblock(PCBLOCK_COMMANDS, true, getcharid(3)); mes @header$; mes "Welcome back!, "+strcharinfo(0)+"."; mes "Do you have what I asked for?"; next; switch(prompt("Yes, here it is!:What do I need again?:I want to change Credit to Zeny.:Not yet.")){ case 255: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; case 1: if(Zeny < 100000000){ setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "I think you are missing something this is the list that i needed:"; mes "^FF0000100,000,000 Zeny^000000."; close; } next; mes @header$; mes "Congratulations, Enjoy your Intergalactical Passport."; mes " "; mes "You may now use Zeny to ^FF0000Credit^000000 services in a matter of time."; setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); Zeny -= 100000000; #CREDITPASSPORT = 1728000+ gettimetick(2); #CRED_Q = 0; close; break; case 2: mes @header$; mes "You will have to bring me the following:"; mes "^FF0000100,000,000 Zeny^000000."; next; setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "I suggest you look for Simon in Prontera. He is known as gumbling master that could provide you tickets."; mes " "; mes "I'll be waiting for you!"; close; break; case 3: goto L_ConvertCTZ_Main; break; case 4: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Okay, Hurry up!"; close; break; } } mes @header$; mes "Hello, It looks like you don't have an Intergalactical Passport yet."; mes " "; mes "Would you like to have one?"; next; switch(prompt("Yes, I'd like to have one.:Intergalactical Passport? What is that?:I want to change Credit to Zeny.:No thanks!")){ case 1: mes @header$; mes "Very well. You will have to bring me the following:"; mes "^FF0000100,000,000 Zeny^000000."; next; mes @header$; mes "I suggest you look for Simon in Prontera. He is known as gumbling master that could provide you tickets."; mes " "; mes "I'll be waiting for you!"; #CRED_Q = 1; close; break; case 2: mes @header$; mes "An Intergalactical Passport is required to use the Intergalactical currency: ^FF0000Credit^000000."; mes " "; mes "The value of ^FF0000Credit^000000 is equivalent to ^00008810,000,000^000000 Zeny."; next; mes @header$; mes "Once you have this passport, You can exchange Zeny to ^FF0000Credit^000000 with any Credits Agents in major towns."; next; mes @header$; mes "^FF0000NOTE^000000: That the passport is not required when exchanging ^FF0000Credit^000000 to Zeny."; next; mes @header$; mes "That contract will last for 20 days. After that time, You will have to renew your passport."; close; break; case 3: disable_items; setpcblock(PCBLOCK_COMMANDS, true, getcharid(3)); L_ConvertCTZ_Main: mes @header$; mes "The exchange rate is fixed and its 1 ^FF0000Credit^000000 = ^00008810,000,000^000000 Zeny."; mes " "; mes "How will you exchange your ^FF0000Credits^000000?"; next; .@i = prompt("Decide how many Credits to exchange.:Exchange all my Credits:Cancel"); if (.@i == 3) goto L_Cancel; else if (.@i == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } else if (.@i == 1) { mes @header$; mes "How many ^FF0000Credits^000000 do you want to exchange?"; mes " "; mes "^FF0000(Enter '0' to cancel transaction)^000000"; next; input @CTZ; if (@CTZ <= 0) goto L_Cancel; else if (@CTZ > countitem(.@credit_id)) { L_LessCredit: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "You don't have enough Credits."; close(); } else { @CTZ_ = Zeny%10000000; if (@CTZ_ > 0) @CTZ_ = ((MAX_ZENY/10000000) - (Zeny/10000000)) - 1; else @CTZ_ = (MAX_ZENY/10000000) - (Zeny/10000000); if (@CTZ > (MAX_ZENY/10000000) || @CTZ_ < @CTZ ) goto L_Exceed; if (@CTZ > countitem(.@credit_id)) goto L_LessCredit; L_ConvertCTZ: mes @header$; mes "You will be exchanging your ^FF0000"+@CTZ+" Credit"+(@CTZ != 1 ? "s":"")+"^000000."; mes " "; mes "Proceed?"; next; .@menu = prompt("I changed my mind:Proceed!"); if (.@menu == 1) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); close(); break; } if (.@menu == 255) { setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); break; } delitem .@credit_id, @CTZ; Zeny += 10000000 * @CTZ; message(strcharinfo(0), "You have received "+F_InsertComma(10000000 * @CTZ)+" Z."); setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Here you go!"; mes "Thank you for using our service."; close(); } close(); } else { @CTZ = countitem(.@credit_id); .@ZenyCap = (MAX_ZENY - Zeny) / 10000000; if (@CTZ == 0) goto L_LessCredit; if (@CTZ >= .@ZenyCap) @CTZ = .@ZenyCap; if (@CTZ == 0) goto L_Exceed; goto L_ConvertCTZ; } break; case 4: setpcblock(PCBLOCK_COMMANDS, false, getcharid(3)); mes @header$; mes "Please do come back, Have a nice day!."; close; break; } } // Duplicates //prontera,132,215,5 duplicate(Credit Agent) Credit Agent#prt 4_M_KHBOY market,99,53,6 duplicate(Credit Agent) Credit Agent#mall 4_M_KHBOY
-
Racaae's post in Help pls! NydhoggsNest was marked as the answer
Hello. https://pastebin.com/Cwrv0Mhd
-
Racaae's post in Error : script error on npc/custom/new_train_ground.txt line 402 need '(' was marked as the answer
Hi. "cooking" is a script command. You can't use it as a variable name. Just rename the variable to something else.
-
Racaae's post in Custom Points was marked as the answer
Hi. Yeah, giving custom points to things like Blacksmith' weapon forging, or Alchemist's potion creation is not possible with default scripting.
But if it's "crafting" using NPCs, its simple using variables.
"custom_points" is not the same as "@custom_points".
@variables are lost when the player logout.
Just remove the @ and the points will stay.
More here: (from \doc\script_commands.txt)
mes "Click me to gain points"; next; switch(select("- Get Points:- Cancel")){ case 1: mes "(script get points) +1 custom points"; // Increase the value by 1. Basically gives 1 point to the player custom_points += 1; close; case 2: mes "Cancel"; close; } More Examples:
mes "You got 3 points"; custom_points += 3; mes "You made the potion You got 1 point"; custom_points++; mes "You crafted the armor. You got 98346 points"; custom_points += 98346; mes "You did my task. You got 100 temporary points."; mes "You will lose them when you logout"; mes "They are unrelated to others points."; @custom_points += 100; mes "You crafted all the armors."; mes "You got 50 account points. Every character you have can spend them."; mes "They are unrelated to others points."; #custom_points += 50; Spending means losing, so just decrease the variable. Examples:
mes "Ok. I will give you the Emperium for 5 points"; custom_points -= 5; getitem "EMPELIUM", 1; mes "Ok. I will give you the 15 Apples for 1 point"; custom_points--; getitem "APPLE", 15; mes "Ok. I will give you the this special buff effect. You spent 8151 points for it."; custom_points -= 8151; sc_start SC_GLORIA,300000,5; mes "OK. You spent 100 points to unlock +10 DMG weapons chance."; weapon_points -= 100; unlocked_10_dmg = true;
-
Racaae's post in NPC summon another NPC was marked as the answer
The player chooses one of the items? Or the NPC chooses one? The player receives multiple items?
geffen,151,48,5 script First Person 1_M_LIBRARYMASTER,{ //Put the IDs of the item below. setarray .@items, 909, 910, 911, 912, 913, 914, 915; if (isnpccloaked("Second Person") == 0) { npctalk "You can talk to him.", strnpcinfo(0), bc_self; end; } mes "[First Person]"; mes "Hi, do you have all the items with you?"; next; for (.@i=0;.@i< getarraysize(.@items);.@i++) { if (countitem(.@items[.@i]) < 1) { mes "[First Person]"; mes "You don't have <ITEM>" + getitemname(.@items[.@i]) + "<INFO>" + .@items[.@i] + "</INFO></ITEM>."; close; } } mes "[First Person]"; mes "You have everything. I will call him."; close2; cutin "war_y1", 2; cloakoffnpcself( "Second Person" ); npctalk "Hello.", "Second Person", bc_self; end; } geffen,155,49,3 script Second Person 4_M_FAIRYKID5,{ //Put the IDs of the item below. setarray .@items, 909, 910, 911, 912, 913, 914, 915; //Put here the item IDs of the selection the player can choose from setarray .@reward, 714, 607, 12103; disable_items; mes "[Second Person]"; mes "Hi, the first person told me you have the items."; if (getarraysize(.@reward) > 1) { mes "You can exchange them for one of these:"; for (.@i=0;.@i< getarraysize(.@reward);.@i++) mes "- <ITEM>" + getitemname(.@reward[.@i]) + "<INFO>" + .@reward[.@i] + "</INFO></ITEM>"; next; .@menu$ = ""; for (.@i=0;.@i< getarraysize(.@reward);.@i++) .@menu$ += "- " + getitemname(.@reward[.@i]) + ":"; .@s = select(.@menu$) - 1; mes "[Second Person]"; } mes "Are you sure you want"; mes "<ITEM>" + getitemname(.@reward[.@s]) + "<INFO>" + .@reward[.@s] + "</INFO></ITEM>?"; next; if (select("No", "Yes, let's do this") == 1) { mes "[Second Person]"; mes "I see."; close2; cutin "", 255; cloakonnpcself; end; } for (.@i=0;.@i< getarraysize(.@items);.@i++) { if (countitem(.@items[.@i]) < 1) { mes "[Second Person]"; mes "You don't have <ITEM>" + getitemname(.@items[.@i]) + "<INFO>" + .@items[.@i] + "</INFO></ITEM>."; close2; cutin "", 255; cloakonnpcself; end; } } if ((MaxWeight - Weight) < 1000 || checkweight("Knife",1) == 0) { mes "^0000FF- You cannot continue due to your heavy weight. -^000000"; close2; cutin "", 255; cloakonnpcself; end; } for (.@i=0;.@i < getarraysize(.@items);.@i++) delitem .@items[.@i], 1; getitem .@reward[.@s], 1; mes "[Second Person]"; mes "Done."; close2; cutin "", 255; cloakonnpcself; end; OnInit: cloakonnpc; end; }