Help on script please

Mu online season 21 - grand opening

Geordiehc

Mad Dog Geo
VIP
Jul 4, 2007
2,827
49
175
Redditch, UK
Ok im trying out event type scripts and atm this is how my script is goin

#ACT
movr D0 6
movr D1 6
goto @next

[@next]
#IF
EQUAL D0 1
EQUAL D1 1
#ACT
give AntEgg 1

#IF
EQUAL D0 2
EQUAL D0 1
#ACT
give AntEgg2

et etc,

my first question is since its a roll of the dice can i get movr D1 6 to be 1-6 instead of 0-6?

second question is, does just spamming the #IFs in 1 [@next] section work coz i cant seem to get it to work atm and is ther a still easy way without having to do:
#IF
EQUAL D0 1
EQUAL D1 1
#act
give antegg 1
#ELSEACT
goto @next2

sorry if i dont make much sense
 

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
215
UK
There is actually a playdice command, I don't know how it works but maybe someone does??

otherwise just do a...


#act
movr d1 5
inc d1 1
goto @next

will produce your correct dice number
 
Upvote 0

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
215
UK
If you mean....

[@next]
#If
EQUAL D1 1
#ACT
mov d3 number AND/OR move A2 itemname
goto @giveitem

#If
EQUAL D1 2
#ACT
mov d3 number AND/OR move A2 itemname
goto @giveitem

#If
EQUAL D1 3
#ACT
mov d3 number AND/OR move A2 itemname
goto @giveitem

#If
EQUAL D1 4
#ACT
mov d3 number AND/OR move A2 itemname
goto @giveitem

[@giveitem]
#act
give %A2 %D3 OR give AntEgg %D3


you get the idea......then yes you can :)
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
Code:
#ACT
MovR  D0  5
Inc   D0  1
playdice 1 @NextSection

[@NextSection]
#IF
Equal  D0  1
#SAY
You Threw a 1

#IF
Equal  D0  2
#SAY
You Threw a 2

#IF
Equal  D0  3
#SAY
You Threw a 3

#IF
ELarge  D0 4
#SAY
You threw a 4 or above..

The PlayDice Command is used as follows (This shows the Dice graphics on the screen)

Code:
PlayDice QtyOfDice  @ScriptToMoveTo

You have to store the result of the Die in the variables D0, D1, D2, D3 (I think 4 is the Maximum)

So, if you did the following it would show you 4 dice being rolled with the result of 1, 2, 3, 4 on the 4 Die...

Code:
#ACT
Mov  D0  1
Mov  D1  2
Mov  D2  3
Mov  D3  4
PlayDice  4 @ShowMeDice

[@ShowMeDice]
#SAY
Oh yeah.. 1, 2, 3, 4!! :)
 
Upvote 0

Geordiehc

Mad Dog Geo
VIP
Jul 4, 2007
2,827
49
175
Redditch, UK
nah sorry what i mean is i have the

#IF
EQUAL D0 1
EQUAL D1 1
#ACT
give AntEgg 1

#IF
EQUAL D0 2
EQUAL D0 1
#ACT
give AntEgg2

for all combinations of the dice but it doesnt work, it doesnt give the item
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
This will Give you a 2 Dice script.. just change the #SAY to whatever you want it to do..

Code:
[@Main]
#SAY
From what I can gather, you are using 2 Dice..\
So.. Click Throw Dice will throw you 2 Dice..\\
<[ Throw Dice ]/@ThrowDice>\\\

[@ThrowDice]
#ACT
MovR  D0  5
MovR  D1  5
Inc   D0  1
Inc   D1  1
PlayDice  2 @DiceThrown

[@DiceThrown]
#IF	
Equal  D0	1
Equal  D1	1
#SAY	
You have thrown 1 and 1	
#ACT	
Break	
	
#IF	
Equal  D0	1
Equal  D1	2
#SAY	
You have thrown 1 and 2	
#ACT	
Break	

#IF	
Equal  D0	1
Equal  D1	3
#SAY	
You have thrown 1 and 3	
#ACT	
Break	

#IF	
Equal  D0	1
Equal  D1	4
#SAY	
You have thrown 1 and 4	
#ACT	
Break	

#IF	
Equal  D0	1
Equal  D1	5
#SAY	
You have thrown 1 and 5	
#ACT	
Break	
	
#IF	
Equal  D0	1
Equal  D1	6
#SAY	
You have thrown 1 and 6	
#ACT	
Break	

	
#IF	
Equal  D0	2
Equal  D1	1
#SAY	
You have thrown 2 and 1	
#ACT	
Break	
	
#IF	
Equal  D0	2
Equal  D1	2
#SAY	
You have thrown 2 and 2	
#ACT	
Break	
	
#IF	
Equal  D0	2
Equal  D1	3
#SAY	
You have thrown 2 and 3	
#ACT	
Break	
	
#IF	
Equal  D0	2
Equal  D1	4
#SAY	
You have thrown 2 and 4	
#ACT	
Break	
	
#IF	
Equal  D0	2
Equal  D1	5
#SAY	
You have thrown 2 and 5	
#ACT	
Break	
	
