rxemi
Gremlin
Posts: 9
Joined: Dec 2011
Reputation: 0
Version:
1.4.3.143
|
Augmentation Script for H5 ( Customised )
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?
|
|
12-11-2012 13:32 PM |
|
Hebdzik
Tester
Posts: 1,235
Joined: Aug 2011
Reputation: 265
Version:
1.4.3.143
|
RE: Augmentation Script for H5 ( Customised )
.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.
Warning hammer!!! Use Search before you post something
If i hellp you, you can thx me by +1 Reputation
|
|
12-11-2012 13:54 PM |
|
rxemi
Gremlin
Posts: 9
Joined: Dec 2011
Reputation: 0
Version:
1.4.3.143
|
RE: Augmentation Script for H5 ( Customised )
--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);
|
|
12-11-2012 16:13 PM |
|
InoOx
Gremlin
Posts: 7
Joined: Sep 2011
Reputation: 0
Version:
1.4.1.128
|
RE: Augmentation Script for H5 ( Customised )
need that script too
|
|
12-11-2012 21:25 PM |
|
kyrpa
Expired VIP Member
Posts: 13
Joined: Nov 2011
Reputation: 0
Version:
1.4.2.132
|
RE: Augmentation Script for H5 ( Customised )
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;
(This post was last modified: 12-19-2012 21:04 PM by kyrpa.)
|
|
12-19-2012 20:55 PM |
|
Tocy2121
Elpy
Posts: 3
Joined: Sep 2012
Reputation: 0
Version:
1.4.1.112
|
RE: Augmentation Script for H5 ( Customised )
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
|
|
12-23-2012 14:18 PM |
|
kavvadi
Elpy
Posts: 1
Joined: Jan 2012
Reputation: 0
Version:
1.4.2.133
|
RE: Augmentation Script for H5 ( Customised )
it doesnt work for me.
problem appears on line 17.
|
|
01-22-2013 01:22 AM |
|
gandohar9
Elpy
Posts: 1
Joined: Jan 2013
Reputation: 0
Version:
1.4.1.95
|
RE: Augmentation Script for H5 ( Customised )
bump
|
|
01-28-2013 02:44 AM |
|
SHOWmeLOVE
Amber Basilisk
Posts: 30
Joined: Mar 2012
Reputation: 0
Version:
1.4.2.133
|
RE: Augmentation Script for H5 ( Customised )
same problem line 17.......
|
|
01-30-2013 19:37 PM |
|
sone78
Elpy
Posts: 4
Joined: Feb 2013
Reputation: 0
Version:
1.4.3.143
|
RE: Augmentation Script for H5 ( Customised )
Hey, i got problem on the remove augment option. The script starts adds an augment but never removes it after. Help pls
|
|
02-06-2013 03:43 AM |
|