Jump to content
  • 0

Add custom box


Question

Posted
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

10 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted

 

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

  • 0
Posted
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?

  • 0
Posted
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)

  • 0
Posted
On 4/27/2017 at 6:05 PM, Cyro said:

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;

Good day. i dont understand the part where to change iteminfo and item id. please reply. Thanks

 

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