How to edit items in the Random Box.

02/03/2013 07:29 hiderian#1
Is it possible to edit items which are including in the Random Box(ID:2000520)?

I want to get the items such as Master Helms or Weapons randomly from the Random Box but I don't know how to edit the containing items. Please someone help me. Thank you.
02/03/2013 07:31 TheOnlyOneRaskim#2
Opt_var0_1 will be a dropgroup (-xxxxxx)


edit this dropgroup like you want and done
02/03/2013 08:24 hiderian#3
Quote:
Originally Posted by TheOnlyOneRaskim View Post
Opt_var0_1 will be a dropgroup (-xxxxxx)


edit this dropgroup like you want and done
Thank you very much. I solved it!!
02/03/2013 11:28 mongreldogg#4
another way, you can do it using script_text
02/03/2013 16:06 hiderian#5
Quote:
Originally Posted by mongreldogg View Post
another way, you can do it using script_text
I don't know how to make the lua file about script_text very well so I think I won't use that way, sorry...
But anyway, thank you very much for your help.
02/03/2013 16:39 mongreldogg#6
Quote:
Originally Posted by hiderian View Post
I don't know how to make the lua file about script_text very well so I think I won't use that way, sorry...
But anyway, thank you very much for your help.
no problem.
u can just declare new function
in any place in yr lua scripts
and then make sql query
easier=)
02/03/2013 16:56 c1ph3r#7
Quote:
Originally Posted by mongreldogg View Post
no problem.
u can just declare new function
in any place in yr lua scripts
and then make sql query
easier=)
And you have to adjust the item_use_flag, remove the dropgroup from the opt_vars, create a script function that will randomly give one item...yes it's much easier :D

I think it's easier to use one sql query to adjust the drop group instead of updating item resource + creating a new script function

but if you want to create an existing function new your script should look like this:

function give_out_item()
local itemarray = {itemid1,itemid2,itemid3,itemid4...}
local pointer = math.random(1,itemarraycount)
insert_item(itemarray[pointer],1,0,0,2)
end

But it's easier to modify the dropgroud.
02/03/2013 19:07 mongreldogg#8
Quote:
Originally Posted by c1ph3r View Post
And you have to adjust the item_use_flag, remove the dropgroup from the opt_vars, create a script function that will randomly give one item...yes it's much easier :D

I think it's easier to use one sql query to adjust the drop group instead of updating item resource + creating a new script function

but if you want to create an existing function new your script should look like this:

function give_out_item()
local itemarray = {itemid1,itemid2,itemid3,itemid4...}
local pointer = math.random(1,itemarraycount)
insert_item(itemarray[pointer],1,0,0,2)
end

But it's easier to modify the dropgroud.
SUPERMEGATROLL here xD
right u are. it may be harder to write script then change a couple of rows.
another way, u must know how to make it changing a couple of rows. if u dont - u can make it by scripting.
ive just showed another way. and now he can use it not just with randombox.
but guess, when i had no skills in managing rappelz database, i was doing everything by scripts=) much easier to understand by urself if u dont have someone to ask howto.
P.S. hiderian nevermind, we are just showoff rappelz devs=)
02/03/2013 19:50 ismokedrow#9
One thing I learned in my times using Linux was to never circumvent natural procedure (installing things outside of apt for instance) because it always resulted in clutter or instability. I think what cipher was trying to say is: it's always best to do things in their natural way.
12/02/2013 08:09 mevius#10
Hi there.
I changed items inside of creature random box with lua files according to mongreldogg's instruction.

It successfully changed but when I used the creature random box I'll get the sealed creature and "1 rupee"...

Why I'll get 1 rupee? How can I remove it? I don't need 1 rupee...

Anyway, I edited like this.

item_use_flag 1090552908 to 0
opt_var1_0 -2000132.00 to 0
script_text to test()

Somebody help me plaese.