# Engine written by Advi # Data input NewAge (if u have questions about why some SA's are on the list and some aren't -> C3 changes import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest from net.sf.l2j.gameserver import ItemTable ############################## Feel Free to add more Weapons ##########################################################################################################3 # Weapon enhancement definition WeaponID:[Icon, [Enhancement, newWeaponID, CrystalID, MaterialID, MaterialQuant], ...] EnhanceList={ #Bows' 288:["weapon_carnium_bow_i01", [["Light", 5608, 5577, 2133, 147], ["Critical Bleed", 5609, 5578, 2133, 147], ["Mana Up", 5610, 5579, 2133, 147]]], 289:["weapon_soul_bow_i01", [["Cheap Shot", 5611, 5580, 2133, 147], ["Quick Recovery", 5612, 5581, 2133, 147], ["Critical Poison", 5613, 5582, 2133, 147]]], # Swords' 150:["weapon_elemental_sword_i01", [["Magic Power", 5638, 5577, 2133, 147], ["Magic Paralyze", 5639, 5578, 2133, 147], ["Empower", 5640, 5579, 2133, 147]]], 80:["weapon_tallum_blade_i01", [["Critical Poison", 5635, 5577, 2133, 147], ["Haste", 5636, 5578, 2133, 147], ["Anger", 5637, 5579, 2133, 147]]], 151:["weapon_sword_of_miracle_i01", [["Magic Power", 5641, 5580, 2133, 147], ["Magic Silence", 5642, 5581, 2133, 147], ["Acumen", 5643, 5582, 2133, 147]]], 2500:["weapon_dark_legions_edge_i01", [["Critical Damage", 5647, 5580, 2133, 147], ["Health", 5648, 5581, 2133, 147], ["Rsk. Focus", 5649, 5582, 2133, 147]]], 81:["weapon_dragon_slayer_i01", [["Health", 5644, 5580, 2133, 147], ["Critical Bleed", 5645, 5581, 2133, 147], ["Critical Drain", 5646, 5582, 2133, 147]]], # Blunts' 2504:["weapon_meteor_shower_i01", [["Focus", 5599, 5577, 2133, 147], ["Critical Bleed", 5600, 5578, 2133, 147], ["Rsk. Haste", 5601, 5579, 2133, 147]]], 212:["weapon_dasparions_staff_i01", [["Mana Up", 5596, 5577, 2133, 147], ["Conversion", 5597, 5578, 2133, 147], ["Acumen", 5598, 5579, 2133, 147]]], 213:["weapon_worldtrees_branch_i01", [["Conversion", 5605, 5580, 2133, 147], ["Magic Damage", 5606, 5581, 2133, 147], ["Acumen", 5607, 5582, 2133, 147]]], 164:["weapon_elysian_i01", [["Health", 5602, 5580, 2133, 147], ["Anger", 5603, 5581, 2133, 147], ["Critical Drain", 5604, 5582, 2133, 147]]], # Dagger' 235:["weapon_bloody_orchid_i01", [["Focus", 5614, 5577, 2133, 147], ["Back Blow", 5615, 5578, 2133, 147], ["Critical Bleed", 5616, 5579, 2133, 147]]], 236:["weapon_soul_separator_i01", [["Guidance", 5617, 5580, 2133, 147], ["Critical Damage", 5618, 5581, 2133, 147], ["Rsk. Haste", 5619, 5582, 2133, 147]]], # Poleaxe' 98:["weapon_halbard_i01", [["Haste", 5626, 5577, 2133, 147], ["Critical Stun", 5627, 5578, 2133, 147], ["Wide Blow", 5628, 5579, 2133, 147]]], 305:["weapon_tallum_glaive_i01", [["Guidance", 5632, 5580, 2133, 147], ["Health", 5633, 5581, 2133, 147], ["Wide Blow", 5634, 5582, 2133, 147]]], # Fist' 269:["weapon_blood_tornado_i01", [["Haste", 5620, 5577, 2133, 147], ["Focus", 5621, 5578, 2133, 147], ["Anger", 5622, 5579, 2133, 147]]], 270:["weapon_dragon_grinder_i01", [["Rsk. Evasion", 5623, 5580, 2133, 147], ["Guidance", 5624, 5581, 2133, 147], ["Health", 5625, 5582, 2133, 147]]], } ############################################################## DO NOT MODIFY BELOW THIS LINE ##################################################################################### def getItemName(Item): ItemName = Item.getItem().getName() if Item.getEnchantLevel() > 0: ItemName = "+" + str(Item.getEnchantLevel()) + " " + ItemName return ItemName def getMaterialName(MaterialID): if MaterialID in range(2131, 2134): return "Gemstone " + chr(ord('A') + 2133 - MaterialID) Stage = "" if MaterialID in range(2157, 2180): Stage = "11" if MaterialID in range(2160, 2183): Stage = "12" if MaterialID in [5557, 5580]: return "Red Soul Crystal - Stage " + Stage if MaterialID in [5558, 5581]: return "Green Soul Crystal - Stage " + Stage if MaterialID in [5559, 5582]: return "Blue Soul Crystal - Stage " + Stage return "Unknown material" def getMaterialIcon(MaterialID): if MaterialID in range(2131, 2134): return "etc_crystal_ball_green_i00" if MaterialID in [5557, 5580]: return "etc_crystal_red_i00" if MaterialID in [5558, 5581]: return "etc_crystal_green_i00" if MaterialID in [5559, 5582]: return "etc_crystal_blue_i00" return "etc_unknown_material_i00" # Main Code class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : htmltext = event # Creates a List to chose a weapon if event == "1": htmltext = "" for Item in st.getPlayer().getInventory().getItems(): if Item.getItemId() in EnhanceList and not Item.isEquipped(): Icon, Enhancements = EnhanceList[Item.getItemId()] EnhancID = 0 for Name, WeaponID, CrystalID, MaterialID, MaterialQuant in Enhancements: htmltext += "
| " + getItemName(Item) + ": " + Name + " |
| Enhance |