Lineage 2 Tower Forum

Full Version: HELP AUGMENT SCRIPT
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My script works very well but don't put "Gemstone C" , the gemstones count stays always as many as u buy..Example: if u buy 25 gemstones in shop u can augment infinite weapons, and in the inventory count stay 25 always... Please help me fix this script

[Image: GhsGhq.png][/php]





local weaponName = "Vesper Caster"
local lifestoneName = "Mid-Grade Life Stone: level 76"
local gemstoneName = "Gemstone C"
local gemstone_count = 25
local npcName = "Augmenter"

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(500)
Click("", "Augment");
Sleep(200)
return true
end
return false
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(500)
Click("", "Remove");
Sleep(200)
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)
Sleep (100)
GetAugmentManager():setLifeStoneId(lifestone.objectId)
Sleep (100)
GetAugmentManager():setGemstoneId(gemstone.objectId, gemstone_count)
Sleep (100)
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
lol what? wee woo wee woo chinese bot alert wee woo wee woo
I love the way you struggle to hide your inventory items and NPC title but you leave the server name and site.. just beautiful

[Image: Ghs_Ghq.png]
yeah i dont get why he did that...it seems backwards.

(02-13-2015 20:23 PM)tophersoccer Wrote: [ -> ]yeah i dont get why he did that...it seems backwards.

I need this help too mutch augmenting its only 5% there

(02-13-2015 19:49 PM)eustach3 Wrote: [ -> ]I love the way you struggle to hide your inventory items and NPC title but you leave the server name and site.. just beautiful

[Image: Ghs_Ghq.png]

I don't care about the server , i care about my player cuz i got at least 4 weeks farming and don't want to get banned right now Smile
(02-13-2015 20:55 PM)enio12 Wrote: [ -> ]I don't care about the server , i care about my player cuz i got at least 4 weeks farming and don't want to get banned right now Smile

move adena and items to a non-bot account, repost image so we can see your name, we report you to server, you get banned, but you still have adena and items on other account, problem solved
Anyway.. it`s not possible on interlude to move gemstone to augment window.. it`s just bugged on interlude... apparently no one could make it work for interlude.
Reference URL's