//===== rAthena Script =======================================
//= Sample Random Option Script
//===== Description: =========================================
//= Enchant a weapon with a random element option
//= to a weapon with no random option.
//===== Changelogs: ==========================================
//= 1.0 First version. [Secretdataz]
//============================================================
prontera,162,195,4 script Elemental Master 1_M_WIZARD,{
disable_items;
mes "[Elemental Master]";
mes "I could enchant your weapon with an element.";
mes "Are you interested?";
next;
if(select("Yes, I'm interested in that.") == 1){
.@id = getequipid(EQI_HAND_R);
for(.@i = 0; .@i < .sz; ++.@i){
if(.@id == .alloweditems[.@i])
.@allowed = 1;
}
mes "[Elemental Master]";
if(.@id == -1) {
mes "You are not holding anything in your hand.";
close;
} else if(!.@allowed){
mes "Your item can't be enchanted.";
close;
} else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID)){
mes "Your weapon has already been enchanted.";
close;
}
mes "Do you want to enchant your " + getitemname(.@id) + " with a random element?";
next;
if(select("Yes, proceed.") == 1){
mes "[Elemental Master]";
mes "*mumble mumble*";
progressbar "#00FF00",2;
next;
setrandomoption(EQI_HAND_R,0,RDMOPT_WEAPON_ATTR_NOTHING + rand(10),0,0);
mes "[Elemental Master]";
mes "Here's your weapon";
close;
}
close;
}
else{
close;
}
OnInit:
setarray .alloweditems[0],1201,1202; // Add more item ids here
.sz = getarraysize(.alloweditems);
}
yeah im using .yml the situation is... for some reason the NPC apply the random option sadly for some reason i dont get the random option i get something like this:
the AddEXP just dont show and i dont get any error at console, also gonna shared my client files:
Question
ItsFree
Hi, i read this guide:
Info about im using:
.exe: 2020-04-01
trunk date: 2021-09-18
Also i used this to test:
//===== rAthena Script ======================================= //= Sample Random Option Script //===== Description: ========================================= //= Enchant a weapon with a random element option //= to a weapon with no random option. //===== Changelogs: ========================================== //= 1.0 First version. [Secretdataz] //============================================================ prontera,162,195,4 script Elemental Master 1_M_WIZARD,{ disable_items; mes "[Elemental Master]"; mes "I could enchant your weapon with an element."; mes "Are you interested?"; next; if(select("Yes, I'm interested in that.") == 1){ .@id = getequipid(EQI_HAND_R); for(.@i = 0; .@i < .sz; ++.@i){ if(.@id == .alloweditems[.@i]) .@allowed = 1; } mes "[Elemental Master]"; if(.@id == -1) { mes "You are not holding anything in your hand."; close; } else if(!.@allowed){ mes "Your item can't be enchanted."; close; } else if(getequiprandomoption(EQI_HAND_R,0,ROA_ID)){ mes "Your weapon has already been enchanted."; close; } mes "Do you want to enchant your " + getitemname(.@id) + " with a random element?"; next; if(select("Yes, proceed.") == 1){ mes "[Elemental Master]"; mes "*mumble mumble*"; progressbar "#00FF00",2; next; setrandomoption(EQI_HAND_R,0,RDMOPT_WEAPON_ATTR_NOTHING + rand(10),0,0); mes "[Elemental Master]"; mes "Here's your weapon"; close; } close; } else{ close; } OnInit: setarray .alloweditems[0],1201,1202; // Add more item ids here .sz = getarraysize(.alloweditems); }
the main problem are with these effects:
- Id: 232 Option: ADDEXPPERCENT_KILLRACE_NOTHING Script: | bonus2 bExpAddRace,RC_Formless,getrandomoptinfo(ROA_VALUE); - Id: 233 Option: ADDEXPPERCENT_KILLRACE_UNDEAD Script: | bonus2 bExpAddRace,RC_Undead,getrandomoptinfo(ROA_VALUE); - Id: 234 Option: ADDEXPPERCENT_KILLRACE_ANIMAL Script: | bonus2 bExpAddRace,RC_Brute,getrandomoptinfo(ROA_VALUE); - Id: 235 Option: ADDEXPPERCENT_KILLRACE_PLANT Script: | bonus2 bExpAddRace,RC_Plant,getrandomoptinfo(ROA_VALUE); - Id: 236 Option: ADDEXPPERCENT_KILLRACE_INSECT Script: | bonus2 bExpAddRace,RC_Insect,getrandomoptinfo(ROA_VALUE); - Id: 237 Option: ADDEXPPERCENT_KILLRACE_FISHS Script: | bonus2 bExpAddRace,RC_Fish,getrandomoptinfo(ROA_VALUE); - Id: 238 Option: ADDEXPPERCENT_KILLRACE_DEVIL Script: | bonus2 bExpAddRace,RC_Demon,getrandomoptinfo(ROA_VALUE); - Id: 239 Option: ADDEXPPERCENT_KILLRACE_HUMAN Script: | bonus2 bExpAddRace,RC_DemiHuman,getrandomoptinfo(ROA_VALUE); - Id: 240 Option: ADDEXPPERCENT_KILLRACE_ANGEL Script: | bonus2 bExpAddRace,RC_Angel,getrandomoptinfo(ROA_VALUE); - Id: 241 Option: ADDEXPPERCENT_KILLRACE_DRAGON Script: | bonus2 bExpAddRace,RC_Dragon,getrandomoptinfo(ROA_VALUE); - Id: 242 Option: ADDEXPPERCENT_KILLRACE_ALL Script: | bonus2 bExpAddRace,RC_All,getrandomoptinfo(ROA_VALUE);
yeah im using .yml the situation is... for some reason the NPC apply the random option sadly for some reason i dont get the random option i get something like this:
the AddEXP just dont show and i dont get any error at console, also gonna shared my client files:
addrandomoptionnametable.lub:



Edited by ItsFreeenumvar.lub:
csv2yaml.hpp
what can i do? Thanks ^^
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.