Ir para conteúdo

Duvidas Simples Help


rime

Posts Recomendados

Galera duvidas:

 

Piece of Royal Steel trocado no NPC A Sweaty Cyclops, bom no meu ot ele não está trocando a Crow Armor pelo Piece...

 

Script do npc.

 

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

-- XVX FORGER START --

function amulet(cid, message, keywords, parameters, node)
   if(not npcHandler:isFocused(cid)) then
       return false
   end
       if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
       if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) and (doPlayerRemoveMoney(cid, 5000) == TRUE) then
           npcHandler:say('Here is your item!', cid)
           doPlayerAddItem(cid,8266,1)
       end
       else
           npcHandler:say('You don\'t have these items!', cid)
   end
end

function obsidian(cid, message, keywords, parameters, node)
   if(not npcHandler:isFocused(cid)) then
       return false
   end
       if getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,2425) >= 1 then
       if doPlayerRemoveItem(cid,2516,1) and doPlayerRemoveItem(cid,2425,1) then
           npcHandler:say('Here is your item!', cid)
           doPlayerAddItem(cid,5908,1)
       end
       else
           npcHandler:say('You don\'t have these items!', cid)
   end
end	

function crude(cid, message, keywords, parameters, node)
   if(not npcHandler:isFocused(cid)) then
       return false
   end
       if getPlayerItemCount(cid,5879) >= 1 then
       if doPlayerRemoveItem(cid,5879,1) then
           npcHandler:say('Here is your item!', cid)
           doPlayerAddItem(cid,5892,1)
       end
       else
           npcHandler:say('You don\'t have these items!', cid)
   end
end

function draconian(cid, message, keywords, parameters, node)
   if(not npcHandler:isFocused(cid)) then
       return false
   end
       if getPlayerItemCount(cid,2516) >= 1 then
       if doPlayerRemoveItem(cid,2516,1) then
           npcHandler:say('Here is your item!', cid)
           doPlayerAddItem(cid,5889,1)
       end
       else
           npcHandler:say('You don\'t have these items!', cid)
  end   
end

-- XVX FORGER END --

keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can forge Amulet, Obsidian Knife, Huge Chunk of Crude Iron and Piece of Draconian Steel!"})

local node1 = keywordHandler:addKeyword({'amulet'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Hum Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no??'})
   node1:addChildKeyword({'yes'}, amulet, {npcHandler = npcHandler, onlyFocus = true, reset = true})
   node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})

local node2 = keywordHandler:addKeyword({'obsidian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield and an Obsidian Lance for a Obsidian Knife?'})
   node2:addChildKeyword({'yes'}, obsidian, {npcHandler = npcHandler, onlyFocus = true, reset = true})
   node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})

local node3 = keywordHandler:addKeyword({'crude'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Giant Spider Silk for a Huge Chunk of Crude Iron?'})
   node3:addChildKeyword({'yes'}, crude, {npcHandler = npcHandler, onlyFocus = true, reset = true})
   node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})

local node4 = keywordHandler:addKeyword({'draconian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield for a Piece of Draconian Steel?'})
   node4:addChildKeyword({'yes'}, draconian, {npcHandler = npcHandler, onlyFocus = true, reset = true})
   node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})

npcHandler:addModule(FocusModule:new())

 

Paralyze rune.

 

Bom a paralyze ta normal só que eu queria tipo o tibia rl quando solta a paralyze sobe a magia verde em min e vermelha no cara.

No meu ot so sobe vermelha no cara não sobe a verde em min.

 

Script da paralyze:

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

 

Exori hur

 

Quando solto a exori hur ae chega ao player ela solta uma explosão vermelha tipo um X queria igual a exori que é cinza tipo um X.

 

Script da exori hur.

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack, level / 5
return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

 

Magic Wall e Wild Growth.

 

quando o player usa ele pega PZ

 

Script Magic Wall:

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

 

Script Wild Growth:

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

Link para o comentário
Compartilhar em outros sites

Script Magic Wall:

 

 

local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) 
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

function onCastSpell(cid, var) 
       return doCombat(cid, combat, var) 
end

 

Script Wild Growth:

 

local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) 
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1499)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

function onCastSpell(cid, var) 
       return doCombat(cid, combat, var) 
end

 

 

no npc teria que adicionar:

 


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 

-- XVX FORGER START -- 

function amulet(cid, message, keywords, parameters, node) 
   if(not npcHandler:isFocused(cid)) then 
       return false 
   end 
       if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then 
       if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) and (doPlayerRemoveMoney(cid, 5000) == TRUE) then 
           npcHandler:say('Here is your item!', cid) 
           doPlayerAddItem(cid,8266,1) 
       end 
       else 
           npcHandler:say('You don\'t have these items!', cid) 
   end 
end 

function obsidian(cid, message, keywords, parameters, node) 
   if(not npcHandler:isFocused(cid)) then 
       return false 
   end 
       if getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,2425) >= 1 then 
       if doPlayerRemoveItem(cid,2516,1) and doPlayerRemoveItem(cid,2425,1) then 
           npcHandler:say('Here is your item!', cid) 
           doPlayerAddItem(cid,5908,1) 
       end 
       else 
           npcHandler:say('You don\'t have these items!', cid) 
   end 
end      

