Postado Julho 21, 2015 9 anos Alguem me da uma mao com isto? Tou a precisar comandos pra players: !aol !bless !spells Outra duvida: Tem forma de colocar "AutoLoot" nesta versao? Onde o player faz uma lista de !loot e ele adiciona ou elimina items, uma vez morre o monster ele automaticamente pega os items que tem nessa lista Obrigada!
Postado Julho 21, 2015 9 anos Vou pegar do meu OT aqui e já posto. Aol: em talkactions/script crie um arquivo aol.lua e coloque isso dentro: function onSay(cid, words, param) if doPlayerRemoveMoney(cid, 10000) == TRUE then local bp = doPlayerAddItem(cid, 2173, 1) doSendMagicEffect(getCreaturePosition(cid),13) else doCreatureSay(cid, "Voce nao tem dinheiro suficiente!", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end em talkactions.xml coloque essa tag: <talkaction words="!aol;!AOL" event="script" value="aol.lua"/> Bless: em talkactions/script crie um arquivo chamado bless.lua e coloque isso dentro: local bless = {1, 2, 3, 4, 5} local cost = 80000 function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless)) then doPlayerSendCancel(cid, "Voce ja tem todas as bless.") return TRUE end end if(doPlayerRemoveMoney(cid, cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless) end doCreatureSay(cid, "You are now blessed!" ,19) doSendMagicEffect(getPlayerPosition(cid), 49) else doPlayerSendCancel(cid, "Voce precisa de 80k para a bless.") end return TRUE end no talkactions.xml coloque essa tag: <talkaction words="!bless;!BLESS" event="script" value="bless.lua"/> Spells: em talkactions/script crie um arquivo chamado spells.lua e coloque isso dentro: function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "Spells for Level " .. spell.level .. "\n" prevLevel = spell.level end text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid,2175,text) return TRUE end em talkactions.xml coloque essa tag: <talkaction words="!spells" event="script" value="spells.lua"/> Editado Julho 21, 2015 9 anos por moviebr (veja o histórico de edições) Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Julho 21, 2015 9 anos @moviebr Releia o título do tópico: no TFS 1.2 ServerVersao 10.78 The corrupt fear us. The honest support us. The heroic join us.
Postado Julho 22, 2015 9 anos Autor Vou pegar do meu OT aqui e já posto. Aol: em talkactions/script crie um arquivo aol.lua e coloque isso dentro: em talkactions.xml coloque essa tag: Bless: em talkactions/script crie um arquivo chamado bless.lua e coloque isso dentro: no talkactions.xml coloque essa tag: Spells: em talkactions/script crie um arquivo chamado spells.lua e coloque isso dentro: em talkactions.xml coloque essa tag: Isto é pra server TFS 1.2 10.78? Obrigado!
Postado Julho 22, 2015 9 anos Vá em talkactions/talkactions.xml e add as tags: <talkaction words="!aol" script="!aol.lua"/> <talkaction words="!bless" script="!bless.lua"/> Agora crie 2 arquivos .lua em talkactions/scripts/ com os nomes: !aol.lua e !bless.lua. AOL.lua function onSay(player, words, param) if player:removeMoney(price_aol) then player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) player:addItem(2173, 1) else player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendCancelMessage("You dont have enought money.") end end Bless.lua local bless = {1, 2, 3, 4, 5} local price_bless = 100000 function onSay(player, words, param) for i = 1, table.maxn(bless) do if player:hasBlessing(bless[i]) then player:sendCancelMessage("You already have all blessings.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end end if player:removeMoney(price_bless) then for i = 1, table.maxn(bless) do player:addBlessing(bless[i]) end player:sendTextMessage(MESSAGE_INFO_DESCR, "You have bought all blessings.") player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW) else player:sendCancelMessage("You don't have enough money.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end return true end Editado Julho 22, 2015 9 anos por Jobs (veja o histórico de edições)
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.