Ir para conteúdo

Pet System


zeloooko

Posts Recomendados

Ola

Acho que td mundo akie ja jogo um dia um jogo em 3D.

q tipow tem os little pet que e tipo uns bicho que segue voce e te aumenta a mana ou HP

tem uns que aumenta o REGEN - a mana e.ou hp sobe mais rapido.naum sei c o hp tem como mais a mana axo q sim pq tem a soft e tals.

axu q c fosse possivel teria que faser ele como NPC pros players naum mata eles

axu tbm que c for possivel um que aumente os skill tbm(ML, Shield, distance...)

Se naum for pedir muito seria legal c tivese como add essa abilidades neles.

 

Por ex. vo la e compro um Little Wolf .ele jah vem com o skill de recarrega a mana mais rapido

mais qro q ele aumente a mana e a ML ,intaum vo lah e compro em algum NPC esses skill ae meu pet fika com os skills.

 

Se naum for possivel faser me avise OK vlw

brigado pela atençao to esperanu respostas

 

OBS:Desculpe pelos erros de portugues e pq to postanu de um nootbook e naum to acostumado ainda. :smile_positivo:

Editado por doiderattt
Link para o comentário
Compartilhar em outros sites

C nun for possivel ou ninguem conseguir fase ou por qualq otro motivo pensei q seria possivel faser isu com um ring com os skill add eu consigo so presiso de um script q de como comprar novos skill e funfe

ME AJUDE PLZ

Link para o comentário
Compartilhar em outros sites

C nun for possivel ou ninguem conseguir fase ou por qualq otro motivo pensei q seria possivel faser isu com um ring com os skill add eu consigo so presiso de um script q de como comprar novos skill e funfe

ME AJUDE PLZ

 

doiderattt vc ker colokar um ring pra healar sua mana e seu life?

Link para o comentário
Compartilhar em outros sites

Seria + ou menos asim...

eu tenhu o ring que heala a mana por ex ae eu qro que ele aumente a mana tbm ae eu ia lah nun npc e comprava um tipo de skill que aumenta a mana

 

c kisese que aumenta a mana , o hp e heale a mana eu compra kda um.

 

traduzinu

 

seria 2 ring um que healase a mana + rapido e um que healase o hp.

ae teria um npc que venderia + skill pra por no ring,

ex

aumenta shield, dist,axe,club mana ml , hp tipow asim

Link para o comentário
Compartilhar em outros sites

Isto é uma seção de pedidos, postem apenas oque o membro no caso o doiderattt pedir, o tópico já tem mais de 8 respostas mais nenhuma é o pedido.

 

Postem apenas o pedido, obrigado.

 

Abraços.

Editado por MattheusOT
Link para o comentário
Compartilhar em outros sites

Pelo que entendi você queria o npc de Buff, porque ele da umas habilidades, só que é so por um tempo.

Vou botar o scipt, espero que ajude:

Vá em Data/npcs e copie um arquivo .xml, então renomeie para Buff NPC, apague tudo que tem dentro e cole isto:

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

<npc name="Buff NPC" script="data/npc/scripts/buff.lua" walkinterval="2000" floorchange="0">

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

<look type="132" head="20" body="39" legs="45" feet="7" addons="3"/>

<parameters>

<parameter key="message_greet" value="Hello, |PLAYERNAME|. I can 'heal', 'haste', 'mana shield', invisible', upgrade your 'melee', 'magic', 'distance' and 'shield' skills."/>

</parameters>

</npc>

 

Então vá em Data/npc/scripts e copie um arquivo .lua, então renomeie-o para buff, apague tudo que tem dentro e cole isto:

 

-- configs

pricetobuff = 20

hasteseconds = 500

invisibleseconds = 500

magicshieldseconds = 500

skillsseconds = 600

skillsupgrade = {}

skillsupgrade['fist'] = 15

skillsupgrade['club'] = 15

skillsupgrade['sword'] = 15

skillsupgrade['axe'] = 15

skillsupgrade['distance'] = 15

skillsupgrade['shield'] = 15

skillsupgrade['ml'] = 8-- end configs

 

 

-- heal combat

local combatHeal = createCombatObject()

setCombatParam(combatHeal, COMBAT_PARAM_TYPE, COMBAT_HEALING)

