Help!!

Play Now

LightningStar

LOMCN Veteran
Veteran
Loyal Member
May 28, 2007
408
7
45
Essex, UK
How do i get the NPC to give out 1 item out of the 5 that are there?

Ive tried something like this

[@next]
#IF
CHECKITEM Item 1
RANDOM 5
#ACT
TAKE item 1
GIVE Item
GIVE Item
GIVE Item
GIVE Item
GIVE Item

any help please?

item is not called item its just an example.
 

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
215
UK
#IF
check itemname 1
#ACT
movr D0 4
goto @chooseitem

[@chooseitem]
#IF
EQUAL D0 0
#ACT
Mov A1 itemname
goto @givingitem

#IF
EQUAL D0 1
#ACT
Mov A1 itemname
goto @givingitem

#IF
EQUAL D0 2
#ACT
Mov A1 itemname
goto @givingitem

#IF
EQUAL D0 3
#ACT
Mov A1 itemname
goto @givingitem

#IF
EQUAL D0 4
#ACT
Mov A1 itemname
goto @givingitem

[@givingitem]
#ACT
take itemname 1
give %A1 1


movr is remember random number between 0 and 4 and make it D0.

the itemname to mov (remember as A1) can be anything you want to give.

You can see how to increase this random giving I assume by increasing the movr number and increasing the options under @chooseitem.

HTH :)
 
Upvote 0