Jump to content
  • 0
sran

Add custom box

Question

Hello community, I was reading guides on how to add custom box and says that you have to modify this line in this file, what happens is that I do not see it and there is said line.
I do not know if it is now modified in another file, someone could help me.

//The max. item group count (increase this when needed).
#define MAX_ITEMGROUP 55

itemdb.h

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

since you are confused, use  this method

501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "CustomBox"; },{},{}
function	script	CustomBox	{
setarray .BoxItems[0],501,502,503;

set .Random, getarraysize( .BoxItems );
getitem .BoxItems[ rand( .Random ) ], 1;
announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.BoxItems[ .Random ])+"] from a Custom Box.",0;
end;
}

change your item id, and give it any box sprite in your iteminfo

and change items that box gives here

.BoxItems[0],501,502,503;

,

Edited by Cyro
Link to comment
Share on other sites

  • 0

 

Thank you Lord for helping me in this, I throw the following errors When entering the RO did not open the box, only appeared the box but never opened, I leave as I have everything, and if you could the script of all items not random please.

Item_ DB

45000,Angelus_Box,Angelus_Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,4000,{},{},{}

12214,Convex_Mirror,Convex Mirror,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_BOSSMAPINFO,600000,0; },{callfunc "Angelus_Box" ;},{}

12103,Bloody_Dead_Branch,Bloody Branch,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-3,1,""; },{callfunc "Angelus_Box";},{}

 

errobox.jpg

Link to comment
Share on other sites

  • 0
43 minutes ago, sran said:

 

Thank you Lord for helping me in this, I throw the following errors When entering the RO did not open the box, only appeared the box but never opened, I leave as I have everything, and if you could the script of all items not random please.

Item_ DB

45000,Angelus_Box,Angelus_Box,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,4000,{},{},{}

12214,Convex_Mirror,Convex Mirror,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_BOSSMAPINFO,600000,0; },{callfunc "Angelus_Box" ;},{}

12103,Bloody_Dead_Branch,Bloody Branch,2,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-3,1,""; },{callfunc "Angelus_Box";},{}

 

errobox.jpg

the script already set to random, can u post your script?

Link to comment
Share on other sites

  • 0
function	script	Angelus	{
setarray .BoxItems [ 0 ],12103,2214;	

set .Random, getarraysize( .BoxItems );
getitem .BoxItems[ rand( .Random ) ], 1;
announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.BoxItems[ .Random ])+"] from a Custom Box.",0;
end;
}

try this (didnt tested)

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.