Forum Settings
       
Reply To Thread

Help with "selling"macroFollow

#1 Jan 11 2006 at 2:51 AM Rating: Decent
*
113 posts
I'm kind of new to the complicated macro's. I use some simple macro's, but now I'd would like to create a marco for selling my potions.

I've read quite some forum about macro's and one guys told to do this for a selling marcro:

/2 WTS
/script GetContainerItemLink (x,y)

(x=bagno. and y=slotno.)

I've tried this thing but the only thing happening is that I say "WTS" in the trade channel.

Maybe there is someone how can explain how to get this macro working, or do I have to install a mod first?

So, basicly, I would like to say with a macro in /2: WTS [Healing Potion] and [Mana Potion]

Thanks in advance
#2 Jan 11 2006 at 11:51 AM Rating: Good
***
3,771 posts
Each line of the macro will be run individually, so it's doing exactly what you are telling it to do. First saying WTS in channel 2, and then fetching an item link and doing nothing with it.

Try this instead:

/script local itemlink=GetContainerItemLink(0,1);if itemlink~=nil then SendChatMessage("WTS: " .. itemlink, "CHANNEL", this.language, 2);

That should advertise the first item in your backpack in channel 2. To do multiple items in one line is a little more complicated, but probably doable in a macro.
#3 Jan 11 2006 at 2:00 PM Rating: Decent
*
113 posts
Thank you very much, I'll try this, and see if it work.

But how do you know all the scriptlanguage (if think it's called Lua). Do you use a mod for that? Maybe i can make more complicated macro's if I know how to do it myself..
#4 Jan 11 2006 at 2:09 PM Rating: Decent
****
4,877 posts
Most of the folks with a good understanding of scripting(well at leaast me, and a few of my guilides)use google to look for Hints, stuff like
Quote:
/script local itemlink=GetContainerItemLink(0,1);

should hold all kinds of importance, not only dose it tell you to use /script as the starter, it also holds info about how to access bags using scripts.
Quote:
if itemlink~=nil then SendChatMessage

This is a extra infromative part here, essentaly we have been giving the syntax and the Information that "If" statemnts are possible and how to use them.

I Know of no guide to scripting, when i hit a wall i ask for help or look it up, although a scrpting guide could be handy in reveling what commands are even possible.
Reply To Thread

Colors Smileys Quote OriginalQuote Checked Help

 

Recent Visitors: 29 All times are in CST
Anonymous Guests (29)