Magias de ots pokemon !
Versão beta , logo versão completa!
N coube no fórum entao está para download
Baixa aew ta certinho pra vários pokemons , em breve com todos os pokemons!
Download :
talkactions.rar
Guia Pratico (Use Ctrl+F para procurar pelos numeros)
Tags possiveis e suas devidas Funçoes (Numeradas para ver os possiveis values no final do topico):
0.1
<attribute key="description" value="DESCRIÇAO"/>
Como o proprio nome ja dis "description" descriçao que aparece no seu item ao dar look.
0.2
<attribute key="weight" value="6200"/>
Peso do item.
0.3
<attribute key="defense" value="30"/>
Defesa do item.
0.4
<attribute key="vocation" value="4"/>
Vocation para usar (precisa fazer isso no weapons para funcionar, ensinarei no final do topico)
0.5
<attribute key="attack" value="48"/>
Attack do seu item.
0.6
<attribute key="weaponType" value="sword"/>
Tipo do seu item.
0.7
<attribute key="extradef" value="3"/>
Como pode ver extradef eh uma defesa extra no seu item.
0.8
<attribute key="elementIce" value="18"/>
Elemento que sua arma ira dar ao bater, nesse caso se muda o attribute key e o value que tera no final do topico
0.9
<attribute key="charges" value="2"/>
Cargas de sua arma ou rune.
1.0
<attribute key="showcharges" value="1"/>
Como nome ja diz, showcharges, para mostrar as cargas do seu item 0 pra falso e 1 pra verdadeiro.
1.1
<attribute key="runeSpellName" value="adori mas frigo"/>
Palavras da spell para fazer a runa (tambem precisa fazer em spell.xml ensinado ao final do topico)
1.2
<attribute key="shootType" value="fire"/>
Tipo do tiro, usado em muniçoes e wands de attack ranged.
1.3
<attribute key="range" value="3"/>
Alcance de uma bolt ou qualquer outra muniçao, ou de uma wand. (nunca testei em uma arma de perto creio que nao pegue)
1.4
<attribute key="absorbPercentAll" value="80"/>
Essa tag absorve o dano de todos os tipos em 80% (Nao conheço muitos tipos mais irei dar alguns)
1.5
<attribute key="transformDeEquipTo" value="2168"/>
Quando desequipar transforma no item 2168 (Tem que mecher em movements, ensinado no final do topico)
1.6
<attribute key="duration" value="480"/>
Usado em botas e aneis que dao alguma coisa.
1.7
<attribute key="healthGain" value="1"/>
<attribute key="healthTicks" value="1000"/>
healthGain = Quanto de life ele vai ganhar// healthTicks = De quantos segundos ele vai ganhar (milesegundos) que eh 1000 = 1 segundo
1.8
<attribute key="manaGain" value="4"/>
<attribute key="manaTicks" value="1000"/>
Mesma coisa que o de cima soh que com mana.
1.9
<attribute key="decayTo" value="0"/>
Usado com a tag duration, para quando a duration acabar ele sumir, ou virar outra coisa (como a soft boots)
2.0
<attribute key="magiclevelpoints" value="1"/>
Ira dar 1 magic level ao equipar (Tem que mecher em movements)
2.1
<attribute key="skillAxe" value="2"/>
Alemnta 2 skill em axe (Tem que mecher em movements)
2.2
<attribute key="slotType" value="ring"/>
Usa-se em rings e armors, pois nos outros ja tem o weaponType, para usar em armor o value eh body, e para fazer armas de duas maos é two-handed
2.3
<attribute key="breakChance" value="0"/>
Chance de quebrar em %
Values e Atributes variaveis e mechendo em movements:
Eu sou um scripter iniciante, e consegui criar um scripter que almenta o exp de acordo com os % que vc colocou, quem gostou da +REP, ficou muito simples mas dá para o uso.
Vai em data,actions e abra actions.xml.
É cole esse seguinte codico
<action itemid="????" script="vipexp.lua" />
Agora vai em scripts, e crie um arquivo vipexp.lua, é depois cole o scripter que está abaixo no arquivo .lua
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2458 and getPlayerLevel(cid) >= 8 then
doPlayerSetExperienceRate(cid, 1,2)
doPlayerSendTextMessage(cid, 19, "Jogador Vip? obrigado por comprar, foram adicionados 20% a mais de experiência.")
doSendMagicEffect(topos, 15)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid, "So pode ser usado por players level 8+")
doSendMagicEffect(topos,2)
end
end
Permito organização do tópico, com meus devidos creditos..
Credito:
Euzinho: 70%
Eskylo: 20% Por te me ensinado a criar scripts basicos
Xtibia: 10% por me organizar um lugarzinho para disponibilizar os meus scripter
Obs: Coloque um item que não venda e não caia de loots dos bixos, senão os players iram se aproveitar disso!!!
Está dando erro logo nessa parte... "if is Summon(pokemon) then" espero que me ajudem =D
function onUse(cid, item, fromPos, itemEx, toPos)
local pokemon = itemEx.uid
local pokemons = {
{"Bulbasaur", "1.txt", 11395, 20, 100, 99101},
{"Squirtle", "2.txt", 11401, 20, 500, 99102},
}
for _,n in pairs(pokemons) do
local Dex = io.open('data/pokedex/' .. n[2],'r')
if isSummon(pokemon) then
if getCreatureName(pokemon) == n[1] and getPlayerLevel(cid) >= n[4] and getPlayerStorageValue(cid, n[6]) <= 0 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked " .. n[1] .. " in your pokedex")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained " .. n[5] .. " experience points.")
doPlayerAddExperience(cid, n[5])
setPlayerStorageValue(cid, n[6], 1)
elseif getCreatureName(pokemon) == n[1] and getPlayerLevel(cid) < n[4] and getPlayerStorageValue(cid, n[6]) <= 0 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need level " .. n[4] .. " to unlock this pokemon.")
elseif getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) >= 1 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
return true
end
elseif isMonster(pokemon) then
if getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) <= 0 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have unlocked " .. n[1] .. " in your pokedex")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained " .. n[5] .. " experience points.")
doPlayerAddExperience(cid, n[5])
setPlayerStorageValue(cid, n[6], 1)
elseif getCreatureName(pokemon) == n[1] and getPlayerStorageValue(cid, n[6]) >= 1 then
doShowTextDialog(cid, n[3], Dex:read("*all"))
return true
end
end
end
end
++REP Para quem ajudar
Olá, estou aqui com mais um script que eu vi que muita gente estava precisando
-- SCRIPT ATUALIZADO -- BUG ARRUMADO
Funciona assim:
Você está lá caçando uns monstros(pokes) ai o monstro começa a atacar você ,e você solta seu pokemon da pokeball
e o monstro não pode mais te atacar e ele começa a atacar seu pokemon(summno)...
È muito simples :
~~> Entre em data/xml/groups.xml e abra, e add essa tag:
<group id="7" name="Pokemon" flags="8" access="0" violationReasons="4" nameViolationFlags="2"/>
Feche e salve.
~~> Agora em creaturescripts/scripts, crie um arquivo chamado pokemon.lua e cole isso dentro:
function onThink(cid, interval)
if(not isCreature(cid)) then
return
end
local id = getPlayerGroupId(cid)
if #getCreatureSummons(cid) >= 1 then
setPlayerGroupId(cid, 7)
end
if #getCreatureSummons(cid) == 0 then
setPlayerGroupId(cid, 1)
end
if id > 1 and id < 7 then
setPlayerGroupId(cid, id)
end
end
Bom galera, é um sistema de go/back, catch , NPC heal
Meu sistema de ride funciona 100% com esse script do go/back...
-- GO/BACK--
~~> Crie um arquivo goback.lua em action/scripts e cole isso dentro:
function onUse(cid, item, fromPosition, itemEx, toPosition)
function getPokemonMaxLife(name)
local file = io.open('data/monster/monsters.xml','r')
local arquivo = file:read(-1):lower():match('<monster name="'..name:lower()..'" file="(.-)"/>')
file:close()
local data = io.open('data/monster/'..(arquivo or ''),'r')
if not data then
return 100
end
local maximo = data:read(-1):match('max%s*=%s*"(%d+)"')
data:close()
return maximo
end
----- Config -----
local MaximoSummon = 1
local nome1 = getItemName(item.uid)
local nome = nome1:match('(.-) Pokeball')
local summons = getCreatureSummons(cid)
local action_id = getItemAttribute(item.uid, "aid")
------ Config -----
local summons = getCreatureSummons(cid)
if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
doPlayerSendCancel(cid, "Coloque no slot certo!.")
return TRUE
end
if getItemAttribute(item.uid,"level") >= getPlayerLevel(cid) then
doPlayerSendCancel(cid, "You dont have level to use.")
return TRUE
end
if(table.maxn(summons) < MaximoSummon) then -- no summons
creature = doSummonCreature(nome, getCreaturePosition(cid))
doConvinceCreature(cid, creature)
local hp = getCreatureHealth(getCreatureSummons(cid)[1])
doItemSetAttribute(getPlayerSlotItem(cid,8).uid,"aid",hp)
doPlayerSay(cid, "Go,"..nome.."", TALKTYPE_SAY)
registerCreatureEvent(cid, "PlayerPokeDeath")
registerCreatureEvent(creature, "DiePoke")
doSendMagicEffect(getCreaturePosition(creature), 188)
doTransformItem(getPlayerSlotItem(cid,8).uid, 2531, 1)
doItemSetAttribute(getPlayerSlotItem(cid,8).uid,"name",""..nome.." Pokeball")
if action_id ~= 0 then
doCreatureAddHealth(creature, -(tonumber(getPokemonMaxLife(nome) - action_id)))
else
doCreatureAddHealth(creature, getPokemonMaxLife(nome))
end
else
for _, pid in ipairs(summons) do
if (table.maxn(summons) >= 1) then
doItemSetAttribute(item.uid, "aid", getCreatureHealth(summons[1]))
doSendMagicEffect(getCreaturePosition(creature), 188)
doPlayerSay(cid, "Back,"..nome.."", TALKTYPE_SAY)
doRemoveCreature(pid)
doTransformItem(getPlayerSlotItem(cid,8).uid, 2532, 1)
doItemSetAttribute(getPlayerSlotItem(cid,8).uid,"name", nome .." Pokeball")
end
end
end
return true
end
~~>Em actions/script crie um arquivo catch.lua e cole dentro:
local function capturou(params)
doSendMagicEffect(getCreaturePosition(params.cid), 173)
doPlayerSendTextMessage(params.cid, 25, 'Você capturou um pokemon! ('..params.monster..').')
item = doCreateItemEx(2520)
doItemSetAttribute(item, "name", ""..params.monster.." Pokeball")
doItemSetAttribute(item, "aid", params.hp)
doItemSetAttribute(item, "level", params.level)
doPlayerAddItemEx(params.cid, item, true)
end
local level = {
['chansey'] = 15, -- level minimo para usar o pokemon
['squirtle'] = 15, -- level minimo para usar o pokemon
['charmander'] = 15, -- level minimo para usar o pokemon
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local monster = getItemName(itemEx.uid):match("dead (.*)")
if not monster then
return doPlayerSendCancel(cid, 'Sorry, use only pokemon dead') and doSendMagicEffect(fromPosition, 2)
end
ball = 2520
local hpmax = 0
if itemEx.itemid == 6008 then
if math.random(1,100) >= 1 then
doRemoveItem(itemEx.uid)
doSendMagicEffect(toPosition, 24)
doRemoveItem(item.uid, 1)
addEvent(capturou, 4000, {cid = cid, monster = monster, level = level[monster], ball = ball, hp = hpmax})
else
doRemoveItem(itemEx.uid)
doRemoveItem(item.uid, 1)
doSendMagicEffect(toPosition, 23)
end
elseif itemEx.itemid == 6010 then
if math.random(1,100) >= 1 then
doRemoveItem(itemEx.uid)
doSendMagicEffect(toPosition, 24)
doRemoveItem(item.uid, 1)
addEvent(capturou, 4000, {cid = cid, monster = monster, level = level[monster], ball = ball, hp = hpmax})
else
doRemoveItem(itemEx.uid)
doRemoveItem(item.uid, 1)
doSendMagicEffect(toPosition, 23)
end
end
return TRUE
end
~~Editando o Catch ~~
elseif itemEx.itemid == 6010 then
~>6010 é o id do corpo do pokemon que o script ira tentar capturar.
if math.random(1,100) >= 1 then
~>o 1 siginifica que ele tem 1% de chance de não capturar , que tem 99% de chance de captura, se for 10 tem 90%,se 20 tem 80%....
<~~~~~~~~~~> <~~~~~~~~~~>
E em actions.xml add isto:
<action itemid="xxxx" event="script" allowfaruse="10" value="catch.lua"/>
Em xxxx é o numero da pokeball que captura.
-- CREATURE SCRIPTS --
~~> Em creaturescripts/scripts crie um arquivo chamado goback.lua e cole isso dentro:
local pokein, pokeout = 2535,2531
function onDeath(cid, deathList)
local owner = getCreatureMaster(cid)
doPlayerSendTextMessage(owner, 21, "You pokemon died.")
local item = getPlayerItemById(owner, TRUE, pokeout)
doTransformItem(item.uid, pokein)
doRemoveCreature(cid)
return FALSE
end
~~> Agora na mesma pasta crie outro arquivo chamado morrer.lua e cole isso dentro:
local pokein, pokeout = 2532,2531
function getSummonLifes(cid)
for _,x in pairs(getCreatureSummons(cid)) do
return getCreatureHealth(x), getCreatureMaxHealth(x)
end
end
function onDeath(cid)
local health,maxhealth = getSummonLifes(cid)
if #getCreatureSummons(cid) >= 1 then
setPlayerStorageValue(cid, 61205, health)
setPlayerStorageValue(cid, 61206, maxhealth)
setPlayerStorageValue(cid, 61204, 0)
setPlayerStorageValue(cid, 61207, 1)
end
if getPlayerStorageValue(cid, 63215) >= 1 then
setPlayerStorageValue(cid, 61205, getPlayerStorageValue(cid, 61210))
setPlayerStorageValue(cid, 61206, getPlayerStorageValue(cid, 61209))
setPlayerStorageValue(cid, 61204, 0)
setPlayerStorageValue(cid, 61207, 1)
end
return TRUE
end
Em npc/scripts crie um arquivo chamado heal.lua e cole isso:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
dofile("data/actions/scripts/reviver.lua")
function onThingMove(creature, thing, oldpos, oldstackpos, item, itemEx)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function getPokemonMaxLife(name)
local file = io.open('data/monster/monsters.xml','r')
local arquivo = file:read(-1):lower():match('<monster name="'..name:lower()..'" file="(.-)"/>')
file:close()
local data = io.open('data/monster/'..(arquivo or ''),'r')
if not data then
return 100
end
local maximo = data:read(-1):match('max%s*=%s*"(%d+)"')
data:close()
return maximo
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
local idballs = {
[2535] = {"Pokeball"},
[2531] = {"Pokeball"},
[2532] = {"Pokeball"},
}
local balls = idballs[getPlayerSlotItem(cid,8).itemid]
if #getCreatureSummons(cid) >= 1 then
return selfSay('Voce precisa botar seus pokemons dentro da pokebola.', cid)
end
if balls == nill then
return selfSay('Coloque seu pokemon slot da Pokeball para ele ser curado!!')
end
if balls ~= nill then
local nome = getItemName(getPlayerSlotItem(cid,8).uid)
local poke_name = nome:match('(.-) Pokeball')
doItemSetAttribute(getPlayerSlotItem(cid,8).uid, "aid", getPokemonMaxLife(poke_name))
if getPlayerStorageValue(cid, 5555) == 0 then
setPlayerStorageValue(cid, 5555, 1)
end
local hp = getCreatureMaxHealth(cid)
doCreatureAddHealth(cid, hp)
selfSay('Você e seu pokemon estão curados!!')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'healing') then
end
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Volte Sempre,')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 20 then
if focus > 0 then
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Bye.')
focus = 0
end
end
end
E no em npc crie um arquivo chamado heal.xml e cole isto dentro:
AAh, já ia me esquecendo, volte em actions/scripts crie um arquivo chamado reviver.lua e cole isso dentro:
function onUse(cid, item, fromPosition, itemEx, toPosition)
function getPokemonMaxLife(name)
local file = io.open('data/monster/monsters.xml','r')
local arquivo = file:read(-1):lower():match('<monster name="'..name:lower()..'" file="(.-)"/>')
file:close()
local data = io.open('data/monster/'..(arquivo or ''),'r')
if not data then
return 100
end
local maximo = data:read(-1):match('max%s*=%s*"(%d+)"')
data:close()
return maximo
end
----- Config -----
local MaximoSummon = 1
local nome = getItemName(item.uid)
local poke_name = nome:match('(.-) Pokeball')
local summons = getCreatureSummons(cid)
local action_id = getItemAttribute(item.uid, "aid")
----- Config -----
local summons = getCreatureSummons(cid)
if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
doPlayerSendCancel(cid, "Sorry, you must put your pokeball in the right place.")
return TRUE
end
if getPlayerStorageValue(cid, 5555) == 1 then
setPlayerStorageValue(cid, 5555, 0)
doTransformItem(item.uid, 2531)
doItemSetAttribute(item.uid, "aid", getPokemonMaxLife(poke_name))
else
doPlayerSendCancel(cid, "You poke are Dead.")
end
return true
end
E no actions.xml add isto:
<action itemid="2535" event="script" value="reviver.lua"/>
-------> FIM <-------
return doPlayerSendCancel(cid, "Levels 8 ou menos não podem usar isso")
function onUse(cid, item, frompos, item2, topos)
local level = 8
local exp = 1000
if getPlayerLevel(cid) <= level then
doPlayerSendCancel(cid, "Levels "..level.." ou menos não podem usar isso.")
else
doPlayerAddExp(cid, exp)
doPlayerSendTextMessage(cid, 19, "Você ganhou "..exp.." de experiência bonus")
doRemoveItem(item.uid, 1)
end
return TRUE
end
Quem Está Navegando
0 membros estão online
Nenhum usuário registrado visualizando esta página.