I am trying to create myself a script for luna that just spam skill 1 and 2 forever, meanwhile checks if MAD miniboss comes and use the 5th skill. When last boss spowns, it uses skill 3 4 and 5 until it's dead.
But i think i got something wrong.
I was wondering how can i make the script to do something forever, like a while statement. And in this while statement, with an if, enter in another while statement. The script snippet that i made should work but i gotta write it in a better way.
Basicly i want to farm luna manually but i want the script to spam skill 1 and 2, while spamming i want it to check if mad miniboss spown and kill him and, when the last boss spowns, make the script spam skill 3 4 and 5 on the last boss target.
Thx for your help when u have time to fix this snippet, cheers
Code:
#DO=600000;
#EXECUTE=FarmLuna;
_UNTILMemRead=0xF557C4,BYTE,=1; ( while i have target? i dont know how to do something else, would be cool to say while im in the luna istance world ( I recall there should be a pointer with the map id in some memory register))
start_FarmLuna;
Delay=10;
Command=/skill Soul Skewer;
Delay=10;
Command=/skill Crushing Darkness;
Delay=10;
Command=/select MAD-74C;
_IFMemPtrRead=%TargetBase,%OffsetName,WCHAR[32],=MAD-74C;
_IFMemPtrRead=%TargetBase,%OffsetHP,DWORD,>0;
#IF=%TargetDistance,<15;
#IF=%Timer=415,60500;
Command=/skill Hellish Wave;
Delay=20;
Command=/skill Hellish Wave;
_IFMemPtrRead=%TargetBase,%OffsetName,WCHAR[32],=MAD-S;
#EXECUTE=FarmLastBoss;
end_FarmLuna;
start_FarmLastBoss;
#DO=600000;
Delay=10;
Command=/skill Terrifing Rupture;
Delay=10;
Command=/skill Hellish Stike;
Delay=10;
Command=/skill Hellish Wave;
_IFMemPtrRead=%TargetBase,%OffsetHP,DWORD,=0; (exit the script)
_UNTILMemRead=0xF557C4,BYTE,=1; ( while i have target? i dont know how to do something else, would be cool to say while im in the luna istance world ( I recall there should be a pointer with the map id in some memory register))
end_FarmLastBoss;
Loops are defined like this
Code:
#DO=300000;
some code
_UNTILMemPtrRead=%TargetBase,%OffsetHP,DWORD,=0;
This executes the code between the "#DO" and the "_UNTIL" till the condition of "_UNTIL" is true or till the timeout of 300000 milliseconds has been reached.
Now if you want 2 loops inside each other you have 2 methods you whether use #2DO and _2UNTIL like this
Code:
#DO=300000;
code of first loop
#2DO=20000;
code of second loop
_2UNTILMemPtrRead=%TargetBase,%OffsetName,WCHAR[32],=Kerubim;
code of first loop
_UNTILMemPtrRead=%TargetBase,%OffsetHP,DWORD,=0;
The second method would be that you call a function from within the first loop and inside this function you create the second loop, this would look like this
Code:
#DO=300000;
code of first loop
#EXECUTE=SecondLoop;
code of first loop
_UNTILMemPtrRead=%TargetBase,%OffsetHP,DWORD,=0;
start_SecondLoop;
#DO=20000;
code of second loop
_UNTILMemPtrRead=%TargetBase,%OffsetName,WCHAR[32],=Kerubim;
end_SecondLoop;
Since we can declare a timeout at the "#DO" command we can make an infinite loop like this
Code:
#DO=99999999999999;
some code
#UNTIL=1,=2;
the timeout is 99999999999999 milliseconds which is very very long and the condition of the "#UNTIL" command checks if "1" equals "2" which will never be true so it's basically an infinite loop
Once you got the MapID you can implement a checkup in your script for this certain ID, example:
Code:
_IFMemRead=%AddrMap,DWORD,=110010000;
WaitForResponse=Player is in Sanctum;
#ELSE
WaitForResponse=Player is not in Sanctum;
#ENDIF
so you learned that every "#DO" needs an "_UNTIL" to complete the loop, just like that it works with "IF" commands, every "IF" command needs an "#ENDIF" so vanillatool knows where to jump in case the "IF" was false
With this you should be able to fix/improve your script, but I can tell you the official luna script does exactly what you want, it spams key 1 and 2 for the normal mobs and waits till the mad mob appears to burst him away with the 5th skill, he does this until the final boss appears he then switches to skill 3, 4 and 5.
Anyways sure rewriting it by yourself will teach a lot of things.
It's completely pointless in there since he spams F7 and I to not get disconnected while at each iteration he checks if he still is logged in but this ckeckup does nothing than printing a message that he got disconnected so you can cut it away again
why? when I have an Internet break, I have a window about "Not Logged in". how do i make an afk system with dс check?
You mean with relogin, this obviously requires a few mouse clicks at the login screen and a few SendKey lines to enter your login name and password, this only works at EU
_____________
In case someone ever needs a live debug function
Code:
Code:
#IF=%FirstTime,;
_SetVar=DebugText,;
_SetVar=ShowDebug,1; Shows Debug / 0 Hides Debug
#ENDIF
_SetVar=DebugData,Some text; <-- Replace Some text with what ever you want to display
#EXECUTE=Debug; <-- call the Debug function afterwards to actually display what you declared above
Delay=5000;
start_Debug;
#IF=%Var[ShowDebug],=1;
_SetVar=DebugText,%Var[DebugText]/n%Var[DebugData];
_RegExp=%Var[DebugText],((?:(?!\/)(?!n).+?(?:\/n|\z)){1|||15}+\z),DebugText_Display;
_MemPtrReadVar=%PlayerBase,%OffsetName,WCHAR[32],PlayerName;
Display=%Var[DebugText_Display],0,0,Debug: %Var[PlayerName];
#ENDIF
end_Debug;
I need to stay afk and check that I received a disconnect. I have frequent dс. I don't need to log in after dc.
Such method works for me but the script in 1 hour hangs up for me
With this command we can get information from the internet, it's only for advanced users since you need to know how RegEx patterns work, however here's a example code
This code gets the Item name of a certain ItemID in your current client language by using AionCodex.com
Code:
_SetVar=AionCodexID,140001113; <-- Item ID that should get translated
#EXECUTE=GetItemNameByID; <-- calls function to translate the ItemID to our client language
WaitForResponse=Item ID: %Var[AionCodexID]/nTranslated name: %Var[AionCodexReturn];
start_GetItemNameByID;
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/DEU/;
_SetVar=AionCodexLang,de;
#ENDIF
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/ENG/;
_SetVar=AionCodexLang,en;
#ENDIF
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/ENU/;
_SetVar=AionCodexLang,us;
#ENDIF
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/ITA/;
_SetVar=AionCodexLang,it;
#ENDIF
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/ESN/;
_SetVar=AionCodexLang,sp;
#ENDIF
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/FRA/;
_SetVar=AionCodexLang,fr;
#ENDIF
_IFMemRead=%AddrLangPack,CHAR[32],=L10N/PLK/;
_SetVar=AionCodexLang,pl;
#ENDIF
_HTTPGetVar=https://aioncodex.com/%Var[AionCodexLang]/item/%Var[AionCodexID]/,,AionCodexReturn,id="item_name"><b>(.*?)</b></span>;
end_GetItemNameByID;
Hello how are you doing
I ask you a question, I had to format the pc for a problem I had and now the vanilla hack rework does not work for me and I have it paid for.
How can I make it work?
thank you
Script para todos os Lastchaos - Autohokey 01/29/2012 - Last Chaos - 1 Replies I got a script that clicks several times with the click right mouse clicks when monster picks up the tarjeta. so he just throws the skill.
I used AutoHotkey program. in AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText
Needs improvement.
I accept any help.
I'm from Brazil.
------------------------------------------------- --------------------------
[Release]Big Script Library 07/25/2010 - SRO PServer Guides & Releases - 0 Replies I think its a good idea to open this Topic.
I need Your Help.
Sent me your own made Scripts and i upload them here.
It does not matter if there is already a script by the mob.
Only Self made scripts!!!
What To Post?
Post me not the text file.Post me the script!!!
Scorpion 1 by Th3Stalker