Olá galera
Já viram aqueles scripts antigos, lá de 2006, 2007 ~~ 2011, que são totalmente bagunçados e é um saco pra configurar e/ou adicionar coisas novas? Pois é, eu tive a ideia de refazê-los para melhorar sua formatação e aprimorar suas funcionalidades.
O que é: É um pacote que conta atualmente com 13 scripts (actions e talks) de scripts antigos que foram refeitos por mim. Download está no fim da mensagem, no anexo. Ou se quiserem, podem pegar algum script sozinho aqui no tópico, que jájá vou editar e colocar isso.
Actions:
- Absorb Rune - Bread System - Future Orb - Trash Lever - Multifunctional Rune - Present Box - Steal Rune - Teleport Rune - Vocation Chest - Vocation Door
Talks:
- AFK - Change Status - Terror - Vote System
Scripts:
Actions:
Absorb Rune:
Bread System:
bread.lua:
Future Orb:
futureorb.lua:
Trash Lever:
levertrash.lua:
Multifunctional Rune:
multifunctionalrune.lua:
Present Box:
presentbox.lua:
Steal Rune:
stealrune.lua:
Teleport Rune:
teleportrune.lua:
Vocation Chest:
Vocation Door:
vocationdoor.lua:
actions.xml:
<?xml version="1.0" encoding="UTF-8"?> <actions> <!-- Lembre-se de alterar o xxxx por um action id que desejar! --> <action actionid="xxxx" script="absorbrune.lua"/> <action actionid="2694;2692;2693" script="bread.lua"/> <action actionid="xxxx" script="futureorb.lua"/> <action actionid="xxxx" script="levertrash.lua"/> <action actionid="xxxx" script="multifunctionalrune.lua" /> <action actionid="xxxx" script="presentbox.lua"/> <action actionid="xxxx" script="stealrune.lua"/> <action actionid="xxxx" script="teleportrune.lua"/> <action actionid="xxxx" script="vocationchest.lua"/> <action actionid="xxxx" script="vocationdoor.lua"/> </actions>
Talkactions:
AFK:
afk.lua:
local time = 0.2 local afkstor = 14850 function turnAfk(cid, text) if not isCreature(cid) then return true elseif getPlayerStorageValue(cid, afkstor) == -1 then return true end doSendAnimatedText(getCreaturePosition(cid), text, math.random(1, 255)) addEvent(turnAfk, time*1000, cid, text) return true end function onSay(cid, words) if getPlayerStorageValue(cid, afkstor) == -1 then setPlayerStorageValue(cid, afkstor, 1) turnAfk(cid, "Ocupado!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Agora você está AFK.") else setPlayerStorageValue(cid, afkstor, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você não está mais AFK.") end return true end
Change Stats:
changestats.lua:
function onSay(cid, words, param) local exhastor = 3179 -- Storage da exhaustion local wait = 1 -- Segundos de exhaustion local change = 30 -- Quantidade de mana/health que será trocada local vocs = {"Sorcerer", "Druid"} -- Vocations que podem usar essa talk if not isInArray(vocs, getPlayerVocationName(cid)) then doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendCancel(cid, "Your vocation cannot use this move.") return true elseif exhaustion.check(cid, exhastor) then doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendCancel(cid, "You are exhausted.") return true elseif param == "mana" then if getPlayerHealth(cid) < change then doPlayerSendCancel(cid, "Not enough health to change to mana.") return true end doPlayerAddMana(cid, change) doCreatureAddHealth(cid, -change) doSendMagicEffect(getCreaturePosition(cid), 12) exhaustion.set(cid, exhastor, wait) elseif param == "health" then if getPlayerMana(cid) < change then doPlayerSendCancel(cid, "Not enough mana to change to health.") return true end doPlayerAddMana(cid, -change) doCreatureAddHealth(cid, change) doSendMagicEffect(getCreaturePosition(cid), 13) exhaustion.set(cid, exhastor, wait) else doPlayerSendCancel(cid, "Choose if you want to change mana to 'health' or health to 'mana'") return true end return true end
Terror:
Vote System:
votesystem.lua:
local votestorage = 32940 local yes = 32941 local no = 32942 local playervote = 32943 local players = {} function hasVotationOpen() return getGlobalStorageValue(votestorage) == 1 and true or false end function openVotation() return setGlobalStorageValue(votestorage, 1) end function closeVotation() setGlobalStorageValue(votestorage, -1) setGlobalStorageValue(yes, -1) setGlobalStorageValue(no, -1) players = {} return true end function vote(cid, choose) table.insert(players, cid) return choose == "yes" and setGlobalStorageValue(yes, getGlobalStorageValue(yes) == -1 and 1 or getGlobalStorageValue(yes)+1) or setGlobalStorageValue(no, getGlobalStorageValue(no) == -1 and 1 or getGlobalStorageValue(no)+1) end function hasVoted(cid) return table.find(players, cid) and true or false end function onSay(cid, words, param) if words == "/openvote" then if hasVotationOpen() then doPlayerSendCancel(cid, "Já há uma votação aberta.") return true end broadcastMessage("Votação aberta com a seguinte pergunta:\n"..param.."\nUse !vote sim para votar sim\nUse !vote nao para votar não") openVotation() elseif words == "/closevote" then if not hasVotationOpen() then doPlayerSendCancel(cid, "Não há nenhuma votação aberta.") return true end broadcastMessage("Votação fechada. Resultado:\nSIM: "..(getGlobalStorageValue(yes) == -1 and 0 or getGlobalStorageValue(yes)).." votos\nNÃO: "..(getGlobalStorageValue(no) == -1 and 0 or getGlobalStorageValue(no)).." votos") closeVotation() elseif words == "!vote" then if not hasVotationOpen() then doPlayerSendCancel(cid, "Não há nenhuma votação aberta.") return true elseif hasVoted(cid) then doPlayerSendCancel(cid, "Você já votou.") return true elseif param ~= "sim" and param ~= "nao" then doPlayerSendCancel(cid, 'Voto incorreto. Escreva apenas "sim" ou "nao".') return true elseif param == "sim" then vote(cid, "yes") elseif param == "nao" then vote(cid, "no") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Obrigado por votar.") end return true end
talkactions.xml:
<?xml version="1.0" encoding="UTF-8"?> <talkactions> <!-- VIP System --> <talkaction words="!changestats" script="changestats.lua"/> <talkaction words="!afk" script="afk.lua"/> <talkaction access="5" words="/terror" script="terror.lua"/> <talkaction words="!vote" script="votesystem.lua" /> <talkaction log="yes" access="5" words="/openvote;/closevote" script="votesystem.lua" /> </talkactions>
OBS: Caso encontre algum bug, avise aqui no tópico.
OBS²: Caso tenha algum outro script antigo que você gostaria que eu refizesse, poste aqui no tópico.
OBS³: Sim, eu sei que tem poucos scripts ainda, mas é por isso que eu quero que vocês peçam mais scripts antigos, como no OBS².