Jump to content
  • 0

How to make RANDOM OPTION weapon effect with more than 1 random option?


Question

Posted (edited)
Example to get Crimson Weapon with Ghost property:
	// +9 Crimson Dagger [2]
	setarray .@OptID[0],RDMOPT_WEAPON_ATTR_TELEKINESIS;
	setarray .@OptVal[0],0;
	setarray .@OptParam[0],0;
	getitem3 28705,1,1,9,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;

Hello,

I tried making adding 3 random effect on item.. I already tried many ways to make it random.. But always got no option ID error.. Or sometimes the NPC stuck.. 

I tried giving random 3 effect to player item.. But always fail.. But I can give up to 5 effect but not random.. It just give the 5 in the first line only.. 
 

Below is working.. But limit 2 random per effect only.. How to give it more than 2?

	setarray .@OptID[0],rand (RDMOPT_VAR_AGIAMOUNT,RDMOPT_VAR_MAXHPPERCENT),rand (RDMOPT_VAR_SPACCELERATION,RDMOPT_VAR_PLUSASPD),RDMOPT_VAR_LUKAMOUNT;
	setarray .@OptVal[0],rand (1,3),rand (1,3),rand (1,3),rand (1,3);
	setarray .@OptParam[0],3;
	getitem3 28705,1,1,9,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;

 

Please guide me.. Thanks..

Edited by rakuzas

7 answers to this question

Recommended Posts

  • 0
Posted
	setarray .@OptID[0], RDMOPT_WEAPON_ATTR_TELEKINESIS, RDMOPT_VAR_AGIAMOUNT;
	setarray .@OptVal[0], 0,3;
	setarray .@OptParam[0], 0,0;
	getitem3 28705,1,1,9,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;

should give 2 charms in the item. Fill the arrays.

  • 0
Posted
4 hours ago, rakuzas said:

Example to get Crimson Weapon with Ghost property:
	// +9 Crimson Dagger [2]
	setarray .@OptID[0],RDMOPT_WEAPON_ATTR_TELEKINESIS;
	setarray .@OptVal[0],0;
	setarray .@OptParam[0],0;
	getitem3 28705,1,1,9,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;

Hello,

I tried making adding 3 random effect on item.. I already tried many ways to make it random.. But always got no option ID error.. Or sometimes the NPC stuck.. 

I tried giving random 3 effect to player item.. But always fail.. But I can give up to 5 effect but not random.. It just give the 5 in the first line only.. 
 

Below is working.. But limit 2 random per effect only.. How to give it more than 2?


	setarray .@OptID[0],rand (RDMOPT_VAR_AGIAMOUNT,RDMOPT_VAR_MAXHPPERCENT),rand (RDMOPT_VAR_SPACCELERATION,RDMOPT_VAR_PLUSASPD),RDMOPT_VAR_LUKAMOUNT;
	setarray .@OptVal[0],rand (1,3),rand (1,3),rand (1,3),rand (1,3);
	setarray .@OptParam[0],3;
	getitem3 28705,1,1,9,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam;

 

Please guide me.. Thanks..

 Couple of things that jumped out right off the bat...

RDMOPT_VAR_AGIAMOUNT = 4

RMDOPT_VAR_MAXHPPERCENT = 1 ... so you are going backwards in your RAND( 4, 1 ) instead of RAND( 1, 4 )

RDMOPT_VAR_SPACCELERATION 12

RDMOPT_VAR_PLUSASPD 15

So rand(12,15) is correct

and luck amount is by itself so that is ok... 

Next, you are giving 3 attributes (X, Y, and luck)

however in your options array, you are passing 4 values... so that needs to change to 3... 

I couldn't figure out what Param Option does, as all random items didn't see to have something for that...

  • 0
Posted

Ahhh.. That just my example.. 

What I want to do is.. Every 1 effect/layer.. We can make more random options rather than my current scripts only support 2.. I tried making array that have more than 2.. But everytime I got error said no optionID.. 

  • 0
Posted
2 hours ago, rakuzas said:

Ahhh.. That just my example.. 

What I want to do is.. Every 1 effect/layer.. We can make more random options rather than my current scripts only support 2.. I tried making array that have more than 2.. But everytime I got error said no optionID.. 

Would have to see what you are actually trying to do then?

  • 0
Posted
On 8/15/2017 at 10:09 AM, Z3R0 said:

Would have to see what you are actually trying to do then?

 He's trying to say that "getitem3" can only give 1 random option..

He is asking on how to make "getitem3" to give 2 or more random options in one time.

perhaps @Cydh can help coz i am curious too.

  • 0
Posted
7 hours ago, Keitenai said:

 He's trying to say that "getitem3" can only give 1 random option..

He is asking on how to make "getitem3" to give 2 or more random options in one time.

perhaps @Cydh can help coz i am curious too.

this thread almost a year and still there's someone who can't understand the doc/script_commands.txt? humanity will be vanished very soon. Thanks Capuche

  • MVP 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...