Hello , im new in here, i got questions, could someone help out or lead the way how to create script for L2Aeron, They have deleted the original npc-s , and the npc who augments :
Npc name: Misc-Manager
and there are 2 boxes:
1. Add Augment
2. Remove Augment
possible to get it work there?
.recStart augu.lua
--do all targeting cliking etc
.recstop
import code from augu.lua to oryginal code witch you have on forum. Those are basic's of scripting.
--Premium Only: SCONFIG = L2TConfig.GetConfig();
--Premium Only: SCONFIG_FILE = GetDir() .. '\\scripts\\augu111.l2b';
--Premium Only: L2TConfig.SaveConfig(SCONFIG_FILE);
moveDistance = 30;
TargetNpc("Misc-Manager", 32252);
Talk();
ClickAndWait("npc_268438710_Augment 1", "Add Augment");
Talk();
ClickAndWait("npc_268438710_Augment 2", "Remove Augment");
MoveTo(82158, 148852, -3467, moveDistance);
--Premium Only: L2TConfig.LoadConfig(SCONFIG_FILE);
need that script too
LUA Programming
local weaponName = "Eternal Core Dual Sword {PvP}"
local lifestoneName = "Top-Grade Life Stone - Level 86"
local gemstoneName = "Gemstone B"
local gemstone_count = 36
local npcName = "Misc-Manager"
function getItemByName(name)
invList = GetInventory();
for item in invList.list do
if item.Name == name then
-- ShowToClient("ITEM", item.Name .. " (ID: " .. item.displayId .. ")");
return item
end
end
end
function openAugmentWindow(name)
target = GetTarget()
if ( target ~= nil ) then
if ( target:GetName() ~= name ) then
CancelTarget(true)
Sleep(500)
TargetNpc(name, 0)
Sleep(500)
end
else
TargetNpc(name, 0)
Sleep(500)
end
target = GetTarget()
if ( target ~= nil and target:GetName() == name ) then
Talk()
Sleep(750)
ClickAndWait("npc_268439394_Augment 1", "Add Augment");
Sleep(750)
return true
end
return false
end
function getItemByName(name)
invList = GetInventory();
for item in invList.list do
if item.Name == name then
-- ShowToClient("ITEM", item.Name .. " (ID: " .. item.displayId .. ")");
return item
end
end
end
function openAugmentCancelWindow(name)
target = GetTarget()
if ( target ~= nil ) then
if ( target:GetName() ~= name ) then
CancelTarget(true)
Sleep(500)
TargetNpc(name, 0)
Sleep(500)
end
else
TargetNpc(name, 0)
Sleep(500)
end
target = GetTarget()
if ( target ~= nil and target:GetName() == name ) then
Talk();
Sleep(750)
ClickAndWait("npc_268439394_Augment 2", "Remove Augment");
Sleep(750)
return true
end
return false
end
weapon = getItemByName(weaponName)
if ( weapon == nil ) then
ShowToClient("AUGMENT", "Could not find weapon " .. weaponName)
else
weaponId = weapon.objectId
GetAugmentManager():setItemId(weaponId)
repeat
if ( weapon.RefineryOp2 == 0 ) then
lifestone = getItemByName(lifestoneName)
gemstone = getItemByName(gemstoneName)
if ( lifestone == nil or gemstone == nil ) then
ShowToClient("AUGMENT:", "Out of gemstones or life stones")
break
end
GetAugmentManager():setItemId(weaponId)
GetAugmentManager():setLifeStoneId(lifestone.objectId)
GetAugmentManager():setGemstoneId(gemstone.objectId, 36)
GetAugmentManager():Augment()
if ( openAugmentWindow(npcName) == false ) then
break
end
while ( GetAugmentManager():getAugmentResult() == Augment.AUGMENT_PENDING ) do
Sleep(200)
end
if ( GetAugmentManager():getAugmentResult() == Augment.AUGMENT_FINISHED ) then
Sleep ( 100 ) -- sleep so item data is updated
weapon = GetInventory():FindById(weaponId)
end
if ( GetAugmentManager():KeepAugment ( weapon.RefineryOp2 ) == true ) then
ShowToClient("AUGMENT:", "You have achieved desired augment! " .. weapon.RefineryOp2)
break
end
else
if ( GetAugmentManager():KeepAugment ( weapon.RefineryOp2 ) == true ) then
ShowToClient("AUGMENT:", "You have achieved desired augment! " .. weapon.RefineryOp2)
break
end
GetAugmentManager():setItemId(weaponId)
GetAugmentManager():AugmentCancel()
if ( openAugmentCancelWindow(npcName) == false ) then
break
end
while ( GetAugmentManager():getAugmentCancelResult() == Augment.AUGMENT_CANCEL_PENDING ) do
Sleep(200)
end
if ( GetAugmentManager():getAugmentCancelResult() == Augment.AUGMENT_FINISHED ) then
Sleep ( 100 ) -- sleep so item data is updated
end
weapon = GetInventory():FindById(weaponId)
end
until false
end
and
LUA Programming
repeat
Sleep(7000);
TargetNpc("Misc-Manager", 32252)
Command("/attack");
until falsh;
Hey guys is it possible to edit this script just to augment and remove augment with some delay w/o use l2 editor i do evrything with editor mark unmark all other safe as restart l2t but dont work i just wana auto augment deaugment i will wach and stop for l2aeron server Ty in advance
it doesnt work for me.
problem appears on line 17.
same problem line 17.......
Hey, i got problem on the remove augment option. The script starts adds an augment but never removes it after. Help pls