Jump to content
  • 0

[Requestin Support] Problem with Random Option: AddExpPercent


ItsFree

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  121
  • Reputation:   7
  • Joined:  04/11/15
  • Last Seen:  

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:

image.png.7a07ed1bf2866b9b7d0954ae2d322331.png

 

the AddEXP just dont show and i dont get any error at console, also gonna shared my client files:

 

addrandomoptionnametable.lub:

c20863ad6bf558bbf23df2a4e0560e64.png

enumvar.lub:

10b8f9a74808cb95111923c9550c24bd.png

csv2yaml.hpp

7645fd870c0dbc198e1241b5c7954c7d.png

what can i do?  Thanks ^^

Edited by ItsFree
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

 

On 12/16/2021 at 5:07 AM, ItsFree said:

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:

image.png.7a07ed1bf2866b9b7d0954ae2d322331.png

 

the AddEXP just dont show and i dont get any error at console, also gonna shared my client files:

 

addrandomoptionnametable.lub:

c20863ad6bf558bbf23df2a4e0560e64.png

enumvar.lub:

10b8f9a74808cb95111923c9550c24bd.png

csv2yaml.hpp

7645fd870c0dbc198e1241b5c7954c7d.png

what can i do?  Thanks ^^

came across with the same issue did you already fix this?- @ItsFree

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...