Postado Janeiro 15, 2015 10 anos Olá pessoal do TibiaKing!. Estou procurando os devidos script para funcionar o sistema de encantamento. Como assim? - Um players leva uma joia: - Small rubs; - Small emerald; - Small amethyst; - Small saphhire; Ao Clicar no Shrite onde estara em uma posiçao (x) no mapa, ela ira se tornar uma Small Enchanted (ruby...emeral...amethyst.. ou saphhire dependendo da joia usada). Segue a imagem Shrite: Obs: Eu coloquei uma Small Enchanted no bau pelo RME e testei colocando na arma, porém, as charges não estão sendo consumidas. Estão infinitas. Gostaria que acabasse. Grato. Eu te Ajudei? Então solta aquele REP+ !! Meus Tutoriais: [Tutorial] Bug "Temple position is wrong" (MySql) Outros: [Meu Show OFF | Mapa próprio 8.6]
Postado Janeiro 16, 2015 10 anos -- [( Script edited by DoidinMapper )] -- function onUse(cid, item, fromPosition, item2, toPosition) local gems = {2146, 2147, 2149, 2150} local egems = {7759, 7760, 7761, 7762} local altars = {{7508, 7509, 7510, 7511}, {7504, 7505, 7506, 7507}, {7516, 7517, 7518, 7519}, {7512, 7513, 7514, 7515}} local weapons = {2383, 7384, 7389, 7406, 7402, 2429, 2430, 2435, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905} local eweapons = {{7763, 7744, 7854, 7869}, {7765, 7746, 7856, 7871}, {7770, 7751, 7861, 7876}, {7766, 7747, 7857, 7872}, {7767, 7748, 7858, 7873}, {7768, 7749, 7859, 7874}, {7769, 7750, 7860, 7875}, {7770, 7751, 7861, 7876}, {7771, 7752, 7862, 7877}, {7772, 7753, 7863, 7878}, {7773, 7754, 7864, 7879}, {7774, 7755, 7865, 7880}, {7775, 7756, 7866, 7881}, {7776, 7757, 7867, 7882}, {7777, 7758, 7868, 7883}, {7839, 7840, 7838, 7850}, {8907, 8906, 8909, 8908}} local type = item.type == 0 and 1 or item.type local mana = -300 * type local soul = -2 * type if isInArray(gems, item.itemid) then for aa=1, #gems do if item.itemid == gems[aa] then a=aa end end if isInArray(altars[a], item2.itemid) then if getPlayerMana(cid) >= mana and getPlayerSoul(cid) >= soul then doTransformItem(item.uid,egems[a]) doPlayerAddMana(cid,mana) doPlayerAddSoul(cid,soul) doSendMagicEffect(fromPosition,39) else doPlayerSendCancel(cid,"You dont have mana or soul points.") end else return 2 end elseif isInArray(egems, item.itemid)== TRUE then for bb = 1, #egems do if item.itemid == egems[bb] then b = bb end end if isInArray(weapons, item2.itemid)== TRUE then for cc=1, #weapons do if item2.itemid == weapons[cc] then c=cc end end doTransformItem(item2.uid,eweapons[c][b],1000) doSendMagicEffect(fromPosition,39) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"You can't enchanted this.") end else return 0 end return 1 end Créditos: DoidinMapper -"Supra Omnes Lux Lucis" - Acima de todos brilha a Luz -
Postado Janeiro 16, 2015 10 anos Autor -- [( Script edited by DoidinMapper )] -- function onUse(cid, item, fromPosition, item2, toPosition) local gems = {2146, 2147, 2149, 2150} local egems = {7759, 7760, 7761, 7762} local altars = {{7508, 7509, 7510, 7511}, {7504, 7505, 7506, 7507}, {7516, 7517, 7518, 7519}, {7512, 7513, 7514, 7515}} local weapons = {2383, 7384, 7389, 7406, 7402, 2429, 2430, 2435, 7380, 2454, 2423, 2445, 7415, 7392, 2391, 2544, 8905} local eweapons = {{7763, 7744, 7854, 7869}, {7765, 7746, 7856, 7871}, {7770, 7751, 7861, 7876}, {7766, 7747, 7857, 7872}, {7767, 7748, 7858, 7873}, {7768, 7749, 7859, 7874}, {7769, 7750, 7860, 7875}, {7770, 7751, 7861, 7876}, {7771, 7752, 7862, 7877}, {7772, 7753, 7863, 7878}, {7773, 7754, 7864, 7879}, {7774, 7755, 7865, 7880}, {7775, 7756, 7866, 7881}, {7776, 7757, 7867, 7882}, {7777, 7758, 7868, 7883}, {7839, 7840, 7838, 7850}, {8907, 8906, 8909, 8908}} local type = item.type == 0 and 1 or item.type local mana = -300 * type local soul = -2 * type if isInArray(gems, item.itemid) then for aa=1, #gems do if item.itemid == gems[aa] then a=aa end end if isInArray(altars[a], item2.itemid) then if getPlayerMana(cid) >= mana and getPlayerSoul(cid) >= soul then doTransformItem(item.uid,egems[a]) doPlayerAddMana(cid,mana) doPlayerAddSoul(cid,soul) doSendMagicEffect(fromPosition,39) else doPlayerSendCancel(cid,"You dont have mana or soul points.") end else return 2 end elseif isInArray(egems, item.itemid)== TRUE then for bb = 1, #egems do if item.itemid == egems[bb] then b = bb end end if isInArray(weapons, item2.itemid)== TRUE then for cc=1, #weapons do if item2.itemid == weapons[cc] then c=cc end end doTransformItem(item2.uid,eweapons[c],1000) doSendMagicEffect(fromPosition,39) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"You can't enchanted this.") end else return 0 end return 1 endCréditos: DoidinMapper @MaXwEllDeN No caso isso iria para actions? e me diz uma coisa, onde configuro para quando ele usar na coordenada (x) onde Shrite se encontra no mapa? ou apenas ao usar no Shrite independente de qual coordenada esteja ele transformará a joia?. Editado Janeiro 16, 2015 10 anos por olokomeu (veja o histórico de edições) Eu te Ajudei? Então solta aquele REP+ !! Meus Tutoriais: [Tutorial] Bug "Temple position is wrong" (MySql) Outros: [Meu Show OFF | Mapa próprio 8.6]
Postado Janeiro 16, 2015 10 anos @MaXwEllDeN No caso isso iria para actions? e me diz uma coisa, onde configuro para quando ele usar na coordenada (x) onde Shrite se encontra no mapa? ou apenas ao usar no Shrite independente de qual coordenada esteja ele transformará a joia?. Isso, caso não possua as tags, pode usar essas: <!-- Weapons enchanting (Gems) --> <action itemid="2146" event="script" value="other/enchanting.lua"/> <action itemid="2147" event="script" value="other/enchanting.lua"/> <action itemid="2150" event="script" value="other/enchanting.lua"/> <action itemid="2149" event="script" value="other/enchanting.lua"/> <action itemid="7759" event="script" value="other/enchanting.lua"/> <action itemid="7760" event="script" value="other/enchanting.lua"/> <action itemid="7761" event="script" value="other/enchanting.lua"/> <action itemid="7762" event="script" value="other/enchanting.lua"/> E não precisa configurar uma posição específica, independentemente de onde ela estiver no mapa, vai encantar do mesmo jeito. -"Supra Omnes Lux Lucis" - Acima de todos brilha a Luz -
Postado Janeiro 16, 2015 10 anos Autor @MaXwEllDeN Fiz desse mesmo jeito xD. + Vlw. Agora vê só. Tava testando aqui e vi esse possível erro (acho): - Se levo 100 pedras ele encanta as 100 de uma vez gastando apenas 300 mana e 2 soul. Teria como por para fazer uma por uma apenas, ou se caso o player leve 10 pedras ele ira gastar 20 soul + 6000 mana? Obs: Outra duvida e sobre Charge das armas, queria diminuir lá ta como 1000 e também estão infinitas, queria que elas gastassem. Já adianto meu Rep+ pelo simples fato de poder distribuir esse system ! Obgdão ------------------------xx-------------------------------xx--------------------------------- Editando: -Arrumei a parte de encantar 1 por 1 . Bug restante: - Cargas da arma estão infinitas. Mesmo a Tag do .Lua está configurado certo. O erro persiste. Config.lua mudei: removeWeaponCharges = true item.xml : (exemplo de um equipe encantado) <item id="7744" article="a" name="spike sword"> <attribute key="weight" value="5000" /> <attribute key="defense" value="21" /> <attribute key="attack" value="24" /> <attribute key="weaponType" value="sword" /> <attribute key="extradef" value="2" /> <attribute key="elementFire" value="4" /> <attribute key="charges" value="1000" /> <attribute key="decayTo" value="2383" /> <attribute key="showcharges" value="1" /> </item> Editado Janeiro 16, 2015 10 anos por olokomeu (veja o histórico de edições) Eu te Ajudei? Então solta aquele REP+ !! Meus Tutoriais: [Tutorial] Bug "Temple position is wrong" (MySql) Outros: [Meu Show OFF | Mapa próprio 8.6]
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.