[CD3.55] How works this command?

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
[SOLVED] How works this command?

Hi I'm trying to make a script that multiplies the number of objects for the price.

Do not understand why, but no works...

Code:
[@main]
#IF
#SAY
<Sell item/@@sell>\




[@@sell]
#ACT
Mov D1 %INPUTSTR
Mov D2 100000
goto @sellyes


[@sellyes]
#IF
checkitem BronzeThread %D1
#ACT
Mul D2 %D1
take BronzeThread %D1
give Gold %D2
break

Mul command does not work, because for many items it sells, I always get the price of 1...

What is wrong?

ty for help
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
i haven't done a mir3 script in years, looking at that you're not giving the mul command anything to output with.

If you're trying to multiply D1 with D2, which value is it going to output to?

Surely it needs a third variable on that line to say - times D1 with D2 and output to D3.

i've never used Mul myself, but maybe its something like "Mul D3 %d1 %d2" ?
 
Upvote 0

Far

tsniffer
Staff member
Developer
May 19, 2003
20,172
30
2,767
540
No i didn't think it would. but i think the reasoning behind my solution is correct. You just need to find the actual way to use the mov command.

Maybe searching would find someone else whos used it in a script previously?
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
The solution as I use the command not found, I finally put this type of script:
sell 1
sell 5
sell 10

I have understood that everyone will know to use ^^
 
Upvote 0