Lootoption addon w/filter
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Lootoption addon w/filter
its so frustrating sometimes for example i don't get printf very well because i frequently get nils and it crashes the bot and when i try printf("..name..") i get "..name.." printed and not to mention ' commands combined with "
Oh well Lootoption works thats all that matters
Oh well Lootoption works thats all that matters
Re: Lootoption addon w/filter
not sure I will be the best at explaining it but I will try.
if you have " " anything in between the " " will be a string.
so
that is the first " and so anything after it is a string until the second "
So in that the Somefunction(1,1) is actually a string which is used in the function RoMScript.
So if you want to add in a variable to the function you need to do it outside of a string, so you end a string, add in variable then make another string for the rest.
Would be the same as
So if you want to actually have a " as part of the string you tell it to that it is a character you want and not code to finish string, you do this with a \
So if you needed to do an ingame script of
the RoMScript would be
if you have " " anything in between the " " will be a string.
so
Code: Select all
RoMScript("
Code: Select all
RoMScript("Somefunction(1,1)")
So if you want to add in a variable to the function you need to do it outside of a string, so you end a string, add in variable then make another string for the rest.
Code: Select all
i = 1
RoMScript("Somefunction(" ..i.. ",1)")
Code: Select all
RoMScript("Somefunction(1,1)")
So if you needed to do an ingame script of
Code: Select all
Somefunction("sometext",1,1)
Code: Select all
RoMScript("Somefunction(\"sometext\",1,1)")
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Lootoption addon w/filter
Of course.. I see and understand now.. But Murphy's Law says that next time i try it it will not be the case and it makes me feel that it is wrong. I bet if I try the same method on the other function that took me a day and a half to get it to work, it will not work... i get the denote of /' and such /" and i remmber now that ' means it is a function call but i still mess up using /"../" and everything whoops there i go it is a backslash not forward slash or idk whatever. For me when i use excessive spacing also i fail terribly. I gotta quit b/c if i get into it i'll end up mushing together all my knowledge and lose like 80 I.Q. pts then i'll lose the inspiration which is 80% of programming. Did i mention u are AWESOME?
Re: Lootoption addon w/filter
is just wrong.Romplayer wrote:RoMScript('GettFilter("..name..");');
That looks like it should work. Lets say name = "Link Rune". It would equate toRomplayer wrote:RoMScript("GettFilter('"..name.."');");
Code: Select all
GettFilter('Link Rune');
Code: Select all
RoMScript('GettFilter("'..name..'");');
Code: Select all
GettFilter("Link Rune");
Or just use the \" like Lisa said.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Lootoption addon w/filter
i tried that only lisa's genious worked
Re: Lootoption addon w/filter
i can only put individual.. cannot put in group?? i mean "Oranament Runes I","Oranament Runes II","Productions Rune","Rune I",,"Rune II","Rune III","Armor I",,"Armor II","Armor III","Armor IV" etc...
Re: Lootoption addon w/filter
its on a name basis. Do you think i should put in wildcards?
Re: Lootoption addon w/filter
I think i remember my teacher saying that using a variable is 8 bytes of memory while a string is 16 bytesrock5 wrote:is just wrong.Romplayer wrote:RoMScript('GettFilter("..name..");');
That looks like it should work. Lets say name = "Link Rune". It would equate toRomplayer wrote:RoMScript("GettFilter('"..name.."');");in game. The only issue there is if you have a name with a '. You could reverse it.Code: Select all
GettFilter('Link Rune');
That would equate toCode: Select all
RoMScript('GettFilter("'..name..'");');
in game. I hope that helps your understanding.Code: Select all
GettFilter("Link Rune");
Or just use the \" like Lisa said.
so ' ' is 8 bytes and " " is 16 bytes. I had to get this off my chest. Because in a table function is 32 bytes so ' ' wouldn't work therefore u have to use the string modifer " " which is a 16 byte.
Re: Lootoption addon w/filter
GAhh.. Therefore if i wanted to optimize my memory usage i would try something like
or whatever something like that. If romscript is that slow... But I don't have a prob with it being slow.runthis = "Gettxt("..name..")"
or runthis = "Somefunction(\"sometext\",1,1)"
or something
then RoMScript('runthis');
Re: Lootoption addon w/filter
Oh in ver .9 i'll have to add cards and recipies. Drop only recipies that u have learned. And maybe a Monstercardtooltip check on cards if it has been learned.
Re: Lootoption addon w/filter
That doesn't sound right for lua. Maybe you were learning another language? Different rules apply for different languages. Or maybe I don't understand what you're saying.Romplayer wrote:I think i remember my teacher saying that using a variable is 8 bytes of memory while a string is 16 bytes
so ' ' is 8 bytes and " " is 16 bytes. I had to get this off my chest. Because in a table function is 32 bytes so ' ' wouldn't work therefore u have to use the string modifer " " which is a 16 byte.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Who is online
Users browsing this forum: No registered users and 0 guests