find item macro

macros macros macros

Moderators: Phineas, noivad

Post Reply
User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

find item macro

Post by warawonda » Thu Jun 09, 2011 12:40 pm

Code: Select all

"/find"
{
label top
set name @env.textLog.word[2]
set speach @env.textLog
set item @env.textLog.word[7]
if speach < "can i have"
"/SELECTITEM " item " \r"
if speach < "No item named"
"sorry i have no item named " item " or maybe you spelled it incorrectly \r"
goto top
else
"/sell 0 " name " \r"
"there you are, come back soon. \r"
"/action Waves. \r"
end if
end if
goto top
}
having trouble because the items name normally the last word and the " at the end of the word is counted as part of the word.
any one have a fix for this?
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

User avatar
Lorikeet
Pogue Mahone
Pogue Mahone
Posts: 3718
Joined: Sat Apr 05, 2003 12:58 pm
Profession: Healer
Race: Fen'neko
Player Status: Active
Contact:

Re: find item macro

Post by Lorikeet » Thu Jun 09, 2011 12:45 pm

Does spelling "speech" "speach" cause any problems?

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: find item macro

Post by warawonda » Thu Jun 09, 2011 12:45 pm

Lorikeet wrote:Does spelling "speech" "speach" cause any problems?
no.
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: find item macro

Post by warawonda » Fri Jun 10, 2011 11:10 pm

nothing?
meh ill just fix it to read the first 4 to 5 letters then :D
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: find item macro

Post by warawonda » Tue Jun 14, 2011 4:31 am

Code: Select all

"/find"
{
label top
set name @env.textLog.word[2]
set speach @env.textLog
set A @env.textLog.word[7].letter[0]
set B @env.textLog.word[7].letter[1]
set C @env.textLog.word[7].letter[2]
set D @env.textLog.word[7].letter[3]
if speach < "can i have"
"/SELECTITEM " A "" B "" C "" D " \r"
if speach < "No item named"
"Sorry " name ", i am unable to find that item \r"
goto top
else
"/sell 0 " name " \r"
"/screenshot \r"
"Thank you, come back soon. \r"
pause 5
"/action Waves. \r"
end if
end if
goto top
}
doesn't saying thing when it fails for find the item i don't think because the end if is in the wrong place i think or it needs a pause.
but it works.
Last edited by warawonda on Tue Jun 14, 2011 5:21 am, edited 1 time in total.
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

User avatar
Talas
Exile
Posts: 599
Joined: Sun Aug 22, 2010 10:57 am
Profession: Fighter
Race: Concealed
Player Status: Active
Location: Munich, Germany
Contact:

Re: find item macro

Post by Talas » Tue Jun 14, 2011 5:13 am

i always better undestand Macros if I get a short explanation of what it should do...

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: find item macro

Post by warawonda » Tue Jun 14, 2011 5:36 am

Talas wrote:i always better undestand Macros if I get a short explanation of what it should do...
it selects an item in its inventory and sell it to you for free, you should be able to under stand it from reading the macro.
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

Geotzou
Exile
Posts: 210
Joined: Wed May 04, 2005 9:22 am

Re: find item macro

Post by Geotzou » Sun Jun 26, 2011 6:49 am

warawonda wrote:
Talas wrote:i always better undestand Macros if I get a short explanation of what it should do...
it selects an item in its inventory and sell it to you for free
In other words, it is a phishing device.

I sure hope nobody wants to install it :)

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: find item macro

Post by warawonda » Sun Jun 26, 2011 9:05 pm

Geotzou wrote:
warawonda wrote:
Talas wrote:i always better undestand Macros if I get a short explanation of what it should do...
it selects an item in its inventory and sell it to you for free
In other words, it is a phishing device.

I sure hope nobody wants to install it :)
its purely to see if i could do it.

also it may help others to see how to use "@env.textLog" more effectively.
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

User avatar
Cinnamon
Sun Dragon Clan
Sun Dragon Clan
Posts: 6375
Joined: Fri Nov 28, 2003 5:06 am

Re: find item macro

Post by Cinnamon » Mon Jun 27, 2011 3:19 am

warawonda wrote:...you should be able to under stand it from reading the macro.
You should be able to express it as a basic part of begging for help.
its purely to see if i could do it
It's obvious you can't.
This sig pic removed by Vagile

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: find item macro

Post by warawonda » Mon Jun 27, 2011 4:24 am

Cinnamon wrote: It's obvious you can't.
yes... it works, try the second post with code in it.
Cinnamon wrote: You should be able to express it as a basic part of begging for help.
i ASKED for help, and those who could help are the ones that can understand it by reading the macro
apart from that, i simply forgot to make it easier for those who couldn't.

please don't start a flame war over nothing.
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

Post Reply