question about parameters

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
slagathor
Noob
Noob
Posts: 7
Joined: 18 Apr 2014, 00:52
Noob?: Yes

question about parameters

#1 Post by slagathor »

Parameters seem to be separated by spaces. What do you do if you want there to be a space in one of your parameters?

licielg
Human
Human
Posts: 37
Joined: 17 Oct 2013, 12:45
Noob?: No

Re: question about parameters

#2 Post by licielg »

give a exemple what you want pls

slagathor
Noob
Noob
Posts: 7
Joined: 18 Apr 2014, 00:52
Noob?: Yes

Re: question about parameters

#3 Post by slagathor »

macro mymacro -- old blue box

I want
$.param1 = old blue box

I do not want
$.param1 = old
$.param2 = blue
$.param3 = box

User avatar
4epT
Developers
Developers
Posts: 617
Joined: 30 Apr 2008, 14:17
Noob?: No
Location: Moskow (Russia)
Contact:

Re: question about parameters

#4 Post by 4epT »

in no way, try use:

macro mymacro -- 1

Code: Select all

macro mymacro {
 if ($.param1 == 1) {
  $param1 = old blue box
 }
...
}
All my posts are made by machine translator!
¤ Manual ¤ Anti BotKiller ¤ Packet Extractor v3 ¤
Image
Image

slagathor
Noob
Noob
Posts: 7
Joined: 18 Apr 2014, 00:52
Noob?: Yes

Re: question about parameters

#5 Post by slagathor »

That would not work the way I want it to. My idea for parameters is to allow changing the item name I want to look up. I don't want to have to go into my macro file every time to change it.

One solution I found but I don't like is.

macro mymacro {
if ($.param5 == 4) goto ok4
if ($.param5 == 3) goto ok3
if ($.param5 == 2) goto ok2
if ($.param5 == 1) goto ok1
:ok4
log @storamount($.param1 $.param2 $.param3 $.param4)
stop
:ok3
log @storamount($.param1 $.param2 $.param3)
stop
:ok2
log @storamount($.param1 $.param2)
stop
:ok1
log @storamount($.param1)
stop
}

It's redundant, but I would only have to go as far as like 3-4 extra steps because I don't know if any item contains more than 3-4 spaces. It would be annoying to call.

macro mymacro -- will of the darkness 4
macro mymacro -- jellopy 0 0 0 1


Also I tried running this macro but got a syntax error in my if statement. Very confused by this. I like the syntax of these if statements more but because they don't work for some reason I have to use the one above.

macro mymacro {
if ($.param1 == 1) {
log success
}
}

User avatar
4epT
Developers
Developers
Posts: 617
Joined: 30 Apr 2008, 14:17
Noob?: No
Location: Moskow (Russia)
Contact:

Re: question about parameters

#6 Post by 4epT »

try use the item ID ;)
All my posts are made by machine translator!
¤ Manual ¤ Anti BotKiller ¤ Packet Extractor v3 ¤
Image
Image

slagathor
Noob
Noob
Posts: 7
Joined: 18 Apr 2014, 00:52
Noob?: Yes

Re: question about parameters

#7 Post by slagathor »

Haha that would work, but I can't memorize all of those. Just wanted a way to see how many of some items I have without scrolling through every other item in my storage. I mean I have something that works, I just don't like it lol.

And nevermind.. I have been using an older version of the macros or something when trying this. When I logged on with a newer version, this call worked.

macro mymacro -- "old blue box"

$.param1 == old blue box

I need to update all my stuff. Thanks for help though.

Post Reply