function crude(cid, message, keywords, parameters, node) 
   if(not npcHandler:isFocused(cid)) then 
       return false 
   end 
       if getPlayerItemCount(cid,5879) >= 1 then 
       if doPlayerRemoveItem(cid,5879,1) then 
           npcHandler:say('Here is your item!', cid) 
           doPlayerAddItem(cid,5892,1) 
       end 
       else 
           npcHandler:say('You don\'t have these items!', cid) 
   end 
end 

function draconian(cid, message, keywords, parameters, node) 
   if(not npcHandler:isFocused(cid)) then 
       return false 
   end 
       if getPlayerItemCount(cid,2516) >= 1 then 
       if doPlayerRemoveItem(cid,2516,1) then 
           npcHandler:say('Here is your item!', cid) 
           doPlayerAddItem(cid,5889,1) 
       end 
       else 
           npcHandler:say('You don\'t have these items!', cid) 
  end    
end

function crown(cid, message, keywords, parameters, node) 
   if(not npcHandler:isFocused(cid)) then 
       return false 
   end 
       if getPlayerItemCount(cid,2487) >= 1 then 
       if doPlayerRemoveItem(cid,2487,1) then 
           npcHandler:say('Here is your item!', cid) 
           doPlayerAddItem(cid,5887,1) 
       end 
       else 
           npcHandler:say('You don\'t have these items!', cid) 
  end    
end 

-- XVX FORGER END -- 

keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can forge Amulet, Obsidian Knife, Huge Chunk of Crude Iron and Piece of Draconian Steel!"}) 

local node1 = keywordHandler:addKeyword({'amulet'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Hum Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no??'}) 
   node1:addChildKeyword({'yes'}, amulet, {npcHandler = npcHandler, onlyFocus = true, reset = true}) 
   node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 

local node2 = keywordHandler:addKeyword({'obsidian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield and an Obsidian Lance for a Obsidian Knife?'}) 
   node2:addChildKeyword({'yes'}, obsidian, {npcHandler = npcHandler, onlyFocus = true, reset = true}) 
   node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 

local node3 = keywordHandler:addKeyword({'crude'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Giant Spider Silk for a Huge Chunk of Crude Iron?'}) 
   node3:addChildKeyword({'yes'}, crude, {npcHandler = npcHandler, onlyFocus = true, reset = true}) 
   node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 

local node4 = keywordHandler:addKeyword({'draconian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield for a Piece of Draconian Steel?'}) 
   node4:addChildKeyword({'yes'}, draconian, {npcHandler = npcHandler, onlyFocus = true, reset = true}) 
   node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 


local node5 = keywordHandler:addKeyword({'crown armor'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a crown armor for a Piece of Royal Steel?'}) 
   node5:addChildKeyword({'yes'}, crown, {npcHandler = npcHandler, onlyFocus = true, reset = true}) 
   node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true}) 


npcHandler:addModule(FocusModule:new())

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

Olha a paralyze não deu certo mais todos os outros esa corretos e faltou a exori hur ;p

Obrigado Rep++

Mais ver esse outros pra min plz.

Link para o comentário
Compartilhar em outros sites

paralyze:

 

local combat = createCombatObject()  
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)  
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE) 
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)  
setConditionFormula(condition, -0.9, 0, -0.9, 0) 
setCombatCondition(combat, condition)  

function onCastSpell(cid, var)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)  
return doCombat(cid, combat, var)  
end

 

a da exori hur eu nao entendi

 

pq sai uma espada na direção do monstro...

e oque vc quer mudar?

colocar algum efeito?

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

Deu esse erro na paralyzer

 

[Error - Spell Interface]

data/spells/scripts/healing/heal friend.lua

Description

<luaSetConditionParam> condition not found

 

A exori hur por so mudar a cor de vermelho pr cinza quando ataca o cara a espada vai quando chega nele da o hit ae sai um efeito tipo um x mais e vermelho eu quero cinza ;ppp

Link para o comentário
Compartilhar em outros sites

a da paralyze eu testei e funfo aqui brother

 

vc coloco no diretorio errado(data/spells/scripts/healing/heal friend.lua)

 

certo seria em

 

data\spells\scripts\support\paralyze rune.lua

 

 

olha:

22222_17.jpg

 

local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) 

local condition = createConditionObject(CONDITION_PARALYZE) 
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000) 
setConditionFormula(condition, -0.9, 0, -0.9, 0) 
setCombatCondition(combat, condition) 

function onCastSpell(cid, var)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) 
return doCombat(cid, combat, var) 
end

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

Deu certo cara tou te devendo mais rep+++

mais essa

Exura sio só quem em min sobe a magia azul no player e verde.

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)


function getCombatFormulas(cid, lv, maglv)
local formula_min = ((lv*0.25 + maglv*3) * 3.3)
local formula_max = ((lv*0.25 + maglv*3) * 3.9)

if(formula_max < formula_min) then
	local tmp = formula_max
	formula_max = formula_min
	formula_min = tmp
end
return formula_min, formula_max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")


function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

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

local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) 
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) 


function getCombatFormulas(cid, lv, maglv) 
       local formula_min = ((lv*0.25 + maglv*3) * 3.3) 
       local formula_max = ((lv*0.25 + maglv*3) * 3.9) 

       if(formula_max < formula_min) then 
               local tmp = formula_max 
               formula_max = formula_min 
               formula_min = tmp 
       end 
       return formula_min, formula_max 
end 
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") 


function onCastSpell(cid, var) 
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE)
return doCombat(cid, combat, var) 
end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...