Scripting 101: By Xenosaga21
[Only registered and activated users can see links. Click Here To Register...]
What you need to start scripting!
First off If you want to code for OOG you will need a simple word processing program like Word Pad ( BUT IT HAS TO BE ABLE TO SAVE IN UNICODE )
I.) What is scripting and what is it used for ?
;) Glad you asked scripting in lineage 2 walker allows you to automate more tasks that some of the general pre-configurable options do not allow you to do. . .
For Example ... say your leveling in a zone and you suddenly die. . . you are asleep so there is no -one awake to setup your bot again = Loss of time and you wake up to the disappointment of your char having gained nothing. . . well NOT TO FEAR! L2 Walker allows you to create and run a script so that when you die . . . your char will WALK BACK AND START FARMING AGAIN ! XD . . . This is only 1 prime example of what you can accomplish . . . there are limitations tho.
II.) Basic Script Commands and Explanation
Basics (an excerpt from A-style's Guide on MaxCForum.)
Whenever you see something relate to something like (TEXT) think of (TEXT) as a Variable...
Bellow is a way to use skills Via Script.
UseSkill(NAME[ID=#],Player,TARGETNAME)
Name = The Name of the Skill; ID=# is the ID of the Skill TARGETNAME = name of player you want to cast on... Player refers to the type of target.... . . so you would use it as so to cast
Windwalk. . . on self and player
USESKILL(Wind Walk[ID=1204],Self,Elf)
Simple enough?
This guide will be finished over time its a large topic. . .
Bellow is a link to a few useful script Snippets to learn from... for now.
NOTE: THESE ARE NOT ALL PRE-COMPILED SCRIPTS THAT RUN OUT OF BOX JUST SNIPPETS! AND TOOLS TO LEARN FROM DON'T SPAM *OMGZ THIS DOESN'T WORK
De-Level In Dwarf Village
[Only registered and activated users can see links. Click Here To Register...]
Counts Items and Decides to go Back to Town if Item Count is low.
[Only registered and activated users can see links. Click Here To Register...]
Heres some Stuff to play with for now ;)( No I did not write these scripts so . . .)
CLASS CHANGE QUESTS!
Human wizard Class Change (LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Shillen Oracle Quest(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Dark Elf Wizard Class Change(LvL20)
[Only registered and activated users can see links. Click Here To Register...]
Dark Elf Assassin Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Human Cleric Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Scavenger Class Change (LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Elven Rogue Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Human Rogue Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
To be Continued. . .
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
What you need to start scripting!
First off If you want to code for OOG you will need a simple word processing program like Word Pad ( BUT IT HAS TO BE ABLE TO SAVE IN UNICODE )
I.) What is scripting and what is it used for ?
;) Glad you asked scripting in lineage 2 walker allows you to automate more tasks that some of the general pre-configurable options do not allow you to do. . .
For Example ... say your leveling in a zone and you suddenly die. . . you are asleep so there is no -one awake to setup your bot again = Loss of time and you wake up to the disappointment of your char having gained nothing. . . well NOT TO FEAR! L2 Walker allows you to create and run a script so that when you die . . . your char will WALK BACK AND START FARMING AGAIN ! XD . . . This is only 1 prime example of what you can accomplish . . . there are limitations tho.
II.) Basic Script Commands and Explanation
Basics (an excerpt from A-style's Guide on MaxCForum.)
Whenever you see something relate to something like (TEXT) think of (TEXT) as a Variable...
That is a lot to take in . . . so read over it and look for things that look like they will help you . . . do exactly what you want to. . .Quote:
GOHOME()
//Goes to town upon death
SAY(Message)
//If you want to say something in general chat. (This function can't be used for pm's)
JMP(TEXT)
//Jumps to a CALL(TEXT) where the text inside the brackets is the same.
CALL(TEXT)
//Jumpst to a LABEL(TEXT) where the text inside the brackets is the same.
LABEL(TEXT)
//Marks a position for the use of a call.
DELAY(x)
x = milliseconds
//Waits to continue the script.
Pause(x)
x = milliseconds
//Pauses the script.
EXIT()
//Exits script.
Items
USEITEM(ITEMNAME[ID=#])
//Uses a item
BuyItem(ITEMNAME[ID=#],#)
//Buys one item.
BuyItem(ITEMNAME[ID=#],#;ITEMNAME[ID=#],#)
//Buys more than one item at a time. You can buy as many items as wanted there is no limit.
SavelItem(ITEMNAME[ID=#],#)
//Saves item into Warehouse
SavelItem(ITEMNAME[ID=#],#;ITEMNAME[ID=#],#)
//Saves more than one item into Warehouse
LoadItem(ITEMNAME[ID=#],#)
//Takes item out of Warehouse
LoadItem(ITEMNAME[ID=#],#;ITEMNAME[ID=#],#)
//Takes items out of Warehouse
NPC Interaction
NPCSEL(NPCNAME[ID=#])
//Selects an NPC.
NPCDLG(NPCNAME)
//Starts dialogue with an NPC.
DLGSEL(dialogue)
//Selects a dialogue option [ex: DLGSEL(Buy)]
PC (Player Character) Interaction
ChangeWaitType(x)
//Sit/Stand
x = 0 Sit
x = 1 Stand
SET(FIGHTSTART)
//Starts to fight (Just like clicking Start Combat)
SET(FIGHTSTOP)
//Stops to fight
If Commands All If Commands contain ({}) if the expectaions of the "If Command" is met, it will activate the script within ({})
CharStatus([CHP|CMP|HP|MP|WEIGHT|LV|SP|RACE|STAND],[>=|>|==|!=|<|<=],num)
{
}
CHP = Characters HP.
CMP = Characters MP.
HP = HP (%)
MP = MP (%)
WEIGHT = Characters weight count. (%)
LV = Gets level.
SP = Skill point count.
RACE = The race of your character.
STAND = Checks if your sitting or standing
...,==,0) Sit
...,==,1) Stand
PosInRange(x,y,z,range)
{
}
//Checks to see that your inside the range and enables the script within the brackets ({})
PosOutRange(x,y,z,range)
{
}
//Checks to see that your outside the range and enables the script within the brackets ({})
ITEMCOUNT(ItemName[ID=#],<,1)
{
}
//Counts the ammount of an item and if it satisfies the <, >, = it enables script withing the brackets ({})
StrInDlg(dialogue)
{
}
//Checks if there is a string in a dialogue. Anything in ({}) is enabled.
Bellow is a way to use skills Via Script.
UseSkill(NAME[ID=#],Player,TARGETNAME)
Name = The Name of the Skill; ID=# is the ID of the Skill TARGETNAME = name of player you want to cast on... Player refers to the type of target.... . . so you would use it as so to cast
Windwalk. . . on self and player
USESKILL(Wind Walk[ID=1204],Self,Elf)
Simple enough?
This guide will be finished over time its a large topic. . .
Bellow is a link to a few useful script Snippets to learn from... for now.
NOTE: THESE ARE NOT ALL PRE-COMPILED SCRIPTS THAT RUN OUT OF BOX JUST SNIPPETS! AND TOOLS TO LEARN FROM DON'T SPAM *OMGZ THIS DOESN'T WORK
De-Level In Dwarf Village
[Only registered and activated users can see links. Click Here To Register...]
Counts Items and Decides to go Back to Town if Item Count is low.
[Only registered and activated users can see links. Click Here To Register...]
Heres some Stuff to play with for now ;)( No I did not write these scripts so . . .)
CLASS CHANGE QUESTS!
Human wizard Class Change (LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Shillen Oracle Quest(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Dark Elf Wizard Class Change(LvL20)
[Only registered and activated users can see links. Click Here To Register...]
Dark Elf Assassin Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Human Cleric Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Scavenger Class Change (LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Elven Rogue Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
Human Rogue Class Change(LVL20)
[Only registered and activated users can see links. Click Here To Register...]
To be Continued. . .
[Only registered and activated users can see links. Click Here To Register...]