Postado Setembro 19, 2014 10 anos estou com uma pequena duvida, o que fazer quando uma script da erro na distro falando creature not found ? o seguinte erro é esse [19/09/2014 13:07:35] [Error - CreatureScript Interface] [19/09/2014 13:07:35] In a timer event called from: [19/09/2014 13:07:35] data/creaturescripts/scripts/exp.lua:onStatsChange [19/09/2014 13:07:35] Description: [19/09/2014 13:07:35] (luaDoCombatAreaHealth) Creature not found bom a script é essa Mostrar conteúdo oculto local passives = { ["Electabuzz"] = {chance=30, passive="passiva eletrica"} } if passives[getCreatureName(cid)] and math.random(1, 100) <= passives[getCreatureName(cid)].chance then local pos = getCreaturePosition(cid) local poses = { {x=pos.x + 1, y=pos.y, z=pos.z}, {x=pos.x + 1, y=pos.y+1, z=pos.z}, {x=pos.x, y=pos.y+1, z=pos.z}, {x=pos.x-1, y=pos.y+1, z=pos.z}, {x=pos.x-1, y=pos.y, z=pos.z}, {x=pos.x-1, y=pos.y-1, z=pos.z}, {x=pos.x, y=pos.y-1, z=pos.z}, {x=pos.x+1, y=pos.y-1, z=pos.z}, } local times = {0, 100, 200, 300, 400, 500, 600, 700, 800} for x=1, #poses do addEvent(doAreaCombatHealth, times[x], cid, FIREDAMAGE, poses[x], 0, -100, -1000, 11) end end -- fim passive é de poketibia
Postado Setembro 19, 2014 10 anos Amigo, creio que o script esteja incompleto. Se for só isso mesmo, mande-me o arquivo que eu tentarei resolver para você.
Postado Setembro 20, 2014 10 anos Autor Em 19/09/2014 em 19:24, Jamison Collins disse: Amigo, creio Que o roteiro esteja incompleto. Se por tanto ISSO MESMO, mande-me o ARQUIVO Que eu tentarei resolver parágrafo Voce. ta ai exp.lua Mostrar conteúdo oculto expcond local = createConditionObject (CONDITION_INFIGHT) setConditionParam (expcond, CONDITION_PARAM_TICKS, 4500) função onStatsChange (cid, atacante, ENPS, combatee, value) - Passivo passivos locais = { ["Electabuzz"] = {possibilidade = 30, Passivo = "eletrica Passiva"} } se passivos [getCreatureName (cid)] e math.random (1, 100) <= passivos [getCreatureName (cid)]. oportunidade depois pos local = getCreaturePosition (CID) poses locais = { {X = pos.x + 1, y = pos.y, z = pos.z}, {X = pos.x + 1, y = pos.y + 1, z = pos.z}, {X = pos.x, y = pos.y + 1, z = pos.z}, {X = pos.x-1, y = pos.y + 1, z = pos.z}, {X = pos.x-1, y = pos.y, z = pos.z}, {X = pos.x-1, y = pos.y-1, z = pos.z}, {X = pos.x, y = pos.y-1, z = pos.z}, {X = pos.x + 1, y = pos.y-1, z = pos.z}, } locais vezes = {0, 100, 200, 300, 400, 500, 600, 700, 800} para x = 1, #poses fazer addEvent (doAreaCombatHealth, tempos [x], CID firedamage, poses [x], 0, -100, -1000, 11) fim fim - Passiva FIM se getPlayerStorageValue (cid, 33)> = 1 then se isCreature (atacante), então return false fim return true fim se getPlayerStorageValue (cid, 34)> = 1 then se combatee ~ = COMBAT_PHYSICALDAMAGE seguida se isCreature (atacante), então doSendMagicEffect (getThingPos (CID), 135) doSendMagicEffect (getThingPos (atacante), 3) doSendAnimatedText (getThingPos (CID), "refletir", 215) doCreatureAddHealth (atacante, -value) setPlayerStorageValue (cid, 34, 0) doSendAnimatedText (getThingPos (atacante), -value, 191) return false fim fim fim se getPlayerStorageValue (cid, 35)> = 1 then se combatee ~ = COMBAT_PHYSICALDAMAGE seguida se isCreature (atacante), então doSendAnimatedText (getThingPos (CID), "miss", 215) setPlayerStorageValue (cid, 35, 0) return false fim fim fim se não isCreature (atacante), então return true fim se isPlayer (atacante), então return true fim se ENPS == STATSCHANGE_HEALTHGAIN seguida return true fim se ENPS == STATSCHANGE_HEALTHLOSS seguida se getCreatureHealth (cid) <= valor, em seguida, se isPlayer (CID), em seguida, se #getCreatureSummons (cid) == 0 então return true fim return false fim se isPlayer (getCreatureMaster (atacante)) então doTargetCombatHealth (getCreatureMaster (atacante), cid, combatee, - (getCreatureHealth (cid)), - (getCreatureHealth (cid)), 3) return false fim return true fim se isPlayer (getCreatureMaster (cid)) então doAddCondition (getCreatureMaster (CID), expcond) fim se não isPlayer (CID), em seguida, se combatee == ELECTRICDAMAGE seguida se isInArray (electric2, getCreatureName (cid)) então x = 2 elseif isInArray (electric1, getCreatureName (cid)) então x = 0,5 elseif isInArray (electric0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == waterdamage seguida se isInArray (water2, getCreatureName (cid)) então x = 2 elseif isInArray (water1, getCreatureName (cid)) então x = 0,5 elseif isInArray (water0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == GRASSDAMAGE seguida se isInArray (grass2, getCreatureName (cid)) então x = 2 elseif isInArray (grass1, getCreatureName (cid)) então x = 0,5 elseif isInArray (grass0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == FLYDAMAGE seguida se isInArray (Flying2, getCreatureName (cid)) então x = 2 elseif isInArray (flying1, getCreatureName (cid)) então x = 0,5 elseif isInArray (flying0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == firedamage seguida se isInArray (fire2, getCreatureName (cid)) então x = 2 elseif isInArray (fire1, getCreatureName (cid)) então x = 0,5 elseif isInArray (fire0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == ROCKDAMAGE seguida se isInArray (rock2, getCreatureName (cid)) então x = 2 elseif isInArray (rock1, getCreatureName (cid)) então x = 0,5 elseif isInArray (rock0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == GROUNDDAMAGE seguida se isInArray (ground2, getCreatureName (cid)) então x = 2 elseif isInArray (ground1, getCreatureName (cid)) então x = 0,5 elseif isInArray (ground0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == GHOSTDAMAGE seguida se isInArray (ghost2, getCreatureName (cid)) então x = 2 elseif isInArray (ghost1, getCreatureName (cid)) então x = 0,5 elseif isInArray (ghost0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == BUGDAMAGE seguida se isInArray (bug2, getCreatureName (cid)) então x = 2 elseif isInArray (bug1, getCreatureName (cid)) então x = 0,5 elseif isInArray (bug0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == NORMALDAMAGE seguida se isInArray (Normal2, getCreatureName (cid)) então x = 2 elseif isInArray (normal1, getCreatureName (cid)) então x = 0,5 elseif isInArray (normal0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == FIGHTDAMAGE seguida se isInArray (fighting2, getCreatureName (cid)) então x = 2 elseif isInArray (fighting1, getCreatureName (cid)) então x = 0,5 elseif isInArray (fighting0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == POISONDAMAGE seguida se isInArray (poison2, getCreatureName (cid)) então x = 2 elseif isInArray (poison1, getCreatureName (cid)) então x = 0,5 elseif isInArray (poison0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == PSYCHICDAMAGE seguida se isInArray (psychic2, getCreatureName (cid)) então x = 2 elseif isInArray (psychic1, getCreatureName (cid)) então x = 0,5 elseif isInArray (psychic0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == ICEDAMAGE seguida se isInArray (ice2, getCreatureName (cid)) então x = 2 elseif isInArray (ICE1, getCreatureName (cid)) então x = 0,5 elseif isInArray (ice0, getCreatureName (cid)) então x = 0 mais x = 1 fim combatee elseif == DRAGONDAMAGE seguida se isInArray (dragon2, getCreatureName (cid)) então x = 2 elseif isInArray (dragon1, getCreatureName (cid)) então x = 0,5 elseif isInArray (dragon0, getCreatureName (cid)) então x = 0 mais x = 1 fim mais x = 1 fim mais x = 1 fim locais xx = x se combatee == PSYCHICDAMAGE seguida CR = COLOR_PSYCHIC combatee elseif == GRASSDAMAGE seguida CR = COLOR_GRASS combatee elseif == firedamage seguida CR = COLOR_FIRE2 combatee elseif == waterdamage seguida CR = COLOR_WATER combatee elseif == ICEDAMAGE seguida CR = COLOR_ICE combatee elseif == NORMALDAMAGE seguida CR = COLOR_NORMAL combatee elseif == FLYDAMAGE seguida CR = COLOR_FLYING combatee elseif == GHOSTDAMAGE seguida CR = COLOR_GHOST combatee elseif == GROUNDDAMAGE seguida CR = COLOR_GROUND combatee elseif == ELECTRICDAMAGE seguida CR = COLOR_ELECTRIC combatee elseif == ROCKDAMAGE seguida CR = COLOR_ROCK combatee elseif == BUGDAMAGE seguida CR = COLOR_BUG combatee elseif == FIGHTDAMAGE seguida CR = COLOR_FIGHTING combatee elseif == DRAGONDAMAGE seguida CR = COLOR_DRAGON combatee elseif == POISONDAMAGE seguida CR = COLOR_POISON elseif getCreatureName (cid) == "Kakuna" ou getCreatureName (cid) == "Metapod" depois CR = COLOR_BUG elseif getCreatureName (cid) == "Golem" ou getCreatureName (cid) == "Graveler" ou getCreatureName (cid) == "Geodude" depois CR = COLOR_ROCK mais CR = NONE fim núcleos locais = cor se não isSummon (atacante), então se não isPlayer (CID) e não isPlayer (getCreatureMaster (cid)) então return false fim se isSummon (CID) e getCreatureHealth (cid) <= (getCreatureMaxHealth (cid) * 0,15) e não exhaustion.get (getCreatureMaster (CID), 88.726), em seguida, exhaustion.set (getCreatureMaster (CID), 88726, 6) doSendMagicEffect (getThingPos (CID), 178) fim se isPlayer (CID), em seguida, se #getCreatureSummons (cid)> = 1 then return false fim doCreatureAddHealth (cid, -value) doSendAnimatedText (getThingPos (CID), o valor, 180) doSendMagicEffect (getThingPos (CID), 3) return false fim se getPlayerStorageValue (cid, 4)> = 1 then dano = valor local doSendMagicEffect (getThingPos (CID), 2) doCreatureAddHealth (cid, - ((math.floor (dano / 2)) * xx)) doSendAnimatedText (getThingPos (CID), (math.floor ((danos) / 2) * xx), núcleos) mais dano = valor local se cor == NONE seguida return true fim doCreatureAddHealth (cid, - ((math.floor (dano / 1)) * xx)) doSendAnimatedText (getThingPos (CID), (math.floor ((danos) / 1) * xx), núcleos) doSendMagicEffect (getThingPos (CID), 3) return false fim return false fim se isSummon (atacante), então se isSummon (CID), em seguida, return false fim combatx = combatee valor = valor se getPlayerStorageValue (cid, 4)> = 1 then doTargetCombatHealth (getCreatureMaster (atacante), cid, combatx, - ((valor / 2) * x), - (((valor / 2) +10) * x), 255) mais doTargetCombatHealth (getCreatureMaster (atacante), cid, combatx, - ((valor) * x), - ((valor + 10) * x), 255) fim fim fim fim up Editado Setembro 19, 2014 10 anos por Valakinhas (veja o histórico de edições)
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.