mIRC Home    About    Download    Register    News    Help

Print Thread
#27592 02/06/03 04:02 AM
Joined: Jun 2003
Posts: 12
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Jun 2003
Posts: 12
Hello,
I'm creating this text based RPG game for IRC. I'm still in the developing stages and haven't got as far as the actually swinging of weapons and such yet... but I want to ask this question before I get there. Is it possible to perform Mathmatical problems using the variables? Such as something like this: %Player1Health - %Player2Strength = 40 + %Player1Deffense = 50 /set %Player1Health 50
Is it possible to do something along those lines? Thank you for your help,
Webmonkey

#27593 02/06/03 04:44 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
It's possible to perform most any math calculation in mIRC, but just not exactly as you phrased it.

/set %Player1Health $calc(%Player1Health - %Player2Strength + %Player1Deffense)

Though, I would change the order of operations around like so.

/set %Player1Health $calc(%Player1Health - ( %Player2Strength - %Player1Deffense ))

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27594 02/06/03 05:02 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
/help $calc


--------
mIRC - fun for all the family (except grandma and grandpa)
#27595 02/06/03 06:57 AM
Joined: May 2003
Posts: 22
A
Ameglian cow
Offline
Ameglian cow
A
Joined: May 2003
Posts: 22
Just some more pointless info:

Code:
%twenty = 10 * 2
%fourty = %twenty * 2


you can do ONE math operatorn like this ... using: * + - / % ^



--------------------------------------------------
I really don't know anything.... I just fake it
#27596 02/06/03 07:07 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
but it's soo icky sticky!


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27597 02/06/03 03:45 PM
Joined: Jun 2003
Posts: 12
W
Pikka bird
OP Offline
Pikka bird
W
Joined: Jun 2003
Posts: 12
Thanks it will probably help.


Link Copied to Clipboard