Jump to content

L2Tower Enchant Problem


Bk94
 Share

Recommended Posts

Καλησπέρα . Έχω ένα πρόβλημα με το L2Tower . Τρέχω κανονικά το enchantbless αλλά κάνει +1,+2 μόνο. μπορεί κάποιος να βοηθήσει.

 

 

Ευχαριστώ εκ των προτέρων.

 

 

-- SCRIPT CONFIGURATION!

 
item_name = "Dynasty Leather Gloves"
enchant_name = "Blessed Scroll: Enchant Armor (Grade S)"
blessed_enchant_name = "Blessed Scroll: Enchant Armor (Grade S)"
max_enchant = 30
max_safe_enchant = 0
delay = 0
 
-- END OF SCRIPT CONFIGURATION
 
-- HELPER FUNCTIONS
function enchantResult()
  return GetEnchantManager():getLastResult()
end
 
function getItemByName(name, maxenchant)
invList = GetInventory();
for item in invList.list do
if item.Name == name and item.Enchanted < maxenchant then
return item
end
end
end
 
stats = {}
 
function registerSuccess(base)
if stats[base] == nil then
stats[base] = { success = 0, failure = 0 }
end
stats[base].success = stats[base].success + 1
end
 
function registerFailure(base)
if stats[base] == nil then
stats[base] = { success = 0, failure = 0 }
end
stats[base].failure = stats[base].failure + 1
end
 
function printStatistics()
for i,v in ipairs(stats) do
ShowToClient("Enchant", "[" .. i - 1 .. "->" .. i .. "] Rate: success: " .. v.success .. " / fail: " .. v.failure .." (" .. ( v.success  * 100 )/ ( v.success + v.failure ) .. "%)")
end
end
 
-- MAIN LOOP!
 
while true do
-- find item for enchanting
item = getItemByName(item_name, max_enchant)
if ( item == nil ) then
ShowToClient("Enchant", "Out of items" )
break
end
-- find proper enchant scroll
enchant = nil
if ( item.Enchanted >= max_safe_enchant ) then
enchant = getItemByName(blessed_enchant_name, 20)
else
enchant = getItemByName(enchant_name, 20)
end
 
if ( enchant == nil ) then
ShowToClient("Enchant", "Out of enchants")
break
end
 
  GetEnchantManager():setDelay(0)
GetEnchantManager():setEnchantId(enchant.objectId)
GetEnchantManager():setItemId(item.objectId)
GetEnchantManager():Enchant()
 
while ( enchantResult() == Enchant.ENCHANT_PENDING ) do
Sleep( 200 )
end
 
if ( enchantResult() == Enchant.ENCHANT_SUCCESS ) then
Sleep ( 500 ) -- sleep so item data is updated
item = GetInventory():FindById(item.objectId)
ShowToClient("Enchant",  item.Name .. " is now +" .. item.Enchanted);
registerSuccess ( item.Enchanted )
elseif ( enchantResult() == Enchant.ENCHANT_FAILURE ) then
ShowToClient("Enchant",  item.Name .. " failed on " .. item.Enchanted .. " -> " .. item.Enchanted+1)
Sleep ( 500 ) -- sleep so item data is updated
registerFailure ( item.Enchanted + 1)
end
printStatistics()
end
ShowToClient("Enchant", "Enchant script finished")
printStatistics()

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Posts

    • the link of .sql is dead can you reupload?
    • Check out this topic above. The 2nd post specifically. It will help you understand.
    • Hello, how i can increase more glow as image say? https://prnt.sc/20xegv7 I want to be on whole weapon. It is possible? I use High Five client. This is weapon for what i want to do this.  0 30002 1 1 7 10 0 LineageWeapons.dragon_Slayer_m00_wp LineageWeapons.dragon_slayer_m00_wp LineageWeaponsTex.dragon_slayer_t00_wp LineageWeaponsTex.dragon_slayer_t00_wp 0 0 0 0 0 1 0 0 icon.weapon_dual_sword_i00 icon.weapon_dragon_slayer_i00 icon.weapon_dragon_slayer_i00 -1 1520 47 0 0 0 1 7 3 2 LineageWeapons.dragon_slayer_m00_wp LineageWeapons.dragon_slayer_m00_wp 1 1 2 LineageWeaponsTex.dragon_slayer_t00_wp LineageWeaponsTex.dragon_slayer_t00_wp 1 ItemSound.itemdrop_sword ItemSound.itemequip_sword 10 1576 1276 8 7 8 0 0 0 0 325 0 1 1 1000 0 1 0 LineageEffect.w_vari_r4_000_a LineageEffect.w_vari_b4_000_a 1.00000000 0.00000000 0.00000000 1.00000000 0.00000000 0.00000000 2.00000000 2.00000000 2.00000000 2.00000000 LineageWeapons.rangesample LineageWeapons.rangesample 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0 -1 -1 -1 -1 -1 Thank you!
    • Hi. I've already added the patch but when I want to talk to npc, I get this error on the console.   and the lines the gs marks me are these but I can't find the problem
    • I don't think you're picking a fight and your question makes sense in general, but the whole point of owning retail formulas is to offer the only project that resembles 100% what it was like playing on servers like Teon, Franz, Bartz and so on. Also, it holds the collector's value.    Imagine a very rare coin of 1 cent. Its typical value is 1 cent, but it can be sold for 3.000 or even higher.    My point is that yes, you can easily change MC rate buffs, set caps, or create your own MC rate formula if you're using Java code, but you will never have the original version. Most L2J projects don't even have an MC rate formula at all, but just use a static value of 0.8% (8/1000) as a base mc rate and it gets multiplied by buffs.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disbaled AdBlock