setCombatParam(combatHeal, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

setCombatParam(combatHeal, COMBAT_PARAM_AGGRESSIVE, FALSE)

setCombatParam(combatHeal, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

setCombatFormula(combatHeal, COMBAT_FORMULA_LEVELMAGIC, 999, 999, 999, 999)

 

-- haste combat

local combatHaste = createCombatObject()

setCombatParam(combatHaste, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

setCombatParam(combatHaste, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_HASTE)

setConditionParam(condition, CONDITION_PARAM_TICKS, hasteseconds*1000)

setConditionFormula(condition, 99, 99, 99, 99)

setCombatCondition(combatHaste, condition)

 

-- invisible combat

local combatInvisible = createCombatObject()

setCombatParam(combatInvisible, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

setCombatParam(combatInvisible, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_INVISIBLE)

setConditionParam(condition, CONDITION_PARAM_TICKS, invisibleseconds*1000)

setCombatCondition(combatInvisible, condition)

 

-- utamo combat

local combatUtamo = createCombatObject()

setCombatParam(combatUtamo, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

setCombatParam(combatUtamo, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_MANASHIELD)

setConditionParam(condition, CONDITION_PARAM_TICKS, magicshieldseconds*1000)

setCombatCondition(combatUtamo, condition)

 

-- melee condition

local conditionMelee = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(conditionMelee, CONDITION_PARAM_TICKS, skillsseconds*1000)

setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_FIST, skillsupgrade['fist'])

setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_CLUB, skillsupgrade['club'])

setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_SWORD, skillsupgrade['sword'])

setConditionParam(conditionMelee, CONDITION_PARAM_SKILL_AXE, skillsupgrade['axe'])

 

-- distance condition

local conditionDistance = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(conditionDistance, CONDITION_PARAM_TICKS, skillsseconds*1000)

setConditionParam(conditionDistance, CONDITION_PARAM_SKILL_DISTANCE, skillsupgrade['distance'])

 

-- shield condition

local conditionShield = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(conditionShield, CONDITION_PARAM_TICKS, skillsseconds*1000)

setConditionParam(conditionShield, CONDITION_PARAM_SKILL_SHIELD, skillsupgrade['shield'])

 

-- ml condition

local conditionMagic = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(conditionMagic, CONDITION_PARAM_TICKS, skillsseconds*1000)

setConditionParam(conditionMagic, CONDITION_PARAM_STAT_MAGICPOINTS, skillsupgrade['ml'])

 

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

 

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 onThink() npcHandler:onThink() end

 

function buff(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

if doPlayerRemoveMoney(cid, pricetobuff) == TRUE then

buff = parameters.buff

message = parameters.message

 

doCombat(cid, buff, numberToVariant(cid))

npcHandler:say(message, cid)

keywordHandler:moveUp(1)

return true

else

npcHandler:say("You need ".. pricetobuff .." gold coins to buff yourself.", cid)

end

end

 

function buffMelee(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then

return false

end

if doPlayerRemoveMoney(cid, pricetobuff) == TRUE then

buff = parameters.buff

errors = 0

message = parameters.message

voc = getPlayerVocation(cid)

 

if buff == conditionMagic and (isBerserker(cid) or isHero(cid) or isHunter(cid) or isSharpshooter(cid)) then

npcHandler:say("Only Master Sorcerers, Elder Druids and Warlocks can upgrade their magic skills.", cid)

errors = 1

end

 

if buff == conditionMelee and (isSorcerer(cid) or isDruid(cid) or isWarlock(cid) or isHunter(cid) or isSharpshooter(cid)) then

npcHandler:say("Only Berserkers and Heros can upgrade their melee Skills.", cid)

errors = 1

end

 

if buff == conditionShield and (isSorcerer(cid) or isDruid(cid) or isWarlock(cid) or isHunter(cid) or isSharpshooter(cid)) then

npcHandler:say("Only Berserkers and Heros can upgrade their shield skills.", cid)

errors = 1

end

 

if buff == conditionDistance and (isSorcerer(cid) or isDruid(cid) or isWarlock(cid) or isBerserker(cid) or isHero(cid)) then

npcHandler:say("Only Hunters and Sharpshooters can upgrade their distance skills.", cid)

errors = 1

end

 

if errors == 0 then

doTargetCombatCondition(0, cid, buff, CONST_ME_MAGIC_RED)

npcHandler:say(message, cid)

keywordHandler:moveUp(1)

return true

end

else

npcHandler:say("You need ".. pricetobuff .." gold coins to buff yourself.", cid)

end

end

 

 

 

 

local node1 = keywordHandler:addKeyword({'heal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be healed?'})

node1:addChildKeyword({'yes'}, buff, {buff = combatHeal, message = 'Now you are fully restored!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'haste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be hasted?'})

node1:addChildKeyword({'yes'}, buff, {buff = combatHaste, message = 'Now you are fully hasted!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'invisible'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be invisible?'})

node1:addChildKeyword({'yes'}, buff, {buff = combatInvisible, message = 'Now you are invisible!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'magic shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to get magic shield effect?'})

node1:addChildKeyword({'yes'}, buff, {buff = combatUtamo, message = 'Your magic shield is on!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'melee'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your melee skills for some time?'})

node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionMelee, message = 'Your skills had been upgraded!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your shield skills for some time?'})

node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionShield, message = 'Your skills had been upgraded!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'distance'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your distance skills for some time?'})

node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionDistance, message = 'Your skills had been upgraded!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

local node1 = keywordHandler:addKeyword({'magic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to upgrade your magic skills for some time?'})

node1:addChildKeyword({'yes'}, buffMelee, {buff = conditionMagic, message = 'Your skills had been upgraded!'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'})

 

keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Uhm?"})

keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Ya?"})

 

npcHandler:addModule(FocusModule:new())

Só mude o que está em negrito.

Espero ter ajudado,

Abraços.

Editado por Last Seeker
Link para o comentário
Compartilhar em outros sites

mano achei muito legal esse npc de Buff temtei adicionar eli ao meu ot mais ta dando isso:

[07/11/2009 09:51:28] data/npc/scripts/buff.lua:111: attempt to call global 'isBerserker' (a nil value)

[07/11/2009 09:51:28] stack traceback:

[07/11/2009 09:51:28] data/npc/scripts/buff.lua:111: in function 'callback'

[07/11/2009 09:51:28] data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'

[07/11/2009 09:51:28] data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'

[07/11/2009 09:51:28] data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'

[07/11/2009 09:51:28] data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'

[07/11/2009 09:51:28] data/npc/scripts/buff.lua:81: in function <data/npc/scripts/buff.lua:81>

você poderia ver isso para mim porfavor :blush:

Editado por erivaldo
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...