![]() |
MY MACRO. Help my write. - Printable Version +- BBot - The best bot of the world (https://forums.bmega.net) +-- Forum: Support (https://forums.bmega.net/forum-6.html) +--- Forum: Support & Help (https://forums.bmega.net/forum-8.html) +--- Thread: MY MACRO. Help my write. (/thread-12780.html) |
MY MACRO. Help my write. - tem0x43 - 11-22-2013 I want doing macro fallow lider. Still a lot of work to do. My first problem is five line of this code: ID_LIDER:=Creature.ByName(NAME_LIDER) ID_MY:=Creature.ByName(NAME_MY) k:=Creature.X(!ID_LIDER!) z:=Creature.X(!ID_MY!) c:=(k-z) Self.Say(!c!) Here I want obtain different position. When i have there i can use if-function. For example: if (c>=2) Self.MoveE if(c<=2) Self.MoveW. Now function Self.Say(!c!) always return 0, function c:=(k-z) have wrong form. My second problem is correct form function if() in BBot. c:=(!k!-!z!) is too wrong form. RE: MY MACRO. Help my write. - Thiaguin- - 11-22-2013 (11-22-2013, 01:17 PM)tem0x43 Wrote: I want doing macro fallow lider. Still a lot of work to do. My first problem is five line of this code: what you need to do the bbot(macro) ? RE: MY MACRO. Help my write. - tem0x43 - 11-22-2013 I play on OTS. I have two character online in the same time. I need to my one character follow my second character. Function Creature.Follow() don't work, so i want do this other way. If c =1 or c=-1, that mean character one is next to character two (don't work anything). If c>=2 or c<=2 that mean character which must go follow is too far followed character (then he must go step East or West). c=0 only when both in the same place (impossible, when i going on one level) Now i doing only X-position (East, West). RE: MY MACRO. Help my write. - Thiaguin- - 11-22-2013 (11-22-2013, 02:23 PM)tem0x43 Wrote: I play on OTS. I have two character online in the same time. I need to my one character follow my second character. Function Creature.Follow() don't work, so i want do this other way. look, Creature.Follow (macro) requires ID, and id of all players is 99.. i don't know but i think it is impossible .. RE: MY MACRO. Help my write. - MegaNo0body - 11-22-2013 (11-22-2013, 02:40 PM)Thiaguin- Wrote:(11-22-2013, 02:23 PM)tem0x43 Wrote: I play on OTS. I have two character online in the same time. I need to my one character follow my second character. Function Creature.Follow() don't work, so i want do this other way. The creature item id is 99, but each creature has it's own ID, which you can get by using Creature.ByName... RE: MY MACRO. Help my write. - Thiaguin- - 11-22-2013 (11-22-2013, 02:42 PM)MegaNo0body Wrote:(11-22-2013, 02:40 PM)Thiaguin- Wrote:(11-22-2013, 02:23 PM)tem0x43 Wrote: I play on OTS. I have two character online in the same time. I need to my one character follow my second character. Function Creature.Follow() don't work, so i want do this other way. yes .. but I tried that too and not get anything .. sometimes I'm doing wrong I do not know =( RE: MY MACRO. Help my write. - tem0x43 - 11-22-2013 Yes ID monster and player is 99 and which i get by using Creature.ByName return own ID. But i want know only why dosn't work c:=(k-z). Why don't return: ...-2..-1..0..1.2..., and always return 0? RE: MY MACRO. Help my write. - howcio - 11-23-2013 (11-22-2013, 07:05 PM)tem0x43 Wrote: Yes ID monster and player is 99 and which i get by using Creature.ByName return own ID. But i want know only why dosn't work c:=(k-z). Why don't return: ...-2..-1..0..1.2..., and always return 0? becouse if you want to make any mathematical operations you need to use : Code: VarAdd(Name, Value) Increase the variable value by a given value RE: MY MACRO. Help my write. - tem0x43 - 11-23-2013 Can you impement this in my code? |