L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Thread Closed 
 
Thread Rating:
  • 25 Vote(s) - 2.28 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AUTO ENCHANT TUTORIAL!!!!! HELP?
Author Message
deckman Offline
Gremlin
*

Posts: 8
Joined: Mar 2012
Reputation: 0
Version: 1.4.1.76
Post: #1
Question AUTO ENCHANT TUTORIAL!!!!! HELP?

Hello guys,

I have seen AAAAAAAAAAAAAALL these threads posted by Admins,moderators
Programmers showing their Scripts.

To give you an example :

LUA PROGRAMMIN AUTO ENCHANT POST

OR the following Script :

Quote:
    LUA Programming
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
			-- ShowToClient("ITEM", item.Name .. " (ID: " .. item.displayId  .. ")");
			return item
		end
	end
end
 
maxenchant = 5
GetEnchantManager():setDelay(2100)
ShowToClient("Enchant:", "LOLLLLLLL")
 
while true do
	weapon = getItemByName("Great Pata", maxenchant)
	enchant = getItemByName("Scroll: Enchant Weapon ©", maxenchant)	
	if ( weapon == nil or enchant == nil ) then
		ShowToClient("Enchant:", "Out of weapons of enchants")
		break
	end
 
	if ( weapon.Enchanted > maxenchant ) then
		ShowToClient("Enchant:", "Reached desired enchant")
		break
	end
 
	GetEnchantManager():setEnchantId(enchant.objectId)
	GetEnchantManager():setItemId(weapon.objectId)
	GetEnchantManager():Enchant()
	-- ShowToClient(">>>>",  "Waiting for result...");
	while ( enchantResult() == Enchant.ENCHANT_PENDING ) do
		Sleep(200)
	end
	if ( enchantResult() == Enchant.ENCHANT_SUCCESS ) then	
		Sleep ( 100 ) -- sleep so item data is updated
		weapon = GetInventory():FindById(weapon.objectId)
		ShowToClient("Enchant",  weapon.Name .. " is now +" .. weapon.Enchanted);
	elseif ( enchantResult() == Enchant.ENCHANT_FAILURE ) then
		ShowToClient("Enchant",  weapon.Name .. " failed on " .. weapon.Enchanted .. " -> " .. weapon.Enchanted+1)
	end
	-- ShowToClient(">>>>",  "Last result" .. tostring(enchantResult()));
end


So I really do appreciate their time an effort.
But HOW am I suppossed to understand what i should edit in order to make it work!!

so PLEASE!
In case you know how to make this thing work post an example including
HIGHLIGHTED SECTIONS THAT NEED TO BE EDITED (input item Ids , names)
And generally comprehensive to everyone!

Thank you so much Smile
(This post was last modified: 03-21-2012 06:45 AM by Fox.)
03-21-2012 00:50 AM
Find all posts by this user
Hebdzik Offline
Tester

Posts: 1,235
Joined: Aug 2011
Reputation: 265
Version: 1.4.3.143
Post: #2
RE: AUTO ENCHANT TUTORIAL!!!!! HELP?

this is only what you need to change

    LUA Programming
maxenchant = 5 --set your max enchant you want make
GetEnchantManager():setDelay(2100)
ShowToClient("Enchant:", "LOLLLLLLL")
 
while true do
	weapon = getItemByName("Great Pata", maxenchant) --wepon name
	enchant = getItemByName("Scroll: Enchant Weapon B", maxenchant) --enchant name



--set your max enchant you want make
--wepon name
--enchant name
(This post was last modified: 03-21-2012 09:05 AM by Hebdzik.)
03-21-2012 09:04 AM
Find all posts by this user
deckman Offline
Gremlin
*

Posts: 8
Joined: Mar 2012
Reputation: 0
Version: 1.4.1.76
Post: #3
RE: AUTO ENCHANT TUTORIAL!!!!! HELP?

(03-21-2012 09:04 AM)wppw Wrote:  this is only what you need to change

    LUA Programming
maxenchant = 5 --set your max enchant you want make
GetEnchantManager():setDelay(2100)
ShowToClient("Enchant:", "LOLLLLLLL")
 
while true do
	weapon = getItemByName("Great Pata", maxenchant) --wepon name
	enchant = getItemByName("Scroll: Enchant Weapon B", maxenchant) --enchant name



--set your max enchant you want make
--wepon name
--enchant name
Hmmmm all i get is the message "LoLLLL"
Maybe it doesent work on the server? ;/
03-21-2012 18:35 PM
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Auto Augment - Services / AIO NPC. 2pho3nix 11 18,336 07-27-2020 09:37 AM
Last Post: z3renity
  [Need Help] Enchant Script nvnhathuy 1 5,541 03-03-2017 20:07 PM
Last Post: deivuzas1
  L2 tower connect -Infinity Odissey win 10 tutorial darkbee 6 6,655 05-09-2016 20:11 PM
Last Post: diegomadmax
  Help, with "Auto" De-level script JavaFan 3 3,326 11-12-2015 17:18 PM
Last Post: JavaFan
  Get skill enchant level raid1141 1 4,504 10-15-2015 14:57 PM
Last Post: raid1141
  [HELP] Auto Saved DC ! nikevers 0 2,113 07-28-2015 00:32 AM
Last Post: nikevers
  AUTO RES ACCEPT sonsfully 17 12,102 07-15-2015 19:59 PM
Last Post: Maveco
  Auto Accept Res Not working aywka 32 17,685 07-10-2015 08:16 AM
Last Post: TheQQmaster
Information pet auto attack alexanderkalm 0 2,788 07-09-2015 06:14 AM
Last Post: alexanderkalm
  WTB Auto accept mail scripts or plugins king200527 0 2,372 07-07-2015 11:39 AM
Last Post: king200527



User(s) browsing this thread: 1 Guest(s)