Jump to content
  • 0
Yasunari Ishibashi

Ask random item

Question

I want to edit itemdb.txt

so I want to make a random item when clicked on it to one of the 7 items.

12986,Pet_Egg_Scroll_Box9,Adventurer Pack Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(25194,25195,25197,25199,25202,25203,25205),1; },{},{}

I question why there is writing a error server after restart server :

"Parse_CallFunc Expeted ')' to close argument list"

if anyone can help gave the solution? thanks.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Item_db.txt :

12986,Pet_Egg_Scroll_Box9,Adventurer Pack Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "CustomBoxUpper"; },{},{}

Script :

function script CustomBoxUpper {

setarray .BoxItems[0],25194,25195,25197,25199,25202,25203,25205;

set .Random, getarraysize( .BoxItems );

getitem .BoxItems[ rand( .Random ) ], 1;

announce "["+strcharinfo(0)+"] baru saja memperoleh ["+getitemname(.BoxItems[ rand(.Random) ])+"] dari Custom Box.",0;

end;

}

why when I opened the box the item out of default? not the item that I make in the script? please solution, thank you.

Link to comment
Share on other sites

I've changed like the script that you are justified, but why do I still get the default item instead of a custom item that I can?

do i have to make item_custom.txt in db folder?

Can I be an example? Thank you.

Link to comment
Share on other sites

Default item -> 12992

12986,Pet_Egg_Scroll_Box9,Adventurer Pack Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12992,1; },{},{}

Custom Item -> 25194,25195,25197,25199,25202,25203,25205

12986,Pet_Egg_Scroll_Box9,Adventurer Pack Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "CustomBoxUpper"; },{},{}

I have @ reloaditemdb

the same result.

I still get the default item instead of a custom item.

I was sorry item_db.txt error, if you could share item_db.txt? Thank you.

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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.