Poll: Do you like this script?
You do not have permission to vote in this poll.
Yes
25.00%
1 25.00%
No
75.00%
3 75.00%
Total 4 vote(s) 100%
* You voted for this item. [Show Results]

C-MOP
#1
Are you confused by using Assault cube's "math operators"?You prefer using C++/C math operators? If so, this script was made for you!!

alias cmop [
    if (strcmp $arg2 +) [
        + $arg1 $arg3
    ] [
    if (strcmp $arg2 -) [
        - $arg1 $arg3
    ] [
    if (strcmp $arg2 *) [
        * $arg1 $arg3
    ] [
    if (strcmp $arg2 div) [
        div $arg1 $arg3
    ] [
    if (strcmp $arg2 mod) [
        mod $arg1 $arg3
    ] [
    if (strcmp $arg2 powf) [
        powf $arg1 $arg3
    ] [
    if (strcmp $arg2 +f) [
        +f $arg1 $arg3
    ] [
    if (strcmp $arg2 -f) [
        -f $arg1 $arg3
    ] [
    if (strcmp $arg2 *f) [
        *f $arg1 $arg3
    ] [
    if (strcmp $arg2 divf) [
        divf $arg1 $arg3
    ] [
    if (strcmp $arg2 modf) [
        modf $arg1 $arg3
    ] [
    if (strcmp $arg2 !) [
        ! $arg1 $arg3
    ] [
    if (strcmp $arg2 ==) [
        = $arg1 $arg3
    ] [
    if (strcmp $arg2 !=) [
        != $arg1 $arg3
    ] [
    if (strcmp $arg2 <) [
        < $arg1 $arg3
    ] [
    if (strcmp $arg2 >) [
        > $arg1 $arg3
    ] [
    if (strcmp $arg2 <f) [
        <f $arg1 $arg3
    ] [    
    if (strcmp $arg2 >f) [
        >f $arg1 $arg3
    ] [    
    if (strcmp $arg2 =f) [
        =f $arg1 $arg3
    ] [
    if (strcmp $arg2 <=) [
        <= $arg1 $arg3
    ] [
    if (strcmp $arg2 >=) [
        >= $arg1 $arg3
    ] [
    if (strcmp $arg2 div=) [
        div= $arg1 $arg3
    ] [
    if (strcmp $arg2 div=f) [
        div=f $arg1 $arg3
    ] [
    if (strcmp $arg2 !=f) [
        + $arg1 $arg3
    ] [    
    if (strcmp $arg2 &&) [
        && $arg1 $arg3
    ] [
    if (strcmp $arg2 ||) [
        || $arg1 $arg3
    ] [ hudecho (c 3) Alias M: Error in second argument ]
    ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]    
]

Usage:

cmop number math-operator number

Ex:

echo cmop 6 + 5

Outputs: 11


PS:

I know that this script is extremely useless but who cares!Its my first time!
Thanks given by:


Messages In This Thread
C-MOP - by Mhtsos - 03 Dec 14, 05:23PM
RE: C-MOP - by Alien - 03 Dec 14, 08:15PM
RE: C-MOP - by Mhtsos - 03 Dec 14, 09:33PM
RE: C-MOP - by Mhtsos - 03 Dec 14, 09:36PM
RE: C-MOP - by Mhtsos - 03 Dec 14, 09:38PM
RE: C-MOP - by stef - 03 Dec 14, 10:53PM
RE: C-MOP - by Mousikos - 03 Dec 14, 11:49PM
RE: C-MOP - by Mhtsos - 04 Dec 14, 06:46AM
RE: C-MOP - by Mousikos - 04 Dec 14, 01:59PM
RE: C-MOP - by Mhtsos - 04 Dec 14, 03:09PM
RE: C-MOP - by Mhtsos - 04 Dec 14, 07:01AM
RE: C-MOP - by Marti - 04 Dec 14, 01:18PM
RE: C-MOP - by stef - 04 Dec 14, 11:30AM
RE: C-MOP - by Mhtsos - 04 Dec 14, 01:58PM
RE: C-MOP - by Andrez - 04 Dec 14, 12:42PM
RE: C-MOP - by Alien - 04 Dec 14, 02:46PM
RE: C-MOP - by Mhtsos - 04 Dec 14, 03:14PM
RE: C-MOP - by MCS - 04 Dec 14, 06:51PM
RE: C-MOP - by Mhtsos - 04 Dec 14, 07:10PM
RE: C-MOP - by MCS - 04 Dec 14, 08:13PM
RE: C-MOP - by Mhtsos - 04 Dec 14, 09:01PM
RE: C-MOP - by Luc@s - 05 Dec 14, 01:05PM
RE: C-MOP - by Marti - 04 Dec 14, 09:18PM