Jump to content
  • 0

Ask random item


Yasunari Ishibashi

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2351
  • Joined:  10/28/11
  • Last Seen:  

the only part wrong here is the announcement..

and the script have somepart get wrong...

nvm..here is the fix..

should be work fine by now..

[ Pastebin ] Custom Item from Box

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2351
  • Joined:  10/28/11
  • Last Seen:  

getitem can only allow you to get 1 item....not a list of items....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2351
  • Joined:  10/28/11
  • Last Seen:  

huh ?

what default item ?

any screenshot to view your problem ?

now i am confuse with your problem..

did you re-load the function script ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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