

Racaae
Members-
Posts
269 -
Joined
-
Last visited
-
Days Won
42
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by Racaae
-
Hello. You can use getmapunits and check for each player' guild to deliver the prize to winner guild members, Find this: warpguild "guild_vs1",49,53,$koegid; And add the following lines below it: getmapunits(BL_PC, "guild_vs1", .@gid); for(.@i = 0; .@i < getarraysize(.@gid); .@i++) { if (getcharid(2, convertpcinfo(.@gid[.@i],CPC_NAME)) == $koegid) { getitem 35002, 1, .@gid[.@i]; dispbottom "You have been rewarded for conquering KoE.", 0x000000, convertpcinfo(.@gid[.@i],CPC_CHAR); } } Also find and remove this line: getitem 35002,1; Save the file then use @reloadscript or restart the server.
-
Hi. The server is trying to find table named "rank_mvp", which does not exist. The table used in the script you shared is called "mvp". You need to pick a name to use, it cannot have two different names. In case you have more errors, drop/delete both tables "mvp" and "premio_mvp" and insert this code in any NPC: OnInit: query_sql "CREATE TABLE IF NOT EXISTS `mvp` (" + " `char_id` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(30) NOT NULL," + " `mvps` INT(11) DEFAULT 0," + " `pontos` INT(11) DEFAULT 0," + " `premio_mvp` INT(11) DEFAULT 0," + " PRIMARY KEY (`char_id`)" + " )"; query_sql "CREATE TABLE IF NOT EXISTS `premio_mvp` (" + " `id` INT(11) NOT NULL AUTO_INCREMENT," + " `historico` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(50) NOT NULL," + " `mvps` INT(11) NOT NULL," + " `pontos` INT(11) NOT NULL," + " PRIMARY KEY (`id`)" + " )"; end; } Then reload the NPCs. It's working fine here, I tested. - script mvppoint01 -1,{ OnNPCKillEvent: if (getgmlevel() >= 10 && getgmlevel() <= 98) { end; } setarray .@monsterID[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,1389,1418,1492,1511,1583,1623,1630,1658,1685,1688,1719,1785,1885,2068, 2800,2801,2802,2803,2844,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2830,2831,2832,2834,2839, 2850,2851,2852,2853,2894,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2880,2881,2882,2884,2889,2898; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if (killedrid == .@monsterID[@a]) { set @CID,getcharid(0);set @name$,""; query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`account_id`,`name`,`mvps`,`pontos`) VALUES ("+@CID+",'"+getcharid(3)+"','"+strcharinfo(0)+"',1,1)",@esc$; set #MVPPOINTS,#MVPPOINTS+1; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } query_sql "UPDATE `mvp` SET `mvps` = `mvps` +1,`pontos` = `pontos` +1 WHERE `char_id`="+@CID+"",@esc$; query_sql "SELECT `name`,`mvps`, `pontos` FROM `mvp` ORDER BY `pontos` DESC LIMIT "+$topmvp+"",@nick$,@kills,@mvppoints; set #MVPPOINTS,#mvppontos; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } end; OnInit: query_sql "CREATE TABLE IF NOT EXISTS `mvp` (" + " `char_id` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(30) NOT NULL," + " `mvps` INT(11) DEFAULT 0," + " `pontos` INT(11) DEFAULT 0," + " `premio_mvp` INT(11) DEFAULT 0," + " PRIMARY KEY (`char_id`)" + " )"; query_sql "CREATE TABLE IF NOT EXISTS `premio_mvp` (" + " `id` INT(11) NOT NULL AUTO_INCREMENT," + " `historico` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(50) NOT NULL," + " `mvps` INT(11) NOT NULL," + " `pontos` INT(11) NOT NULL," + " PRIMARY KEY (`id`)" + " )"; end; } - script mvppoint02 -1,{ OnNPCKillEvent: if(getgmlevel() >= 10 && getgmlevel() <= 98) { end; } setarray .@monsterID[0],1708,1734,1751,1768,1779,1832,1871,1917,1990,1991,2202, 2833,2835,2836,2837,2838,2840,2841, 2883,2885,5886,2887,2888,2890,2891,2895,2899; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set @CID,getcharid(0);set @name$,""; query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`account_id`,`name`,`mvps`,`pontos`) VALUES ("+@CID+",'"+getcharid(3)+"','"+strcharinfo(0)+"',1,3)",@esc$; set #MVPPOINTS,#MVPPOINTS+3; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } set #MVPPOINTS,#MVPPOINTS+3; query_sql "UPDATE `mvp` SET `mvps` = `mvps` +1,`pontos` = `pontos` +3 WHERE `char_id`="+@CID+"",@esc$; message strcharinfo(0),"[Ragnaeok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } } - script mvppoint03 -1,{ OnNPCKillEvent: if(getgmlevel() >= 10 && getgmlevel() <= 98) { end; } setarray .@monsterID[0],1646,1647,1648,1649,1650,1651,1874,1929,1956,1957,2022, 2824,2825,2826,2827,2828,2829,2843, 2874,2875,2876,2877,2878,2879,2893,2896,2897; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set @CID,getcharid(0);set @name$,""; query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`account_id`,`name`,`mvps`,`pontos`) VALUES ("+@CID+",'"+getcharid(3)+"','"+strcharinfo(0)+"',1,5)",@esc$; set #MVPPOINTS,#MVPPOINTS+5; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } set #MVPPOINTS,#MVPPOINTS+5; query_sql "UPDATE `mvp` SET `mvps` = `mvps` +1,`pontos` = `pontos` +5 WHERE `char_id`="+@CID+"",@esc$; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } } - script ranking_MVP_semanal -1,{ OnMon0406: query_sql "SELECT `account_id`,`name`,`mvps`,`pontos` FROM `mvp` WHERE `pontos`>='1' ORDER BY `pontos` DESC, `mvps` DESC LIMIT 0,1",$@MVPSemanal,$@MVPnome$,$@MVPsqt,$@MVPPts; if($@MVPSemanal) { set $historicomvp,$historicomvp+1; query_sql "UPDATE `mvp` SET `premio_mvp` = 607 WHERE `account_id`='"+$@MVPSemanal+"'"; Announce "Vencedor do ranking MvP semanal é: "+$@MVPnome$+", MvPs: "+$@MVPsqt+" Pontos: "+$@MVPPts+".",8; query_sql "UPDATE `mvp` SET `mvps`='0',`pontos`='0'"; query_sql "INSERT INTO `premio_mvp` (`historico`,`account_id`,`name`,`mvps`,`pontos`) VALUES ('"+$historicomvp+"','"+$@MVPSemanal+"','"+$@MVPnome$+"','"+$@MVPsqt+"','"+$@MVPPts+"')"; sleep2 4000; Announce "O Player "+$@MVPnome$+" receberá como prêmio: 1 "+getitemname(607)+".",8; end; } } //==================== prontera,127,213,5 script Ranking Mvp 857,{ if (getgmlevel() > 90) { mes "[^0000FFTop MvP "+$topmvp+"^000000]"; mes "O que deseja fazer?"; switch(select("Ver Top",(($a) ? "Desligar anúncio":"Ligar anúncio"),"Resetar Top MvP:Número de posições")) { case 1: break; case 2: set $a, ($a) ? 0 : 1; close; case 3: query_sql "TRUNCATE `mvp`"; close; case 4: mes "Digite o número de posições do top mvp."; input $topmvp; break; } next; } query_sql "SELECT `name`,`mvps`, `pontos` FROM `mvp` ORDER BY `pontos` DESC LIMIT "+$topmvp+"",.@names$,.@mvpkills,.@mvppontos; message strcharinfo(0), "---------------[Top MvP "+$topmvp+"]---------------"; for (set @c, 0; @c < $topmvp; set @c, @c + 1) { message strcharinfo(0),"-----------------------------------------------"; message strcharinfo(0), "("+(@c+1)+"º) Player: "+.@names$[@c]+" | Matou: "+.@mvpkills[@c]+" MvP's | Pontos: "+.@mvppontos[@c]+"."; } close; }
-
Hi, you can use getmapxy and unitskillusepos. Example: prontera,161,179,3 script Prontera Church Priest 4_GEFFEN_09,7,7,{ OnTouch: .@Delay = 25; // Delay, in seconds if (@HD > gettimetick(2)) { npctalk strnpcinfo(1) + " : " + strcharinfo(0) + " I've just buffed you! Wait some more time", strnpcinfo(0), bc_self; end; } if (.@Delay) @HD = gettimetick(2) + .@Delay; unitskillusepos .id,"PR_SANCTUARY",10,.x,.y,-10; sleep2 500; callsub S_Check; if (!getstatus(SC_BLESSING)) npcskill "AL_BLESSING",10,1,1; callsub S_Check; if (getstatus(SC_ORCISH) || getstatus(SC_POISON) || getstatus(SC_CURSE) || getstatus(SC_SILENCE) || getstatus(SC_CONFUSION) || getstatus(SC_BLIND) || getstatus(SC_BLEEDING)) { npcskill F_Rand("AL_CURE", "PR_STRECOVERY"),1,1,1; sc_end SC_ORCISH; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLEEDING; callsub S_Check; } npcskill "AL_INCAGI",10,1,1; callsub S_Check; npcskill "AL_ANGELUS",10,1,1; callsub S_Check; npcskill "PR_IMPOSITIO",5,1,1; callsub S_Check; npcskill "PR_SUFFRAGIUM",3,1,1; callsub S_Check; npcskill "PR_MAGNIFICAT",5,1,1; callsub S_Check; npcskill "PR_GLORIA",5,1,1; callsub S_Check; npcskill "PR_KYRIE",10,1,1; callsub S_Check; npcskill "HP_ASSUMPTIO",5,1,1; callsub S_Check; if (checkre(0)) { unitskillusepos .id,"AB_EPICLESIS",5,rand(.x-3,.x+3),rand(.y-3,.y+3),-10; callsub S_Check; npcskill "AB_RENOVATIO",4,1,1; callsub S_Check; npcskill "AB_SECRAMENT",5,1,1; callsub S_Check; } npctalk strnpcinfo(1) + " : Come back anytime " + strcharinfo(0) + "!", strnpcinfo(0), bc_self; end; S_Check: sleep2 rand(700,2000); getmapxy(.@pc_map$,.@pc_x, .@pc_y); if (distance(.x,.y,.@pc_x,.@pc_y) > 7) { npctalk strnpcinfo(1) + " : " + strcharinfo(0) + " I'm not walking just to buff you. Please come closer.", strnpcinfo(0), bc_self; end; } return; OnInit: .id = getnpcid(0, strnpcinfo(0)); getmapxy(.map$, .x, .y, BL_NPC); end; }
-
Hi //===== Script for rAthena by Racaae ========================= //= Enchant Transferer //= https://rathena.org/board/topic/142357-question-about-transfer-enchant-npc-random-option/ //===== Additional Comments: ================================= //= Modified from Sader1992' enchant npc //= 1.1 = Added option to transfer all effects at same time; Option //= to enable only 1 type of tranfer; and option to enforce same //= equipment type only. //============================================================ prontera,165,215,5 script Enchant Transferer 4_BULL,{ disable_items; mes "[Enchant Transferer]"; mes "Hello! Do you want to ^0000FFtransfer " + .s$[.TransferType] + "^000000 from your equipped item to another item?"; mes "The process has no chance of failure and items keep their refine, cards and other effects."; if (.ZenyCost) mes "This will cost ^0000FF" + F_InsertComma(.ZenyCost) + "z^000000 only!"; next; if (.TransferType == 2) { if (select("Random Option Transfer", "Enchant Socket Transfer", "Cancel") == 3) close; } if (.TransferType == 1 || @menu == 1) .@mode = true; mes "[Enchant Transferer]"; mes "Which equipped item has the " + .s$[.@mode] + "s?"; for(.@i = 0; .@i < getarraysize(.loc_names$); .@i++) { if (getequipid(.loc_EQI[.@i])>-1) set .@armor_menu$, .@armor_menu$ + .loc_names$[.@i] + " [ ^E81B02" + getitemname(getequipid(.loc_EQI[.@i])) + "^000000 ]:"; else set .@armor_menu$, .@armor_menu$ + .loc_names$[.@i] + " [ ^D6C4E8" + "No Equip" + "^000000 ]:"; } .@input_loc = select(.@armor_menu$) -1; clear; mes "[Enchant Transferer]"; if (getequipid(.loc_EQI[.@input_loc]) < 0){ mes "You don't have item equipped there."; close; } .@item = getequipid(.loc_EQI[.@input_loc]); .@refine = getequiprefinerycnt(.loc_EQI[.@input_loc]); .@card0 = getequipcardid(.loc_EQI[.@input_loc],0); .@card1 = getequipcardid(.loc_EQI[.@input_loc],1); .@card2 = getequipcardid(.loc_EQI[.@input_loc],2); .@card3 = getequipcardid(.loc_EQI[.@input_loc],3); for(.@i=0; .@i < (MAX_ITEM_RDM_OPT); .@i++) { .@r_id[.@i] = getequiprandomoption(.loc_EQI[.@input_loc],.@i,ROA_ID); .@r_v[.@i] = getequiprandomoption(.loc_EQI[.@input_loc],.@i,ROA_VALUE); .@r_p[.@i] = getequiprandomoption(.loc_EQI[.@input_loc],.@i,ROA_PARAM); if (.@r_id[.@i]) .@r_LastOcupedSlot = .@i; } if (.@mode) { if (getarraysize(.@r_id) == 0) { mes "This item has no Random Options..."; close; } if (getarraysize(.@r_id) == 1) .@HasOnlyOneEnchant = true; } else if (!.@card0 && !.@card1 && !.@card2 && !.@card3) { mes "This item has no enchants..."; close; } if (.CanChoose) { if (!.@HasOnlyOneEnchant) { mes "Which effect 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$ += ":"; } } else { for(.@i=0; .@i < 4; .@i++) { if (getequipcardid(.loc_EQI[.@input_loc], .@i)) .@slot_menu$ += "[ ^E81B02" + getitemname(getequipcardid(.loc_EQI[.@input_loc],.@i)) + "^000000 ]:"; else .@slot_menu$ += ":"; } } .@input_slot = select(.@slot_menu$) -1; set .@item, getequipid(.loc_EQI[.@input_loc]); clear; mes "[Enchant Transferer]"; } } else mes "All " + .s$[.@mode] + "s from this item will be transferred."; if (.AnyEquip) { .@armor_menu$ = ""; for(.@i=0; .@i < getarraysize(.loc_names$); .@i++) .@armor_menu$ += .loc_names$[.@i] + ":"; .@output_type = select(.@armor_menu$) -1; } else .@output_type = .@input_loc; 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; .@item_type = getiteminfo(.@item_id, ITEMINFO_LOCATIONS); if (.@item_type & .loc_EQP[.@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 "But there are no items of this category in your inventory."; mes "The transfer can't happen."; close; } mes "To what item in your inventory you want to transfer?"; next; .@index = select(implode(.@menu_labels$, ":")) - 1; .@output_id = .@equipment_id_list[.@index]; mes "[Enchant Transferer]"; mes "You selected " + getitemname(.@output_id) + "."; if (countitem(.@output_id) > 1) { mes "You have more than one of this item."; mes "I won't touch items that you have more than one with you. It's to avoid mistakes."; 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 "[Enchant Transferer]"; if (.@mode) { if (!.CanChoose && !.@HasOnlyOneEnchant) { mes "Transfer:"; for(.@i = 0; .@i < MAX_ITEM_RDM_OPT; .@i++) { if (.@r_id[.@i]) mes "* ^FF7700" + F_RDMOPT_Name(.@r_id[.@i],.@r_v[.@i]) + "^000000"; } } else { if (.@HasOnlyOneEnchant) .@input_slot = .@r_LastOcupedSlot; mes "Transfer: ^FF7700" + F_RDMOPT_Name(.@r_id[.@input_slot],.@r_v[.@input_slot]) + "^000000"; } } else mes "Transfer: " + mesitemlink(getequipcardid(.loc_EQI[.@input_loc], .@input_slot)); mes "^FF0000From: " + (.@refine?"+" + .@refine + " ":"") + getitemname(getequipid(.loc_EQI[.@input_loc])) + "^000000"; mes "^0000FFTo: " + (.@output_refine?"+" + .@output_refine + " ":"") + getitemname(.@output_id) + "^000000"; mes "Are you sure?"; next; if(select("Cancel.", "Confirm") == 1) close; mes "[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", .loc_EQI[.@input_loc], .@item) || callfunc("F_IsEquipCardHack", .loc_EQI[.@input_loc], .@card0, .@card1, .@card2, .@card3) || callfunc("F_IsEquipRefineHack", .loc_EQI[.@input_loc], .@refine) || countitem(.@output_id) != 1) { mes "[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) { if (.CanChoose || getarraysize(.@r_id) < 2) { .@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 { copyarray .@output_r_id[0], .@r_id[0], MAX_ITEM_RDM_OPT; copyarray .@output_r_v[0], .@r_v[0], MAX_ITEM_RDM_OPT; copyarray .@output_r_p[0], .@r_p[0], MAX_ITEM_RDM_OPT; deletearray .@r_id[0], MAX_ITEM_RDM_OPT; deletearray .@r_v[0], MAX_ITEM_RDM_OPT; deletearray .@r_p[0], MAX_ITEM_RDM_OPT; } } else { setd(".@output_card" + .@output_slot, getd(".@card" + .@input_slot)); setd(".@card" + .@input_slot, 0); } delequip .loc_EQI[.@input_loc]; delitem .@output_id, 1; getitem3 .@item, 1, 1, .@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 "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 .loc_names$, "Upper Headgear","Middle Headgear","Lower Headgear","Weapon","Left Hand","Armor","Garment","Shoes","Accessory Left","Accessory Right"; setarray .loc_EQI, EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_HAND_R,EQI_HAND_L,EQI_ARMOR,EQI_GARMENT,EQI_SHOES,EQI_ACC_L,EQI_ACC_R; .TransferType = 1; //0=Socket Enchant only / 1=Random Option only / 2=Both .CanChoose = false; //if true then can choose which effects to transfer .ZenyCost = 500000; //if you don't want zeny requirment set it to 0 .AnyEquip = false; //if true then can transfer to any equipment type .Overwrite = true; //if true then you can overwrite the enchant .progress_time = 3; //the time (seconds) that needed to wait until the end //--------------------------------------------------------------// //--------------------------------------------------------------// setarray .s$, "enchantment", "Random Option", "random option or socket enchantment"; for(.@i = 0; .@i < getarraysize(.loc_EQI); .@i++) { switch(.loc_EQI[.@i]) { case EQI_HEAD_TOP: .loc_EQP[.@i] = EQP_HEAD_TOP; break; case EQI_ARMOR: .loc_EQP[.@i] = EQP_ARMOR; break; case EQI_HAND_L: .loc_EQP[.@i] = EQP_HAND_L; break; case EQI_HAND_R: .loc_EQP[.@i] = EQP_HAND_R; break; case EQI_GARMENT: .loc_EQP[.@i] = EQP_GARMENT; break; case EQI_SHOES: .loc_EQP[.@i] = EQP_SHOES; break; case EQI_ACC_L: .loc_EQP[.@i] = EQP_ACC_L; break; case EQI_ACC_R: .loc_EQP[.@i] = EQP_ACC_R; break; case EQI_HEAD_MID: .loc_EQP[.@i] = EQP_HEAD_MID; break; case EQI_HEAD_LOW: .loc_EQP[.@i] = EQP_HEAD_LOW; break; case EQI_COSTUME_HEAD_LOW: .loc_EQP[.@i] = EQP_COSTUME_HEAD_LOW; break; case EQI_COSTUME_HEAD_MID: .loc_EQP[.@i] = EQP_COSTUME_HEAD_MID; break; case EQI_COSTUME_HEAD_TOP: .loc_EQP[.@i] = EQP_COSTUME_HEAD_TOP; break; case EQI_COSTUME_GARMENT: .loc_EQP[.@i] = EQP_COSTUME_GARMENT; break; case EQI_SHADOW_ARMOR: .loc_EQP[.@i] = EQP_SHADOW_ARMOR; break; case EQI_SHADOW_WEAPON: .loc_EQP[.@i] = EQP_SHADOW_WEAPON; break; case EQI_SHADOW_SHIELD: .loc_EQP[.@i] = EQP_SHADOW_SHIELD; break; case EQI_SHADOW_SHOES: .loc_EQP[.@i] = EQP_SHADOW_SHOES; break; case EQI_SHADOW_ACC_R: .loc_EQP[.@i] = EQP_SHADOW_ACC_R; break; case EQI_SHADOW_ACC_L: .loc_EQP[.@i] = EQP_SHADOW_ACC_L; break; } } end; }
-
Script: | skill "MC_PUSHCART",9; skill "MC_VENDING",4; EquipScript: | if (!checkcart()) setcart 1; UnEquipScript: | setcart 0;
-
The client couldn't find the icon image for the item. You have to add it in data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\ Example: data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\merchant.bmp merchant.bmp
-
Hi. Open the file \db\import\item_db.yml and add this code at the end of the file. This is the file you add all your custom items. Then save the file and use @reloaditemdb. - Id: 11314 AegisName: Merchant_Card Name: Carta do Mercador Type: Card Buy: 20 Weight: 10 Locations: Right_Hand: true Flags: BuyingStore: true DropEffect: CLIENT Script: | skill "MC_PUSHCART",9; skill "MC_VENDING",4; Make sure the following code is in the correct file: client_folder/system/iteminfo.lua or iteminfo.lub [11314] = { unidentifiedDisplayName = "Merchant Card", unidentifiedResourceName = "À̸§¾ø´ÂÄ«µå", unidentifiedDescriptionName = { "" }, identifiedDisplayName = "Merchant Card", identifiedResourceName = "À̸§¾ø´ÂÄ«µå", identifiedDescriptionName = { "Carta do Mercador. Permite o uso ", "da habilidade Usar Carrinho em Nível 9", "e Comércio em Nível 4.", "Class: ^777777Card^000000", "Compound on: ^777777Accessory^000000", "Peso: ^7777771^000000" }, slotCount = 0, ClassNum = 0 }, No need to add accessory files. Those are for equipment only.
-
Hi morocc,144,101,5 script Anxerous 4_F_RUSGREEN,{ .@time = 20; //Duration (minutes) .@SumPrice = 200000; //Zeny amount needed .@CashPrice = 50; //CASH amount needed // "<Type>", mob ID, "<Description>", setarray .@mobs$, "^FF6600Fire", 1646, "อัศวินผู้ใช้ดาบที่ถูกไฟเผาไหม้ มี HP สูงและพลังโจมตีที่แข็งแกร่ง เขาใช้ทักษะคุณสมบัติไฟในการโจมตีศัตรูและเพิ่มพลังโจมตีของตัวเอง", "^9ACD32Wind", 1650, "นักธนูหญิงที่มีปีก 4 ข้างซึ่งใช้ธนูยิงลูกศร เธอมี AGI และ DEX สูง ทำให้การโจมตีของเธอรวดเร็วและแม่นยำ", "^4876FFWater", 1779, "ปลายักษ์ที่มี HP สูงและพลังโจมตีที่แข็งแกร่ง มันใช้ทักษะคุณสมบัติน้ำในการโจมตีศัตรูและรักษาตัวเอง มันยังมีความต้านทานน้ำสูงด้วย", "^8B5A2BEarth", 1648, "ช่างตีเหล็กที่ใช้ค้อน เขามี VIT และ DEF สูง ทำให้ทนทาน เขาใช้ทักษะคุณสมบัติดินในการโจมตีและเพิ่มพลังป้องกันของตัวเอง เขายังสร้างอุปกรณ์ได้อีกด้วย", "^5D478BShadow", 2022, "เงาที่มี AGI และ LUK สูง ใช้ทักษะคุณสมบัติเงาเพื่อโจมตีและลดค่าสถานะของศัตรู นอกจากนี้ยังซ่อนตัวและโจมตีทันทีได้อีกด้วย", "^FFC125Holy", 1649, "นักบวชหญิงที่ใช้ไม้เท้า เธอมี INT สูงและรักษาพันธมิตร เธอใช้ทักษะคุณสมบัติศักดิ์สิทธิ์เพื่อโจมตีมอนสเตอร์อันเดดและสนับสนุนพันธมิตร", "^8B1A1AUndead", 1272, "อัศวินแห่งความมืดที่มี HP สูงและพลังโจมตีที่แข็งแกร่ง เขาใช้ทักษะคุณสมบัติอันเดดเพื่อโจมตีสิ่งมีชีวิตและดูดซับ HP ของพวกมัน เขายังต้านทานการโจมตีศักดิ์สิทธิ์ได้อีกด้วย", "^9F79EEGhost", 1651, "นักเวทย์หญิงที่มี INT และ MATK สูง เธอใช้ทักษะคุณสมบัติทางจิตวิญญาณเพื่อโจมตีและลดพลังของศัตรู เธอยังสร้างภาพลวงตาและเทเลพอร์ตได้อีกด้วย", "^CD00CDPoison", 1647, "นักฆ่าที่ใช้มีดสั้นที่เคลือบพิษ เขามีค่า AGI และ LUK สูง ทำให้โจมตีได้เร็วและคริติคอล เขาใช้ทักษะคุณสมบัติพิษเพื่อสร้างสถานะผิดปกติให้กับศัตรูและหลบเลี่ยงการโจมตี เขายังสามารถซ่อนตัวและโจมตีทันทีได้อีกด้วย", "^4F4F4FNeutral", 1623, "หุ่นยนต์ที่ใช้อาวุธต่างๆ ได้ มีสถิติและทักษะที่สมดุล สามารถโจมตีและป้องกันได้อย่างมีประสิทธิภาพ นอกจากนี้ยังทำลายตัวเองเพื่อสร้างความเสียหายอย่างรุนแรงให้กับศัตรูรอบข้างได้อีกด้วย"; mes "[ ^3AA32CAnxerous^000000 ]"; mes "สวัสดี ^80FF00" + strcharinfo(0) + "^000000."; mes "ฉันคือผู้ควบคุมธาตุ ที่สามารถเรียก Guardian มาช่วยเหลือคุณได้"; next; mes "[ ^3AA32CAnxerous^000000 ]"; mes "มันจะอยู่กับคุณเป็นเวลา " + .@time + " นาที"; if (.@SumPrice && .@CashPrice) mes "ราคาคือ ^000088" + F_InsertComma(.@SumPrice) + " Zeny ^000000 หรือ ^FF0000" + F_InsertComma(.@CashPrice) + " CASH points ^000000. คุณเลือกได้เลย"; else if (.@CashPrice) mes "ราคาคือ ^000088" + F_InsertComma(.@CashPrice) + " CASH points ^000000"; else mes "ราคาคือ ^FF0000" + F_InsertComma(.@SumPrice) + " Zeny ^000000"; mes "คุณต้องการเรียก Guardian หรือไม่?"; switch(select((.@SumPrice?"^FF0000•^000000 ใช่ ฉันจะจ่ายเป็น Zeny":""), (.@CashPrice?"^FF0000•^000000 ใช่ ฉันจะจ่ายเป็น CASH":""), "^FF0000•^000000 ยกเลิก")) { case 1: .@zeny = true; break; case 2: break; case 3: goto OnCancel; } clear; mes "[ ^3AA32CAnxerous^000000 ]"; mes "คุณต้องการ Guardian ประเภทไหน?"; .@menu$ = ""; for (.@i = 0; .@i < getarraysize(.@mobs$); .@i += 3) .@menu$ += "^FF0000•^000000 " + .@mobs$[.@i] + "^000000 Property:"; .@menu$ += "^FF0000•^000000 ยกเลิก"; .@s = (select(.@menu$) - 1) * 3; if (.@s >= getarraysize(.@mobs$)) goto OnCancel; clear; mes "[ ^3AA32CAnxerous^000000 ]"; mes .@mobs$[.@s+2]; mes "คุณแน่ใจหรือไม่ว่าต้องการเรียก Guardian ประเภท " + .@mobs$[.@s] + " ^000000?"; next; if(select("^FF0000•^000000 เรียก","^FF0000•^000000 ยกเลิก") == 2) goto OnCancel; mes "[ ^3AA32CAnxerous^000000 ]"; if (.@zeny && Zeny < .@SumPrice) { mes "^FF0000คุณมี Zeny ไม่เพียงพอ ^000000"; close; } if (!.@zeny && #CASHPOINTS < .@CashPrice) { mes "^FF0000คุณมี CASH ไม่เพียงพอ ^000000"; close; } mes "เริ่มกันเลย ลองเรียกมันออกมาสิ"; close2; specialeffect EF_FLOWERCAST; sleep2 300; if (.@zeny) { if (Zeny < .@SumPrice) { mes "^FF0000คุณมี Zeny ไม่เพียงพอ... ^000000"; close; } Zeny -= .@SumPrice; } else { if (#CASHPOINTS < .@CashPrice) { mes "^FF0000คุณมี CASH ไม่เพียงพอ... ^000000"; close; } #CASHPOINTS -= .@CashPrice; } .@gid = summon("--en--", atoi(.@mobs$[.@s+1]), .@time * 60000); #summons[getarraysize(#summons)] = .@gid; deltimer strnpcinfo(0) + "::OnTeleport"; sleep2 1; addtimer 10000, strnpcinfo(0) + "::OnTeleport"; setarray .@chat$, "ข้าขอเรียกเจ้า!", "ข้าขอร้องให้ท่านมา!", "จงตอบรับการเรียกขาน!", "จงฟังคำขอร้องของข้า!", "จงออกมา!", "จงปรากฏต่อหน้าข้า!", "ข้าขอวิงวอนท่าน!", "จงช่วยข้า!", "จงให้พลังของท่านแก่ข้า!"; unittalk getcharid(3), "" + strcharinfo(0) + " : " + .@chat$[rand(getarraysize(.@chat$))], bc_self; end; OnCancel: clear; mes "[ ^3AA32CAnxerous^000000 ]"; mes "เข้าใจแล้ว ลาก่อน"; close; OnPCLoginEvent: OnTeleport: .@s = getarraysize(#summons); if (!.@s) end; getmapxy .@map$, .@x, .@y; copyarray .@summons[0], #summons[0], .@s; for( .@i = 0; .@i < .@s; .@i++ ) { if (unitexists(.@summons[.@i])) { getunitdata .@summons[.@i], .@mob; .@d = distance(.@x,.@y,.@mob[UMOB_X],.@mob[UMOB_Y]); if (mapid2name(.@mob[UMOB_MAPID]) != strcharinfo(3) || .@d > 14) unitwarp .@summons[.@i],.@map$, .@x, .@y; } else deletearray #summons[.@i], 1; } if (getarraysize(#summons)) { deltimer strnpcinfo(0) + "::OnTeleport"; sleep2 1; addtimer 10000, strnpcinfo(0) + "::OnTeleport"; } end; }
-
Run this in your database to fix the error in the image. ALTER TABLE `mob_db` ADD COLUMN `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL ; ALTER TABLE `mob_db2` ADD COLUMN `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL ; ALTER TABLE `mob_db_re` ADD COLUMN `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL ; ALTER TABLE `mob_db2_re` ADD COLUMN `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL ; Make sure your database is up to date by importing the latest files in \sql-files\upgrades.
-
Hi. You can search in your server files for how a item effect is scripted. Let's try to find Turtle General Card effect! There's 3 files for items. \db\re\item_db_usable.yml \db\re\item_db_equip.yml \db\re\item_db_etc.yml I found Turtle General Card in \db\re\item_db_etc.yml - Id: 4305 AegisName: Turtle_General_Card Name: Turtle General Card Type: Card Buy: 20 Weight: 10 Locations: Right_Hand: true Flags: BuyingStore: true DropEffect: CLIENT Script: | bonus2 bAddClass,Class_All,20; bonus3 bAutoSpell,"SM_MAGNUM",10,30; The Script part is what we are looking for. This card has 2 effects. And the Script also has 2 lines. # This item script is for the effect "ATK +20%": bonus2 bAddClass,Class_All,20; # This item script is for the effect "Add the chance of auto casting level 10 Magnum Break on enemy when doing Physical Attack.": bonus3 bAutoSpell,"SM_MAGNUM",10,30; After some search we discovered the item script for Turtle General effect card! You can check for the player BaseJob to make a extra effect for specific jobs. if (BaseJob == Job_Star_Gladiator) { # Extra effect for star gladiator and star emperor } Example: - Id: 2230000 AegisName: Turtle_General_Custom_Hat Name: Turtle General Custom Hat Type: Armor Locations: Head_Top: true ArmorLevel: 1 Refineable: true Script: | bonus2 bAddClass,Class_All,20; if (BaseJob == Job_Star_Gladiator) { bonus3 bAutoSpell,"SM_MAGNUM",10,30; }
-
Hi. rAthena does not update database sql files everytime there's new entries. You need to do it yourself. Open yaml2sql.exe in your server folder. It is used to convert yml files to sql files. Press Y to convert (and replace) the following files one by one: db/re/item_db_usable.yml db/re/item_db_equip.yml db/re/item_db_etc.yml db/re/mob_db.yml Then import the four .sql files in /sql-files to your database.
-
Hi. There's no specific class for MVP monster. MVPs are boss monsters. You can use the same bonus effect in your example. \doc\item_bonus.txt * Class (c) Class_Normal, Class_Boss, Class_Guardian, Class_All
-
Use a variable to track when the player delivers all the items. Put a if statement for said variable so that the NPC skips the whole items code and teleport the player directly. if (my_variable == 0) { mes "You don't have the variable..."; mes "You didn't do the quest!"; mes "Let's do the quest now."; my_variable = 1; close; } //Player can only get to this part if they have my_variable set. mes "You did the quest!"; mes "Go ahead."; lhz_dun03,239,78,4 script Bio Entrance 651,{ function F_Warp; if (countitem(501) > 0) goto case_1; end; case_1: //F_Warp("<map>",<x>,<y>,<item 1 ID>,<item 1 amount>{,<item 2 ID>,<item 2 amount>{...}} F_Warp("lhz_dun04",244,61,501,1,971,1,6471,1,7347,2,7345,3,6470,1); end; function F_Warp { .@map$ = getarg(0,""); .@x = getarg(1,0); .@y = getarg(2,0); if (bio_entrance_unlocked == false) { //This loop fills a array with all the needed items for(.@i = 3; .@i < getargcount(); .@i += 2) { .@items[.@i2] = getarg(.@i); .@amount[.@i2] = getarg(.@i + 1); .@i2++; } //This loop checks for each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) { if (countitem(.@items[.@i]) < .@amount[.@i]) { if (!.@header) { mes "I don't have enough items to use this warp. I still need:"; .@header = true; } mes .@amount[.@i] + " " + mesitemlink(.@items[.@i]); .@missing = true; } } if (.@missing) return; //This loop removes each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) delitem .@items[.@i], .@amount[.@i]; bio_entrance_unlocked = true; //warp unlocked! } warp .@map$, .@x, .@y; return; } }
-
Regarding the Chat/PUB Room, I don’t really know what its function is.
Racaae replied to Mice's question in Source Support
Try chatID. if( sd->chatID ) -
Find and edit this line. F_Warp("lhz_dun04",244,61,501,1,971,1,6471,1,7347,2,7345,3,6470,1); Each value is separated by "," (comma). The 1st value is for which map to teleport. In this case "lhz_dun04". The 2nd value is the x coordenate to warp the player in the map: 244. The 3rd value is the y coordenate to warp the player in the map: 61. The 4th value is the ID of the item requirement: 501 (Red Potion) The 5th value is the amount of the item in the previous parameter: 1 (need 1 Red Potion) The following values are for other items. This is where you put any item you want. 6th: 971 (Detrimindexta) 7th: 1 (need 1 Detrimindexta) 8th: 6471 (Goast_Chill) 9th: 1 (need 1 Goast_Chill) 10th: 7347 (Research Chart) 11th: 2 (need 2 Research Chart) Example: I want to make a warp to Geffen, the player need 15 Jellopy (item ID 909) and 84 Coals (item ID 1003). F_Warp("geffen",50,40,909,15,1003,84);
-
Make the function support more items, using arrays and loops. lhz_dun03,239,78,4 script Bio Entrance 651,{ function F_Warp; if (countitem(501) > 0) goto case_1; end; case_1: //F_Warp("<map>",<x>,<y>,<item 1 ID>,<item 1 amount>{,<item 2 ID>,<item 2 amount>{...}} F_Warp("lhz_dun04",244,61,501,1,971,1,6471,1,7347,2,7345,3,6470,1); end; function F_Warp { .@map$ = getarg(0,""); .@x = getarg(1,0); .@y = getarg(2,0); //This loop fills a array with all the needed items for(.@i = 3; .@i < getargcount(); .@i += 2) { .@items[.@i2] = getarg(.@i); .@amount[.@i2] = getarg(.@i + 1); .@i2++; } //This loop checks for each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) { if (countitem(.@items[.@i]) < .@amount[.@i]) { if (!.@header) { mes "I don't have enough items to use this warp. I still need:"; .@header = true; } mes .@amount[.@i] + " " + mesitemlink(.@items[.@i]); .@missing = true; } } if (.@missing) return; //This loop removes each item needed for (.@i = 0; .@i < getarraysize(.@items); .@i++) delitem .@items[.@i], .@amount[.@i]; warp .@map$, .@x, .@y; return; } }
-
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; }
-
Disable this NPC in \npc\re\instances\WolfchevLaboratory.txt: // Warp portal to the 4th Fl. //============================================================ lhz_dun03,239,78,1 script lhz_dun03_lhz_dun04 WARPNPC,1,1,{ end; OnTouch: if (lght_duk01 > 0 && lght_duk01 < 6) { mes "In order to investigate human experimentation, I had to go down whilst I didn't want to because of gruesome sound."; close2; if (lght_duk01 < 3) { warp "que_lhz", 245, 56; } else if (lght_duk01 == 3) { warp "que_lhz", 96, 136; } else { warp "que_lhz", 148, 215; } } else { if (lhz_curse < 31) { mes "- Whistling sound -"; mes "From below, there comes a gruesome sound mingling with the wind."; close2; } warp "lhz_dun04", 245, 56; } end; }
-
[Error]: npc_parsesrcfile: Unknown syntax in file
Racaae replied to maciel's question in Scripting Support
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: -
Hello. Try to understand the code. Feel free to ask about what you don't understand. //===== Script for rAthena by Racaae ========================= //= https://rathena.org/board/topic/142576-need-help-for-custom-refiner/ //===== Additional Comments: ================================= //= Modified from Euphy' Ticket Refiner //============================================================ prontera,160,160,3 script Custom Refiner 4_F_MORAFINE2,{ setarray .@list, //RefineCost, MaxRefine, RefinableEquip, 501, 10, 1001, 503, 10, 1002; disable_items; // Greetings mes "[Custom Refiner]"; mes "Hello! What's up?"; mes "I'm a refiner for specific items using specific catalysts."; mes "You don't have to worry! It's by +1 with a ^006400100% success rate^000000."; next; if(select("Which items do you refine?", "Refine") == 1) { mes "[Custom Refiner]"; mes "I can refine the following:"; for ( .@i = 0; .@i < getarraysize(.@list); .@i += 3 ) { mes "- [" + mesitemlink(.@list[.@i+2], false) + "] using"; mes "[" + mesitemlink(.@list[.@i], false) + "] up to +" + .@list[.@i+1] + "."; } if (.@i = getarraysize(.@list)) close; if (!.@i%3) { next; mes "[Custom Refiner]"; } } mes "[Custom Refiner]"; mes "Which equipment would you like to refine?"; //Use a array to store and show equips the player is using setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower"; setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for ( .@i = 1; .@i <= 10; ++.@i ) .@menu$ += (getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : .@position$[.@i] + "- [Empty]") + ":"; //Saves which equipment the player chose .@part = .@indices[ select(.@menu$) ]; clear; if (!getequipisequiped(.@part)) { mes "[Custom Refiner]"; mes "You have to equip the item you want to refine."; close; } //Find player's equipment in the list of refinable options. for ( .@i = 2; .@i < getarraysize(.@list); .@i += 3 ) { if (getequipid(.@part) == .@list[.@i]) { .@cost = .@list[.@i-2]; .@max = .@list[.@i-1]; break; } } if (!.@cost) { mes "[Custom Refiner]"; mes "Oh, I'm sorry."; mes "This item is impossible for me to refine."; close; } .@refineitemid = getequipid(.@part); // save id of the item .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count if (countitem(.@cost) == 0) { mes "[Custom Refiner]"; mes "I need the [" + mesitemlink(.@cost, false) + "] to refine this item..."; mes "See you later!"; close; } if (getequiprefinerycnt(.@part) >= .@max) { mes "[Custom Refiner]"; mes "^8B4513This item is already refined as much as your deed.^000000"; close; } mes "[Custom Refiner]"; mes "I'm going to refine your ^006400" + getequipname(.@part) + "^8B4513 using the " + mesitemlink(.@cost) + "."; mes "May I proceed?"; next; if (select("No.", ":Yes.") == 1) close; if (countitem(.@cost) < 1) { mes "Error!"; mes "Please report this."; close; } delitem .@cost,1; // anti-hack if (F_IsEquipIDHack(.@part, .@refineitemid) || F_IsEquipRefineHack(.@part, .@refinerycnt)) { mes "[Custom Refiner]"; emotion ET_FRET; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } specialeffect EF_GANBANTEIN; specialeffect2 EF_PROVIDENCE; successrefitem .@part; mes "[Custom Refiner]"; mes "Alright, here it is~"; close; } Add this in \db\import\item_db.yml: (Remove the first line if your file already has Body:) Body: - Id: 1001 Refineable: false - Id: 1002 Refineable: false
-
At the end. After everything else.
-
Hi. Add this in \db\import\skill_db.yml. Then save the file and use @reloadskilldb and @reloadstatusdb or restart the server. (Remove the first line if your file already has Body:) Body: - Id: 271 Description: Asura Strike Duration1: 0 Duration2: 0
-
First we need to save in a variable which mvp was summoned. Find this line set Zeny, Zeny - .zeny[.mobze[.@m]]; And add below it: ultimo_mvp_invocado = .mobid[.@m]; Then insert it in the menu options when the player talks to NPC again. Find this line set .@m,select(.smenu$) - 1; And add above it: .@last = inarray(.mobid, ultimo_mvp_invocado); if (.@last > -1) { .@t$ = "^0000FF(Último) " + strmobinfo(1,.mobid[.@last]) + "^000000"; .@m = select(.@t$, .smenu$) - 2; if (.@m == -1) .@m = .@last; } else
-
Changing weapons and not removing the enchantment
Racaae replied to Kater's question in General Support
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 -
Hi. Find this line: .fix_custom_sprite = true; // se o seu servidor tem sprites animados personalizados que se sobrepõem à animação da estátua repetidamente, ative isso And add this code below it: // Restrict the gain of MVP points on some specific maps. setarray $@mvp_mapas_restritos$, "prontera", "geffen", "pay_arche"; Find all OnNPCKillEvent: lines in the file and add below them: if (inarray($@mvp_mapas_restritos$, strcharinfo(3)) > -1) end;