Ir para conteúdo

tibiaa4e

Conde
  • Total de itens

    912
  • Registro em

  • Última visita

  • Dias Ganhos

    1

Tudo que tibiaa4e postou

  1. apenas mude doTeleportThing(player1.uid,nplayer1pos) doTeleportThing(player2.uid,nplayer2pos) doTeleportThing(player3.uid,nplayer3pos) doTeleportThing(player4.uid,nplayer4pos) por doTeleportThing(player1.uid,nplayer1pos,0) doTeleportThing(player2.uid,nplayer2pos,0) doTeleportThing(player3.uid,nplayer3pos,0) doTeleportThing(player4.uid,nplayer4pos,0)
  2. Variaveis globais são quando elas tem o local E elas funcionam apenas no trecho do script por exemplo doCreateItem(cid,1010,1) if a > b then local b = 1 doPlayerSay(cid,b) end Ai o valor da variavel b só vai valer dentro do if Se você colocasse ela no começo ela valeria em todo os script Caso queira que uma variavel só funciona no script coloque a no inicio do arquivo Isso é util em npcs, pois caso dois players estejam falando a msm coisa o npc pode trocar os valores
  3. <movevent type="Equip" itemid="7894" slot="legs" level="40" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="7894" slot="legs" event="function" value="onDeEquipItem"/> Adicione o ID o slot e o level A partir disso ele funcionará
  4. Level 25+ perde (level+50)/100 de experiencia level 24- perde 10% Ai vc checa a exp dele e tira a porcentagem disso AI adiciona isso Esse calculo vi no wikia.
  5. Dúvida Sanada Tópico Fechado
  6. Tente fazer de outro modo Quando o player morre nessas condições se adiciona um storage E usando a function onLogin faça checar esse storage e adicionar a experiencia que ele perdeu. Para não ficar estranho, mande uma mensagem para o player dizendo que ele ganho a experiencia porque o outro deu power abuser ou algo assim
  7. Se não me engano isso funciona Porém ele não bane automaticamente e sim adicione um arquivo de texto Porém isso é programação c++
  8. Tudo bem Qualquer dúvida o forum está a disposição Então Duvída Sanada Tópico Fechado
  9. <attack name="manadrain" interval="6000" chance="40" range="7" min="-70" max="-120"/> Mais informações
  10. Posso parecer grosso, mas se vocês pesquisassem no forum antes de perguntar teriam mais eficacia... Todo ot já vem com essa função --Old code now updated to 8.31 by ta4e-- function onUse(cid, item, frompos, item2, topos) local itemWeight = getItemWeightById(item, 1) local playerCap = getPlayerFreeCap(cid) if item.uid == 2303 then if getPlayerStorageValue(cid,2303) == -1 then if getPlayerFreeCap(cid) >= 12.00 then container = doPlayerAddItem(cid, 1987, 1) doAddContainerItem(container, 2229, 1) --skull doAddContainerItem(container, 2151, 2) --talon doAddContainerItem(container, 2165, 1) --stealth doAddContainerItem(container, 2230, 20) --bone key_uid = doAddContainerItem(container,2091,1) doSetItemActionId(key_uid,6010) setPlayerStorageValue(cid,2303,1) else doPlayerSendTextMessage(cid,24,"You have found a bag. Weighing 12.00 oz it is too heavy.") end else doPlayerSendTextMessage(cid,24,"The coffin is empty.") end end end key_uid = doAddContainerItem(container,2091,1) doSetItemActionId(key_uid,6010) Aqui 2091 a id da chave 6010 o numero dela Para adiciona uma porta apenas adicione o actionid do numero da chave Esse exemplo eh da Parchment QUest
  11. O que checa se o player fez a quest é playerstorage Modifique os dois e certamente voltará a funcionar queststatus = getPlayerStorageValue(cid,15004) setPlayerStorageValue(cid,15004,1) Modifique o valor 15004 em todos para um diferente que funcionará
  12. Todas suas duvidas são respondidas em massa pelos diversos tutoriais que tem o forum Tente procurar antes de postar sua duvida, você sem dúvida poupará tempo e aprenderá mais... Porta com chave no Map Editor, apenas adicione a actionid na porta com o numero da chave Todo ot já vem com essa função --Old code now updated to 8.31 by ta4e-- function onUse(cid, item, frompos, item2, topos) local itemWeight = getItemWeightById(item, 1) local playerCap = getPlayerFreeCap(cid) if item.uid == 2303 then if getPlayerStorageValue(cid,2303) == -1 then if getPlayerFreeCap(cid) >= 12.00 then container = doPlayerAddItem(cid, 1987, 1) doAddContainerItem(container, 2229, 1) --skull doAddContainerItem(container, 2151, 2) --talon doAddContainerItem(container, 2165, 1) --stealth doAddContainerItem(container, 2230, 20) --bone key_uid = doAddContainerItem(container,2091,1) doSetItemActionId(key_uid,6010) setPlayerStorageValue(cid,2303,1) else doPlayerSendTextMessage(cid,24,"You have found a bag. Weighing 12.00 oz it is too heavy.") end else doPlayerSendTextMessage(cid,24,"The coffin is empty.") end end end key_uid = doAddContainerItem(container,2091,1) doSetItemActionId(key_uid,6010) Aqui 2091 a id da chave 6010 o numero dela Para adiciona uma porta apenas adicione o actionid do numero da chave Esse exemplo eh da Parchment QUest Sobre alavancas poderá encontrar algumas coisas e mais no topico acima e aqui : http://www.xtibia.com/forum/topic/99746-pasta-data-enciclopedia-13-tutoriais-para-entender-ela-toda/
  13. tibiaa4e

    [Resolvido]

    passe ele inteiro aqui entre as tag code para melhorar a visualização
  14. tibiaa4e

    [Resolvido]

    existem linhas no action.xml q contem id em sequencia <action fromid="2362" toid="2363" event="script" value="other/food.lua"/> Verifique se o seu não tem isso com esse id dentro
  15. tibiaa4e

    Xbox 360 Vs. Ps3

    Ainda prefiro o XBOX360 não sei como mas acho o PS3 ridiculo O que ganha é o fato de ter Blu-Ray e ele ler mais rapido, ter mais qualidade e etc... E para um maldito fazer gambiarra num Blu-Ray ou em um PS3 vai demorar E quando lançarem vão mudar alguma coisa... E prefiro o controle do XBOX 360
  16. Em data/creaturescripts/scripts Crie killinginthenameof.lua e adicione: function onKill(cid, target, lastHit) local questCreatures = { ["troll"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15000, killsRequired = 100, raceName = "Trolls"}, ["frost troll"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15001, killsRequired = 100, raceName = "Trolls"}, ["furious troll"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15002, killsRequired = 100, raceName = "Trolls"}, ["island troll"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15003, killsRequired = 100, raceName = "Trolls"}, ["swamp troll"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15004, killsRequired = 100, raceName = "Trolls"}, ["troll champion"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15005, killsRequired = 100, raceName = "Trolls"}, ["troll legionnaire"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15006, killsRequired = 100, raceName = "Trolls"}, ["goblin"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15007, killsRequired = 150, raceName = "Goblins"}, ["goblin assassin"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15008, killsRequired = 150, raceName = "Goblins"}, ["goblin leader"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15009, killsRequired = 150, raceName = "Goblins"}, ["goblin scavenger"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15010, killsRequired = 150, raceName = "Goblins"}, ["rotworm"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15011, killsRequired = 300, raceName = "Rotworms"}, ["carriom worm"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15012, killsRequired = 300, raceName = "Rotworms"}, ["cyclops"] = {questStarted = 1513, questStorage = 65003, creatureStorage = 15013, killsRequired = 500, raceName = "Cyclops"}, ["cyclops smith"] = {questStarted = 1513, questStorage = 65003, creatureStorage = 15014, killsRequired = 500, raceName = "Cyclops"}, ["cyclops drone"] = {questStarted = 1513, questStorage = 65003, creatureStorage = 15015, killsRequired = 500, raceName = "Cyclops"}, ["crocodile"] = {questStarted = 1514, questStorage = 65004, creatureStorage = 15016, killsRequired = 300, raceName = "Crocodiles"}, ["tarantula"] = {questStarted = 1515, questStorage = 65005, creatureStorage = 15017, killsRequired = 300, raceName = "Tarantulas"}, ["carniphila"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15018, killsRequired = 150, raceName = "Carniphilas"}, ["stone golem"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15019, killsRequired = 200, raceName = "Stone Golems"}, ["mammoth"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15020, killsRequired = 300, raceName = "Mammoths"}, ["ice golem"] = {questStarted = 1519, questStorage = 65009, creatureStorage = 15021, killsRequired = 300, raceName = "Ice Golems"}, ["quara predator scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15022, killsRequired = 300, raceName = "Quaras Scout"}, ["quara constrictor scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15023, killsRequired = 300, raceName = "Quaras Scout"}, ["quara hydromancer scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15024, killsRequired = 300, raceName = "Quaras Scout"}, ["quara mantassin scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15025, killsRequired = 300, raceName = "Quaras Scout"}, ["quara pincher scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15026, killsRequired = 300, raceName = "Quaras Scout"}, ["quara predator"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15027, killsRequired = 300, raceName = "Quaras"}, ["quara constrictor"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15028, killsRequired = 300, raceName = "Quaras"}, ["quara hydromancer"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15029, killsRequired = 300, raceName = "Quaras"}, ["quara mantassin"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15030, killsRequired = 300, raceName = "Quaras"}, ["quara pincher"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15031, killsRequired = 300, raceName = "Quaras"}, ["water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15032, killsRequired = 70, raceName = "Water Elementals"}, ["roaring water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15033, killsRequired = 70, raceName = "Water Elementals"}, ["slick water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15034, killsRequired = 70, raceName = "Water Elementals"}, ["massive water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15035, killsRequired = 70, raceName = "Water Elementals"}, ["earth elemental"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15036, killsRequired = 70, raceName = "Earth Elementals"}, ["jagged earth elemental"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15037, killsRequired = 70, raceName = "Earth Elementals"}, ["massive earth elemental"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15038, killsRequired = 70, raceName = "Earth Elementals"}, ["muddy earth elemental"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15039, killsRequired = 70, raceName = "Earth Elementals"}, ["energy elemental"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15040, killsRequired = 70, raceName = "Energy Elementals"}, ["charged energy elemental"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15041, killsRequired = 70, raceName = "Energy Elementals"}, ["massive energy elemental"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15042, killsRequired = 70, raceName = "Energy Elementals"}, ["overcharged energy elemental"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15043, killsRequired = 70, raceName = "Energy Elementals"}, ["fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15044, killsRequired = 70, raceName = "Fire Elementals"}, ["blazing fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15045, killsRequired = 70, raceName = "Fire Elementals"}, ["blistering fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15046, killsRequired = 70, raceName = "Fire Elementals"}, ["massive fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15047, killsRequired = 70, raceName = "Fire Elementals"}, ["mutated rat"] = {questStarted = 1526, questStorage = 65016, creatureStorage = 15048, killsRequired = 200, raceName = "Mutated Rats"}, ["giant spider"] = {questStarted = 1527, questStorage = 65017, creatureStorage = 15049, killsRequired = 500, raceName = "Giant Spiders"}, ["hydra"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15050, killsRequired = 2000, raceName = "Hydras"}, ["sea serpent"] = {questStarted = 1529, questStorage = 65019, creatureStorage = 15051, killsRequired = 2000, raceName = "Sea Serpents"}, ["behemoth"] = {questStarted = 1530, questStorage = 65020, creatureStorage = 15052, killsRequired = 2000, raceName = "Behemoths"}, ["serpent spawn"] = {questStarted = 1531, questStorage = 65021, creatureStorage = 15053, killsRequired = 1500, raceName = "Serpents Spawn"}, ["green djinn"] = {questStarted = 1532, questStorage = 65022, creatureStorage = 15054, killsRequired = 500, raceName = "Green Djinns"}, ["efreet"] = {questStarted = 1532, questStorage = 65022, creatureStorage = 15055, killsRequired = 500, raceName = "Green Djinns"}, ["blue djinn"] = {questStarted = 1533, questStorage = 65023, creatureStorage = 15056, killsRequired = 500, raceName = "Blue Djinns"}, ["marid"] = {questStarted = 1533, questStorage = 65023, creatureStorage = 15057, killsRequired = 500, raceName = "Blue Djinns"}, ["pirate buccaneer"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15058, killsRequired = 3000, raceName = "Pirates"}, ["pirate corsair"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15059, killsRequired = 3000, raceName = "Pirates"}, ["pirate cutthroat"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15060, killsRequired = 3000, raceName = "Pirates"}, ["pirate ghost"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15061, killsRequired = 3000, raceName = "Pirates"}, ["pirate marauder"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15062, killsRequired = 3000, raceName = "Pirates"}, ["pirate skeleton"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15063, killsRequired = 3000, raceName = "Pirates"}, ["pirate buccaneer"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15064, killsRequired = 3000, raceName = "Pirates"}, ["pirate corsair"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15065, killsRequired = 3000, raceName = "Pirates"}, ["pirate cutthroat"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15066, killsRequired = 3000, raceName = "Pirates"}, ["pirate ghost"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15067, killsRequired = 3000, raceName = "Pirates"}, ["pirate marauder"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15068, killsRequired = 3000, raceName = "Pirates"}, ["pirate skeleton"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15069, killsRequired = 3000, raceName = "Pirates"}, ["minotaur"] = {questStarted = 1536, questStorage = 65026, creatureStorage = 15070, killsRequired = 5000, raceName = "Minotaurs"}, ["necromancer"] = {questStarted = 1537, questStorage = 65027, creatureStorage = 15071, killsRequired = 4000, raceName = "Magicians"}, ["priestess"] = {questStarted = 1537, questStorage = 65027, creatureStorage = 15072, killsRequired = 4000, raceName = "Magicians"}, ["necromancer"] = {questStarted = 1538, questStorage = 65028, creatureStorage = 15073, killsRequired = 1000, raceName = "Magicians"}, ["priestess"] = {questStarted = 1538, questStorage = 65028, creatureStorage = 15074, killsRequired = 1000, raceName = "Magicians"}, ["demon"] = {questStarted = 1539, questStorage = 65029, creatureStorage = 15075, killsRequired = 6666, raceName = "Demons"} } local creature = questCreatures[getCreatureName(target)] if creature then if(isPlayer(target) == true) then return true end if getPlayerStorageValue(cid, creature.questStarted) > 0 then if getPlayerStorageValue(cid, creature.questStorage) < creature.killsRequired then if getPlayerStorageValue(cid, creature.questStorage) < 0 then doPlayerSetStorageValue(cid, creature.questStorage, 0) end if getPlayerStorageValue(cid, creature.creatureStorage) < 0 then doPlayerSetStorageValue(cid, creature.creatureStorage, 0) end doPlayerSetStorageValue(cid, creature.questStorage, getPlayerStorageValue(cid, creature.questStorage) + 1) doPlayerSetStorageValue(cid, creature.creatureStorage, getPlayerStorageValue(cid, creature.creatureStorage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "" .. getPlayerStorageValue(cid, creature.creatureStorage) .. " " .. getCreatureName(target) .. " defeated. Total [" .. getPlayerStorageValue(cid, creature.questStorage) .. "/" .. creature.killsRequired .. "] " .. creature.raceName .. ".") end end end return true end em login.lua adicione registerCreatureEvent(cid, "KillingInTheNameOf") em creaturescript.xml adicione <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/> Agora em data/npc adicione Grizzly Adams.xml <?xml version="1.0"?> <npc name="Grizzly Adams" script="data/npc/scripts/killinginthenameof.lua" access="3" walkinterval="2000" lookdir="2"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="144" head="97" body="97" legs="94" feet="97" addons="3"/> </npc> e em npc/scripts adicione killinginthenameof.lua local tasks = { [1] = {questStarted = 1510, questStorage = 65000, killsRequired = 100, raceName = "Trolls", rewards = {first = {enable = true, type = "exp", values = 200}, second = {enable = true, type = "money", values = 200}, third = {enable = false, type = nil, values = {nil, nil}}}}, [2] = {questStarted = 1511, questStorage = 65001, killsRequired = 150, raceName = "Goblins", rewards = {first = {enable = true, type = "exp", values = 300}, second = {enable = true, type = "money", values = 250}, third = {enable = false, type = nil, values = {nil, nil}}}}, [3] = {questStarted = 1512, questStorage = 65002, killsRequired = 300, raceName = "Rotworms", rewards = {first = {enable = true, type = "exp", values = 1000}, second = {enable = true, type = "money", values = 400}, third = {enable = false, type = nil, values = {nil, nil}}}}, [4] = {questStarted = 1513, questStorage = 65003, killsRequired = 500, raceName = "Cyclops", rewards = {first = {enable = true, type = "exp", values = 3000}, second = {enable = true, type = "money", values = 800}, third = {enable = false, type = nil, values = {nil, nil}}}}, [5] = {questStarted = 1514, questStorage = 65004, killsRequired = 300, raceName = "Crocodiles", rewards = {first = {enable = true, type = "exp", values = 800}, second = {enable = true, type = "boss", values = THESNAPPER_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [6] = {questStarted = 1515, questStorage = 65005, killsRequired = 300, raceName = "Tarantulas", rewards = {first = {enable = true, type = "exp", values = 1500}, second = {enable = true, type = "boss", values = HIDE_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [7] = {questStarted = 1516, questStorage = 65006, killsRequired = 150, raceName = "Carniphilas", rewards = {first = {enable = true, type = "exp", values = 1500}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [8] = {questStarted = 1517, questStorage = 65007, killsRequired = 200, raceName = "Stone Golems", rewards = {first = {enable = true, type = "exp", values = 2000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [9] = {questStarted = 1518, questStorage = 65008, killsRequired = 300, raceName = "Mammoths", rewards = {first = {enable = true, type = "exp", values = 4000}, second = {enable = true, type = "boss", values = THEBLOODTUSK_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [10] = {questStarted = 1519, questStorage = 65009, killsRequired = 300, raceName = "Ice Golems", rewards = {first = {enable = true, type = "exp", values = 15000}, second = {enable = true, type = "boss", values = SHARDHEAD_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [11] = {questStarted = 1520, questStorage = 65010, killsRequired = 300, raceName = "Quaras Scout", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [12] = {questStarted = 1521, questStorage = 65011, killsRequired = 300, raceName = "Quaras", rewards = {first = {enable = true, type = "exp", values = 12000}, second = {enable = true, type = "boss", values = THUL_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [13] = {questStarted = 1522, questStorage = 65012, killsRequired = 70, raceName = "Water Elementals", rewards = {first = {enable = true, type = "exp", values = 7000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [14] = {questStarted = 1523, questStorage = 65013, killsRequired = 70, raceName = "Earth Elementals", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [15] = {questStarted = 1524, questStorage = 65014, killsRequired = 70, raceName = "Energy Elementals", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [16] = {questStarted = 1525, questStorage = 65015, killsRequired = 70, raceName = "Fire Elementals", rewards = {first = {enable = true, type = "exp", values = 7000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [17] = {questStarted = 1526, questStorage = 65016, killsRequired = 200, raceName = "Mutated Rats", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = true, type = "boss", values = ESMERALDA_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [18] = {questStarted = 1527, questStorage = 65017, killsRequired = 500, raceName = "Giant Spiders", rewards = {first = {enable = true, type = "exp", values = 5000}, second = {enable = true, type = "boss", values = THEOLDWIDOW_POSITION}, third = {enable = false, type = nil, values = {nil, nil}}}}, [19] = {questStarted = 1528, questStorage = 65018, killsRequired = 2000, raceName = "Hydras", rewards = {first = {enable = true, type = "boss", values = THEMANY_POSITION}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [20] = {questStarted = 1529, questStorage = 65019, killsRequired = 2000, raceName = "Sea Serpents", rewards = {first = {enable = true, type = "boss", values = LEVIATHAN_POSITION}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [21] = {questStarted = 1530, questStorage = 65020, killsRequired = 2000, raceName = "Behemoths", rewards = {first = {enable = true, type = "boss", values = STONECRACKER_POSITION}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [22] = {questStarted = 1531, questStorage = 65021, killsRequired = 1500, raceName = "Serpents Spawn", rewards = {first = {enable = true, type = "teleport", values = THENOXIUSSPAWN_POSITION}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [23] = {questStarted = 1532, questStorage = 65022, killsRequired = 500, raceName = "Green Djinns", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = true, type = "money", values = 5000}, third = {enable = true, type = "boss", values = MERIKHTHESLAUGHTERER_POSITION}}}, [24] = {questStarted = 1533, questStorage = 65023, killsRequired = 500, raceName = "Blue Djinns", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = true, type = "money", values = 5000}, third = {enable = true, type = "boss", values = FAHIMTHEWISE_POSITION}}}, [25] = {questStarted = 1534, questStorage = 65024, killsRequired = 3000, raceName = "Pirates", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = true, type = "money", values = 5000}, third = {enable = true, type = "boss", values = RANDOMPIRATEBOSS_POSITION}}}, [26] = {questStarted = 1535, questStorage = 65025, killsRequired = 3000, raceName = "Pirates", rewards = {first = {enable = true, type = "exp", values = 10000}, second = {enable = true, type = "money", values = 5000}, third = {enable = false, type = nil, values = {nil, nil}}}}, [27] = {questStarted = 1536, questStorage = 65026, killsRequired = 5000, raceName = "Minotaurs", rewards = {first = {enable = true, type = "boss", values = THEHORNEDFOX_POSITION}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [28] = {questStarted = 1537, questStorage = 65027, killsRequired = 4000, raceName = "Magicians", rewards = {first = {enable = true, type = "boss", values = NECROPHARUS_POSITION}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [29] = {questStarted = 1538, questStorage = 65028, killsRequired = 1000, raceName = "Magicians", rewards = {first = {enable = true, type = "exp", values = 40000}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}}, [30] = {questStarted = 1539, questStorage = 65029, killsRequired = 6666, raceName = "Demons", rewards = {first = {enable = true, type = "storage", values = {65535, 1}}, second = {enable = false, type = nil, values = {nil, nil}}, third = {enable = false, type = nil, values = {nil, nil}}}} } local storage = 64521 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local voc = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local s = getPlayerStorageValue(cid, storage) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if msgcontains(msg, 'task') then if(s < 1) then doPlayerSetStorageValue(cid, storage, 1) end if tasks[s] then if(getPlayerStorageValue(cid, tasks[s].questStarted) < 1) then if(getPlayerStorageValue(cid, tasks[s].creatureStorage) < 0) then doPlayerSetStorageValue(cid, tasks[s].creatureStorage, 0) end if(getPlayerStorageValue(cid, tasks[s].questStorage) < 0) then doPlayerSetStorageValue(cid, tasks[s].questStorage, 0) end doPlayerSetStorageValue(cid, tasks[s].questStarted, 1) selfSay('You have started the task number ' .. getPlayerStorageValue(cid, storage) .. ', in this task you need to kill ' .. tasks[s].killsRequired .. ' ' .. tasks[s].raceName .. '.', cid) else selfSay('You are currently making task about ' .. tasks[s].raceName .. '.', cid) end else print("[Warning - Error::Killing in the name of::Tasks config] Something is wrong.") end elseif msgcontains(msg, 'report') then if tasks[s] and tasks[s].questStarted > 0 then if(getPlayerStorageValue(cid, tasks[s].creatureStorage) < 0) then doPlayerSetStorageValue(cid, tasks[s].creatureStorage, 0) end if(getPlayerStorageValue(cid, tasks[s].questStorage) < 0) then doPlayerSetStorageValue(cid, tasks[s].questStorage, 0) end if(getPlayerStorageValue(cid, tasks[s].questStorage) >= tasks[s].killsRequired) then selfSay('Great!... you have finished the task number ' .. s .. '. Good job.', cid) doPlayerSetStorageValue(cid, storage, s + 1) if(tasks[s].rewards.first.enable) then if(tasks[s].rewards.first.type == "boss") then doTeleportThing(cid, tasks[s].rewards.first.values) elseif(tasks[s].rewards.first.type == "exp") then doPlayerAddExperience(cid, tasks[s].rewards.first.values) elseif(tasks[s].rewards.first.type == "item") then doPlayerAddItem(cid, tasks[s].rewards.first.values[1], tasks[s].rewards.first.values[2]) elseif(tasks[s].rewards.first.type == "money") then doPlayerAddMoney(cid, tasks[s].rewards.first.values) elseif(tasks[s].rewards.first.type == "storage") then doPlayerSetStorageValue(cid, tasks[s].rewards.first.values[1], tasks[s].rewards.first.values[2]) end end if(tasks[s].rewards.second.enable) then if(tasks[s].rewards.second.type == "boss") then doTeleportThing(cid, tasks[s].rewards.second.values) elseif(tasks[s].rewards.second.type == "exp") then doPlayerAddExperience(cid, tasks[s].rewards.second.values) elseif(tasks[s].rewards.second.type == "item") then doPlayerAddItem(cid, tasks[s].rewards.second.values[1], tasks[s].rewards.second.values[2]) elseif(tasks[s].rewards.second.type == "money") then doPlayerAddMoney(cid, tasks[s].rewards.second.values) elseif(tasks[s].rewards.second.type == "storage") then doPlayerSetStorageValue(cid, tasks[s].rewards.second.values[1], tasks[s].rewards.second.values[2]) end end if(tasks[s].rewards.third.enable) then if(tasks[s].rewards.third.type == "boss") then doTeleportThing(cid, tasks[s].rewards.third.values) elseif(tasks[s].rewards.third.type == "exp") then doPlayerAddExperience(cid, tasks[s].rewards.third.values) elseif(tasks[s].rewards.third.type == "item") then doPlayerAddItem(cid, tasks[s].rewards.third.values[1], tasks[s].rewards.third.values[2]) elseif(tasks[s].rewards.third.type == "money") then doPlayerAddMoney(cid, tasks[s].rewards.third.values) elseif(tasks[s].rewards.third.type == "storage") then doPlayerSetStorageValue(cid, tasks[s].rewards.third.values[1], tasks[s].rewards.third.values[2]) end end else selfSay('Current ' .. getPlayerStorageValue(cid, tasks[s].questStorage) .. ' ' .. tasks[s].raceName .. ' killed, you need to kill ' .. tasks[s].killsRequired .. '.', cid) end else selfSay('You do not have started any task.', cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agora adicione essa tag em todos os montros que terão task <script> <event name="KillingInTheNameOf"/> </script> Configurando: [1] = {questStarted = 1510, questStorage = 65000, killsRequired = 100, raceName = "Trolls", rewards = {first = {enable = true, type = "exp", values = 200}, second = {enable = true, type = "money", values = 200}, third = {enable = false, type = nil, values = {nil, nil}}}}, //Troll task example [1] = Numero da task questStarted = Storage value usado pela task questStorage = Storage value usado para checar quantos você matou killsRequired = Monstos mortos para acabar a task raceName = nome do monstro rewards = Aqui as recompensas rewards.first = Primeira recompensa rewards.first.enable = Se esta ativada ou não rewards.first.type = Tipo de compensa ("exp" = Da exp, "boss" = teleporta player pro boss, "money" = Da dinheiro, "item" = Da um item ao player, "storage" = Da um storage para quests como Demon Oak. reward.first.values = O valor da recompensa (Quanto de xp irá, id da recompensa) ~NOTA:Use apenas essa tabela para storage e item (Esses tipos requerem dois valores) para "exp", "boss" e "money" use (Ex:) values = 15000 // values = {x = 100, y = 100, z = 7) Usando: Player: Hi Grizzly Adams: Hello Player! Player: Task Grizzly Adams: You have started the task number 1, in this task you need to kill 100 Trolls. ---Later, when the player have killed 100 trolls--- Player: Hi Grizzly Adams: Hello Player! Player: Report Grizzly Adams: Great!... You have finished the task number 1. Good job. Player: Task Grizzly Adams: You have started the task number 2, in this task you need to kill 150 Goblins. And bla bla bla.... creditos:darkhaos Notas: Sei que tem um aqui já porém está com erro de spoiler Se houver erros me reportem que tentarei ajudar
  17. local COST = 3000000 ----- Preço par Remover o Skull em Gold Pieces function onSay(cid, words, chanel, param) if getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_BLACK then if doPlayerRemoveMoney(cid, COST) == TRUE then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Skull was removed for: " .. COST) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) else doPlayerSendCancel(cid, "You don't have enough money.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You are not with Black or Red Skull.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end Eu acredito que ela não remove os frags, então se você matar um ela vai voltar... Se isso acontecer me avise que eu passo uma linha de codigo para tirar
  18. columns player_id, skillid are not unique Essa sua database de algum modo foi alterada errada POdem ser varios motivos, recomendo pegar uma zerada ou atualizar o ot Que todo TFS tem um programa que arruma e atualiza a database, porém só os novos players
  19. O ot está setado como PvP-Enforced ? Diga a versão dele
  20. <?xml version="1.0" encoding="utf-8"?> <monster name="Rainha das serpentes" namedescription="a Rainha" race="blood" experience="3000" speed="170" manacost="0"> <health now="110" max "110"/> <look type="81" corpse="3007"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="95" attack="90"/> <attack name="poison" interval="2000" chance="15" range="7" min="-15500" max="-20000"> <attribute key="shootEffect" value="poison"/> </attack> <attack name="poison" interval="2000" chance="15" radius="3" target="0" min="-35000" max="-39000"> <attribute key="areaEffect" value="poison"/> </attack> <attack name="death" interval="1000" chance="12" radius="3" target="0" min="-22000" max="-27000"> <attribute key="areaEffect" value="smallclouds"/> </attack> </attacks> <defenses armor="23" defense="25" > <defense name="outfit" interval="4200" chance="50" monster="rat" duration="5000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="outfit" interval="6200" chance="50" monster="larva" duration="4000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="outfit" interval="8200" chance="50" monster="scorpion" duration="3000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> </defenses> <immunities> <immunity earth="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="Morra!" yell="1"/> </voices> </monster> faltava algumas linhas como HP, corpo e looktype
  21. Caso haja algum erro é em parte de programação c++ Recomendo tentar achar uma versão mais atualizada sobre isso
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...