#IF	
Equal  D0	2
Equal  D1	6
#SAY	
You have thrown 2 and 6	
#ACT	
Break	
	
	
#IF	
Equal  D0	3
Equal  D1	1
#SAY	
You have thrown 3 and 1	
#ACT	
Break	
	
#IF	
Equal  D0	3
Equal  D1	2
#SAY	
You have thrown 3 and 2	
#ACT	
Break	
	
#IF	
Equal  D0	3
Equal  D1	3
#SAY	
You have thrown 3 and 3	
#ACT	
Break	
	
#IF	
Equal  D0	3
Equal  D1	4
#SAY	
You have thrown 3 and 4	
#ACT	
Break	
	
#IF	
Equal  D0	3
Equal  D1	5
#SAY	
You have thrown 3 and 5	
#ACT	
Break	
	
#IF	
Equal  D0	3
Equal  D1	6
#SAY	
You have thrown 3 and 6	
#ACT	
Break	
	
#IF	
Equal  D0	4
Equal  D1	1
#SAY	
You have thrown 4 and 1	
#ACT	
Break	
	
#IF	
Equal  D0	4
Equal  D1	2
#SAY	
You have thrown 4 and 2	
#ACT	
Break	
	
#IF	
Equal  D0	4
Equal  D1	3
#SAY	
You have thrown 4 and 3	
#ACT	
Break	
	
#IF	
Equal  D0	4
Equal  D1	4
#SAY	
You have thrown 4 and 4	
#ACT	
Break	
	
#IF	
Equal  D0	4
Equal  D1	5
#SAY	
You have thrown 4 and 5	
#ACT	
Break	
	
#IF	
Equal  D0	4
Equal  D1	6
#SAY	
You have thrown 4 and 6	
#ACT	
Break	
	
#IF	
Equal  D0	5
Equal  D1	1
#SAY	
You have thrown 5 and 1	
#ACT	
Break	
	
#IF	
Equal  D0	5
Equal  D1	2
#SAY	
You have thrown 5 and 2	
#ACT	
Break	
	
#IF	
Equal  D0	5
Equal  D1	3
#SAY	
You have thrown 5 and 3	
#ACT	
Break	
	
#IF	
Equal  D0	5
Equal  D1	4
#SAY	
You have thrown 5 and 4	
#ACT	
Break	
	
#IF	
Equal  D0	5
Equal  D1	5
#SAY	
You have thrown 5 and 5	
#ACT	
Break	
	
#IF	
Equal  D0	5
Equal  D1	6
#SAY	
You have thrown 5 and 6	
#ACT	
Break	
	
#IF	
Equal  D0	6
Equal  D1	1
#SAY	
You have thrown 6 and 1	
#ACT	
Break	
	
#IF	
Equal  D0	6
Equal  D1	2
#SAY	
You have thrown 6 and 2	
#ACT	
Break	
	
#IF	
Equal  D0	6
Equal  D1	3
#SAY	
You have thrown 6 and 3	
#ACT	
Break	
	
#IF	
Equal  D0	6
Equal  D1	4
#SAY	
You have thrown 6 and 4	
#ACT	
Break	
	
#IF	
Equal  D0	6
Equal  D1	5
#SAY	
You have thrown 6 and 5	
#ACT	
Break	
	
#IF	
Equal  D0	6
Equal  D1	6
#SAY	
You have thrown 6 and 6	
#ACT	
Break	
	
#IF	
#SAY	
This has broken.. You should NEVER see this Text\\

If you only want it to give you a reward if a Pair comes out.. You can use something like this..

Code:
[@Main]
#SAY
From what I can gather, you are using 2 Dice..\
So.. Click Throw Dice will throw you 2 Dice..\\
<[ Throw Dice ]/@ThrowDice>\\\

[@ThrowDice]
#ACT
MovR  D0  5
MovR  D1  5
Inc   D0  1
Inc   D1  1
PlayDice  2 @DiceThrown

[@DiceThrown]
#IF	
Equal  D0	%D1
#SAY	
You have Thrown a Pair!!!!!\\	
#ACT	
Break	
#ELSESAY
#SAY
Sorry, you didn't throw a Pair!\\


If you only want to give prizes for 7's..

Code:
[@Main]
#SAY
From what I can gather, you are using 2 Dice..\
So.. Click Throw Dice will throw you 2 Dice..\\
<[ Throw Dice ]/@ThrowDice>\\\

[@ThrowDice]
#ACT
MovR  D0  5
MovR  D1  5
Inc   D0  1
Inc   D1  1
PlayDice  2 @DiceThrown

[@DiceThrown]
#ACT
Inc  D0  %D1
#IF	
Equal  D0 7
#SAY	
You have Thrown a Seven!!!!!\\	
#ACT	
Break	
#ELSESAY
#SAY
Sorry, you didn't throw a Seven!\\

If you use the above examples, I can't see how it can go wrong.. (Unless I have missed something strange)
 
Last edited:
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,401
36
275
Germany
PlayDice 2 @DiceThrown

Command {USED DICE} {Call function after Dice is Stoped}

PlayDice 1-6 @your info function

The Command show the Dice on the Screen, have you 2 then you see 2 Dice on the Screen ...
 
Upvote 0