deckman
Gremlin

Posts: 8
Joined: Mar 2012
Reputation: 0
Version:
1.4.1.76
|
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
(This post was last modified: 03-21-2012 06:45 AM by Fox.)
|
|
| 03-21-2012 00:50 AM |
|
Hebdzik
Tester
Posts: 1,235
Joined: Aug 2011
Reputation: 265
Version:
1.4.3.143
|
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 |
|
deckman
Gremlin

Posts: 8
Joined: Mar 2012
Reputation: 0
Version:
1.4.1.76
|
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 |
|