Nome: Light SystemAutor: Aksz
Versão Testada: Mix YourOTS 8.54
Informações adicionais: Light tipo do SvkE por TalkAction.
Sou iniciante em scripter e quero aprender muito ainda, esse script é um dos meus primeiros do começo e sei que todo mundo vai gostar.
__________________________________________
TalkAction
Faça um arquivo .lua na pasta data/talkactions/scripts do seu servidor e cole isso dentro deste arquivo .lua:
local pokes = {'Electabuzz', 'Alakazam', 'Abra', 'Hypno', 'Mr Mime', 'Electrode', 'Magnemite', 'Pikachu', 'Raichu'} local exhautStorage = 24622222 local time = 300 local cd = 60 function onSay(cid, words, param, channel) local summons = getCreatureSummons(cid) if #summons == 0 then doPlayerSendCancel(cid,"Sumone um pokemon para usar light.") return true end if not isInArray(pokes, getCreatureName(summons[1])) then doPlayerSendCancel(cid,"Este pokemon não usa light.") return true end if exhaustion.get(cid, exhautStorage) then doPlayerSendCancel(cid,"Aguarde o cd.") return true end exhaustion.set(cid, exhautStorage, cd) doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", light!", 1) doSetCreatureLight(getCreatureSummons(cid)[1], 10, 210, time*1000) return true end
Depois abra o talkactions.xml localizada na pasta data/talkactions e cole isto dentro:
<talkaction words="!light" event="script" value="light.lua"/>
Pronto. Script instalado.
• Configurando [~]
local pokes = {'Electabuzz', 'Alakazam', 'Abra', 'Hypno', 'Mr Mime', 'Electrode', 'Magnemite', 'Pikachu', 'Raichu'}local exhautStorage = 24622222
local time = 300
local cd = 60
function onSay(cid, words, param, channel)
local summons = getCreatureSummons(cid)
if #summons == 0 then
doPlayerSendCancel(cid,"Sumone um pokemon para usar light.")
return true
end
if not isInArray(pokes, getCreatureName(summons[1])) then
doPlayerSendCancel(cid,"Este pokemon não usa light.")
return true
end
if exhaustion.get(cid, exhautStorage) then
doPlayerSendCancel(cid,"Aguarde o cd.")
return true
end
exhaustion.set(cid, exhautStorage, cd)
doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", light!", 1)
doSetCreatureLight(getCreatureSummons(cid)[1], 10, 210, time*1000)
return true
end
Preto - Nome dos pokemons que usa light.
Vermelho - Storage do exausted.
Vinho - Tempo em milésimos do light.
Azul - Tempo em segundos para usar light.
Action
Faça um arquivo .lua na pasta data/actions/scripts do seu servidor e cole isso dentro deste arquivo .lua:
local pokes = {'Electabuzz', 'Alakazam', 'Abra', 'Hypno', 'Mr Mime', 'Electrode', 'Magnemite', 'Pikachu', 'Raichu'} local exhautStorage = 24622222 local time = 300 local cd = 60 function onUse(cid, item, frompos, item2, topos) if not isCreature(item2.uid) or getCreatureMaster(item2.uid) ~= cid then return doPlayerSendCancel(cid,"Please use in your pokemon.") end local summons = getCreatureSummons(cid) if #summons == 0 then doPlayerSendCancel(cid,"Sumone um pokemon para usar light.") return true end if not isInArray(pokes, getCreatureName(summons[1])) then doPlayerSendCancel(cid,"Este pokemon não usa light.") return true end if exhaustion.get(cid, exhautStorage) then doPlayerSendCancel(cid,"Aguarde o cd.") return true end exhaustion.set(cid, exhautStorage, cd) doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", light!", 1) doSetCreatureLight(getCreatureSummons(cid)[1], 10, 210, time*1000) return true end
Agora adicione isso no actions.xml:
<action itemid="2550" event="script" value="light.lua"/>
Adicionando um novo pokemon:
Coloque uma virgula no ultimo pokemon da tabela e depois cole isto 'Elekid' depois da vírgula.
Créditos:
Aksz
Dúvidas & Bug's? Poste aqui mesmo.
Agora vocês tem 2 opções...
Att,
Aksz.
PS: Este sistema é do meu ot de pokemon, mais gostei de postar por que são um dos meus melhores scripts que fiz.