It would be nice if someone that has expertise in the macro section (Ezza? ) would commit all usefull macro mods.other modifications that could be committed to extend macro functionality:You could use the info below to complete the macro manual.However please could the authors of the mods double check if the descriptions here match their purpose first?- Special Variables: $.weight, $.maxweighthttp://bibian.ath.cx/openkore/viewtopic.php?t=38257

[EDIT]Some mods indeed need some extra care.So what about having a stable version and branching off a tester version,so ezza's stuff actually will get tested and she will be able to debug where possible?

While trying to attach a .patch file you get this message:The extension patch is not allowed.Could anyone enabled this please, as i see no reason why it should be not enabled?anyways here it is:

Actually I'm very honoured seeing some1 is willing to bring all the mods that I've made to this level ( wow... kLabMouse checked my codes... yeehaaa!!!) even though the script drowned in failure. I dont mind at all... I'm just a script kiddy and my level to perl is 0 and you can see it very clear through the multiple-ifs mods that I've made. I'm sorry, thats all I can do right now for the multiple-ifs coz the unlimited multiple-ifs is a failure. Who am I to compete with the author of the perl language... thats the fact!!! So, to the perl expert out there... we hope that atleast you give us some guidance to make it a reality.

kLabMouse, what do you mean by:-1. not tested well? - If you really mean a not well tested (I understand this as a failure) .. could you pls enlighten me abit how the codes should work. Thx.

2. backward compatible - I dont have any idea what is the meaning of this... I appreciate if you could explain a bit.

kLabMouse, what do you mean by:-1. not tested well? - If you really mean a not well tested (I understand this as a failure) .. could you pls enlighten me abit how the codes should work. Thx.

Mean, that the special piece of code (for complex one), must have a so called "Test case", that test all it's abilities, and show, that all the code works perfect.

ezza wrote:

2. backward compatible - I don't have any idea what is the meaning of this... I appreciate if you could explain a bit.

If you change any of the existing code and functions. You must make them Compatible with old syntax, so users can use both old and new additions.

Ok, thx for the explainations.

Backward Compatible - I think the modified new codes will suits also the original syntax since this is just an issue of enabling the variable inside those syntaxes. If the user put a "$" infront of the syntax value, it will automatically try to match the existing var inside the varStack. If there is no "$" infront of it... the syntax will go/check normally. I've checked this several times and did not find any difficulties in triggering the syntax/conditions. I guaranty it will work.

As for the logic broken in the multiple-if's code. I admit that the codes is not perfect, since I'm not very good in regexp and perl (pls dont laugh). Ex: when there is & or | found at the place that its not should be.

Backward Compatible - I think the modified new codes will suits also the original syntax since this is just an issue of enabling the variable inside those syntaxes. If the user put a "$" infront of the syntax value, it will automatically try to match the existing var inside the varStack. If there is no "$" infront of it... the syntax will go/check normally. I've checked this several times and did not find any difficulties in triggering the syntax/conditions. I guaranty it will work.

Well. We learn from our own bug's. So please. When you say, that one or more of the patches are in final state, tested well, etc. etc., I'll commit them to SVN.Until then, i'll just patiently wait.

- have the @venderprice check on indexID like this: @venderprice(<indexID>)(so we are certain that the right non-stackable item is checked.)

- have a new special keyword @venderamount(<indexID>)

Some other new special keywords:- have a way to get the x'th item from a list: @listitem(<$listIndex>,<$list>)- have a way to get list lenght: @listlenght(<$list>)(for further control (incombination with WHILE) when doing more complex matters that involve price comparing)(ex. of a list: $list = zero,one,two,bar,lol)(ex. $listIndex for lol is 4)Arrays anyone?

I've made all this already, but need criticismn first.

A small macro example to show off this patches possebilities and provide a test case scenario:(fill in venderName, itemName, itemMaxPrice, itemAmount to your desire, and see what it does)

# get the amount of stackables that can be bought in a bulk $bMaxAmt = 0 do eval $::Macro::Data::varStack{bMaxAmt} = int($.zeny / $vMinP) log Possible zenywise bulkbuyamount of stackables: $bMaxAmt if ($bMaxAmt == 0) goto notenoughzenny

# check if the wanted itemAmount of non-stackable items is available, and buy 1 # next will be bought in next checkbuylistloop # if more than 1 of the same items are in a shop, then the item is non-stackable for sure if ($vLstLen > 1) goto buyNstack

Summary:- special keyword @venderprice(<indexID>)returns an items price or -1 if the item is not found or if no shop is being visited.

- special keyword @venderItem(<itemName>)returns a list of indexes (for multiple non-stackables) or a single item (for stackables or single non-stackables) or -1 if item was not found in the vender's list or if no shop is being visited.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum