Item box

Join Discord

Cba2KillU

LOMCN Veteran
Veteran
Apr 7, 2010
692
1
105
Hello i was just wondering how i go bout making a script for a item box.

say i got a mirbox and in that item u get a chance of wining either wheel necky ring
armour helm etc etc.

ive got a idea but it aint working xD
 

Shank

The_Mafia
VIP
Dec 4, 2008
2,082
17
165
#ACT
RANDOM 30
GIVE MirWheel

#ACT
RANDOM 30
GIVE MirRing

#ACT
RANDOM 30
GIVE MirNecklace

try this in qfunc obv do stdmode 1st to make the box n make it double click to open the GIVE bit might be wrong not tryed it my self n not checked any of my own scripts
 
Upvote 0

paul.obrien

LOMCN Veteran
Veteran
Aug 28, 2008
453
4
65
in the item database create a new item called "itembox" or a name of your chooseing.
Find an unused anicount and assign it to this item.
Then go to the Qfunction and add a small script using that anicount

[@stdmodefunction89] carnt remeber exactly what this is from memory
#IF
RANDOM 5
#ACT
GOTO @start-1

#ELSESAY
Sorry <$USERNAME> this box is empty\ \

<Exit/@exit>

[@start-1]
#SAY
Welldone <$USERNAME>,\
You have won a prize.\
Please select the prize you would like.\ \

<Mir Wheel/@mirwheel> - <Mir Ring/@mirring>




[@mirwheel]
#ACT
GIVE Mirwheel 1
SENDMSG 6 "You have won a Mir Wheel."
BREAK
CLOSE

[@MirRing]
#ACT
GIVE MirRing 1
SENDMSG 6 "You have won a Mir Ring."
BREAK
CLOSE



blah blah blah you can add as much as you want or change the lay out to a random script so you don't get a choice of the item that you get.
Hope this helps you a little bit
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
#ACT
RANDOM 30
GIVE MirWheel

#ACT
RANDOM 30
GIVE MirRing

#ACT
RANDOM 30
GIVE MirNecklace

try this in qfunc obv do stdmode 1st to make the box n make it double click to open the GIVE bit might be wrong not tryed it my self n not checked any of my own scripts

since when is RANDOM an #ACT statement. Plus theres the fact u didnt put a number after the item.

#IF
Fail
#ACT
fubu


If ur not gonan give a correct answer u really shouldnt post at all ^^



in the item database create a new item called "itembox" or a name of your chooseing.
Find an unused anicount and assign it to this item.
Then go to the Qfunction and add a small script using that anicount

[@stdmodefunction89] carnt remeber exactly what this is from memory
#IF
RANDOM 5
#ACT
GOTO @start-1

#ELSESAY
Sorry <$USERNAME> this box is empty\ \

<Exit/@exit>

[@start-1]
#SAY
Welldone <$USERNAME>,\
You have won a prize.\
Please select the prize you would like.\ \

<Mir Wheel/@mirwheel> - <Mir Ring/@mirring>




[@mirwheel]
#ACT
GIVE Mirwheel 1
SENDMSG 6 "You have won a Mir Wheel."
BREAK
CLOSE

[@MirRing]
#ACT
GIVE MirRing 1
SENDMSG 6 "You have won a Mir Ring."
BREAK
CLOSE



blah blah blah you can add as much as you want or change the lay out to a random script so you don't get a choice of the item that you get.
Hope this helps you a little bit

why would u need a goto command? just creating unnessacry script



[@StdModeFunc42] <--- the correct way to do it
#IF
RANDOM 5
#SAY
Welldone <$USERNAME>,\
You have won a prize.\
Please select the prize you would like.\ \
<Mir Wheel/@mirwheel> - <Mir Ring/@mirring>
#ACT
break
#ELSESAY
Sorry <$USERNAME> this box is empty\ \

<Exit/@exit>

[@mirwheel]
#ACT
GIVE Mirwheel 1
SENDMSG 6 "You have won a Mir Wheel."
BREAK
CLOSE

[@MirRing]
#ACT
GIVE MirRing 1
SENDMSG 6 "You have won a Mir Ring."
BREAK
CLOSE
 
Upvote 0

-Luke-

LOMCN Veteran
Veteran
May 9, 2010
1,508
55
135
Or if you want the mir box to give you a mir item at random you do something like this, you can add a message like ben done above but realy do you need to be told such item been put in your bag ? =S

[@StdModeFunc1]
#IF
random 10
#ACT
give MirArmour(M) 1
BREAK
#IF
random 10
#ACT
give MirArmour(F) 1
BREAK
#IF
random 10
#ACT
give MirSword 1
BREAK
#IF
random 10
#ACT
give MirHelmet 1
BREAK
#IF
random 10
#ACT
give MirNecklace 1
BREAK
#IF
random 10
#ACT
give MirWheel 1
BREAK
#IF
random 10
#ACT
give MirRing 1
BREAK
#IF
random 10
#ACT
give MirBelt 1
BREAK
#IF
random 10
#ACT
give MirBoots 1
BREAK
#IF
random 10
#ACT
give MirStone 1
BREAK
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
ud need to add

#ELSEACT
goto @StdModeFunc1
break

to the end of that, as if hes unlucky enuff to not actually hit any of them randoms... he will get nothing and rage quit
 
Upvote 0

-Luke-

LOMCN Veteran
Veteran
May 9, 2010
1,508
55
135
Or remove the last item and 'ELSEACT give item' instead of making it read the script again.
 
Upvote 0

Shank

The_Mafia
VIP
Dec 4, 2008
2,082
17
165
my post wasnt checked was just rushed and off top of my head wasnt tested either just pointed out its RANDOM to use a item box and get a random item... if he had tryed it posted n said it had failed i would of posted back.
 
Upvote 0