Ir para conteúdo
  • 0

Erro De Spell,talk E Char Imortal Em Ot Pokemon


Anubis18

Pergunta

Erro do spell

 

[06/05/2012 19:59:56] [Error - Spell Interface]
[06/05/2012 19:59:56] data/spells/scripts/ps/Bubble Blast.lua:onCastSpell
[06/05/2012 19:59:56] Description:
[06/05/2012 19:59:56] (luaGetThingFromPos) Tile not found

 

Erro do talk

 

[06/05/2012 22:20:56] [Error - TalkAction Interface]
[06/05/2012 22:20:56] In a timer event called from:
[06/05/2012 22:20:56] data/talkactions/scripts/move1.lua:onSay
[06/05/2012 22:20:56] Description:
[06/05/2012 22:20:56] (luaHasItemProperty) Item not found

 

Como coloco para o player morrer no server? pois ele não toma atake fisico nem spell dos pokemons...

 

Server usado "Pokemon Dash Advanced" e "Pokemon Dash Edit | By Slicer |"

 

 

 

Aqui os 2 script.

 

Spell

 

function onCastSpell(cid, var)

 

if isSummon(cid) then return true end

 

docastspell(cid, "Bubble Blast")

 

return true

end

 

Talk... esse e grande.

local msgs = {"use ", ""}

 

function onSay(cid, words, param, channel)

 

 

if param ~= "" then return true end

if string.len(words) > 3 then return true end

 

if #getCreatureSummons(cid) == 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.")

return 0

end

 

if getCreatureCondition(getCreatureSummons(cid)[1], CONDITION_INVISIBLE) and not isGhostPokemon(getCreatureSummons(cid)[1]) then

return 0

end

 

local mypoke = getCreatureSummons(cid)[1]

 

if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end

if getCreatureName(mypoke) == "Evolution" then return true end

 

local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke)

 

local it = string.sub(words, 2, 3)

local move = movestable[name].move1

local cdzin = "move"..it..""

 

if it == "2" then

move = movestable[name].move2

elseif it == "3" then

move = movestable[name].move3

elseif it == "4" then

move = movestable[name].move4

elseif it == "5" then

move = movestable[name].move5

elseif it == "6" then

move = movestable[name].move6

elseif it == "7" then

move = movestable[name].move7

elseif it == "8" then

move = movestable[name].move8

elseif it == "9" then

move = movestable[name].move9

elseif it == "10" then

move = movestable[name].move10

elseif it == "11" then

move = movestable[name].move11

elseif it == "12" then

move = movestable[name].move12

elseif it == "13" then

move = movestable[name].move13

end

 

if not move then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.")

return true

end

 

if false and getLevel(mypoke) < move.level then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't have enough level to use this move.")

return 0

end

 

if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use this move again.")

return 0

end

 

if getTileInfo(getThingPos(mypoke)).protection then

doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.")

return 0

end

 

 

if move.target == 1 then

 

if not isCreature(getCreatureTarget(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")

return 0

end

 

if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then

return 0

end

 

if getCreatureHealth(getCreatureTarget(cid)) <= 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.")

return 0

end

 

if not isCreature(getCreatureSummons(cid)[1]) then

return true

end

 

if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.")

return 0

end

 

if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then

return 0

end

end

 

doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY)

 

if isSleeping(mypoke) then

setCD(getPlayerSlotItem(cid, 8).uid, cdzin, 8)

doCreatureSay(mypoke, "zZzZ", TALKTYPE_MONSTER)

return 0

else

setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd)

end

 

if move.name ~= "Metronome" then

doCreatureSay(mypoke, ""..string.upper(move.name).."!", TALKTYPE_MONSTER)

end

 

docastspell(mypoke, move.name)

doCreatureAddCondition(cid, playerexhaust)

 

return 0

end

Link para o comentário
Compartilhar em outros sites

Posts Recomendados

  • 0

Esse e do player quando morrer. "Mas ele não toma hit nenhum..."

 

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, 63215, 0)

setPlayerStorageValue(cid, 61207, 1)

end

 

if getPlayerStorageValue(cid, 62314) >= 1 then

setPlayerStorageValue(cid, 61205, getPlayerStorageValue(cid, 61262))

setPlayerStorageValue(cid, 61206, getPlayerStorageValue(cid, 61263))

setPlayerStorageValue(cid, 61204, 0)

setPlayerStorageValue(cid, 62314, 0)

setPlayerStorageValue(cid, 61207, 1)

end

setPlayerGroupId(cid, 1)

doRemoveCreature(cid)

return TRUE

end

 

Esse e de quando o player loga...

 

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

local flys = {

["Moltres"] = {229, 2300}, -- moltres

["Articuno"] = {230, 2100}, -- artic

["Zapdos"] = {224, 2600}, -- zapdos

["Mew"] = {232, 2200}, -- 1000

["Mewtwo"] = {233, 2200},-- two

["Dragonite"] = {221, 1300},-- nite

["Pidgeot"] = {222, 900}, -- geot

["Fearow"] = {226, 800}, -- fearow

["Aerodactyl"] = {227, 1100}, -- aero

["Charizard"] = {216, 1000}, -- chari

["Porygon"] = {316, 600}, -- porygon

["Shiny Moltres"] = {229, 2300}, -- Shiny moltres

["Shiny Articuno"] = {1018, 2100}, -- Shiny artic

["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos

["Shiny Mew"] = {1022, 2200}, -- Shiny 1000

["Shiny Mewtwo"] = {1021, 2200},-- Shiny two

["Shiny Dragonite"] = {1020, 1300},-- Shiny nite

["Shiny Pidgeot"] = {996, 900}, -- Shiny geot

["Shiny Fearow"] = {997, 800}, -- Shiny fearow

["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero

["Shiny Charizard"] = {995, 1000}, -- Shiny chari

["Shiny Porygon"] = {1016, 600}, -- Shiny porygon

["Porygon2"] = {648, 890}, -- 2

["Skarmory"] = {649, 1000}, -- skarmory

["Crobat"] = {652, 1190}, -- crobat

}

 

local rides = {

["Tauros"] = {128, 580}, -- tauros

["Ninetales"] = {129, 800}, -- kyuubi

["Rapidash"] = {130, 800}, -- rapid

["Ponyta"] = {131, 410}, -- ponyta

["Rhyhorn"] = {132, 400}, -- rhyhorn

["Arcanine"] = {12, 900}, -- arcan

["Onix"] = {126, 450}, -- onix

["Venusaur"] = {134, 390}, -- venu

["Dodrio"] = {133, 750}, -- dodrio

["Doduo"] = {135, 420}, -- doduo

["Shiny Tauros"] = {1024, 580}, -- tauros

["Shiny Ninetales"] = {999, 800}, -- kyuubi

["Shiny Rapidash"] = {1005, 800}, -- rapid

["Shiny Ponyta"] = {1004, 410}, -- ponyta

["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn

["Shiny Arcanine"] = {1003, 900}, -- arcan

["Shiny Onix"] = {126, 450}, -- onix

["Shiny Venusaur"] = {1040, 390}, -- venu

["Shiny Dodrio"] = {1007, 750}, -- dodrio

["Shiny Doduo"] = {1006, 420}, -- doduo

["Crystal Onix"] = {293, 480}, -- cristal onix

["Steelix"] = {646, 750}, -- steelix

["Meganium"] = {685, 720}, -- meganium

["Bayleef"] = {686, 555}, -- bayleef

["Stantler"] = {687, 595}, -- stantler

["Houndoom"] = {647, 820}, -- houndoom

["Piloswine"] = {689, 450}, -- piloswine

["Mareep"] = {688, 400}, -- marip

}

 

local surf = {

["Poliwag"] = {lookType=278, speed = 320},

["Poliwhirl"] = {lookType=137, speed = 480},

["Seaking"] = {lookType=269, speed = 520},

["Dewgong"] = {lookType=183, speed = 700},

["Blastoise"] = {lookType=184, speed = 850},

["Tentacruel"] = {lookType=185, speed = 750},

["Lapras"] = {lookType=186, speed = 960},

["Gyarados"] = {lookType=187, speed = 1050},

["Omastar"] = {lookType=188, speed = 680},

["Kabutops"] = {lookType=189, speed = 840},

["Poliwrath"] = {lookType=190, speed = 680},

["Vaporeon"] = {lookType=191, speed = 800},

["Staryu"] = {lookType=266, speed = 385},

["Starmie"] = {lookType=267, speed = 685},

["Goldeen"] = {lookType=268, speed = 355},

["Seadra"] = {lookType=270, speed = 655},

["Golduck"] = {lookType=271, speed = 760},

["Squirtle"] = {lookType=273, speed = 365},

["Wartortle"] = {lookType=275, speed = 605},

["Tentacool"] = {lookType=277, speed = 340},

["Snorlax"] = {lookType=300, speed = 500},

 

["Shiny Poliwag"] = {lookType=1010, speed = 320},

["Shiny Poliwhirl"] = {lookType=1011, speed = 480},

["Shiny Seaking"] = {lookType=1027, speed = 520},

["Shiny Dewgong"] = {lookType=1015, speed = 700},

["Shiny Blastoise"] = {lookType=1002, speed = 850},

["Shiny Tentacruel"] = {lookType=1014, speed = 750},

["Shiny Lapras"] = {lookType=1031, speed = 960},

["Shiny Gyarados"] = {lookType=1030, speed = 1050},

["Shiny Omastar"] = {lookType=1033, speed = 680},

["Shiny Kabutops"] = {lookType=1034, speed = 840},

["Shiny Poliwrath"] = {lookType=1012, speed = 680},

["Shiny Vaporeon"] = {lookType=1032, speed = 800},

["Shiny Staryu"] = {lookType=1028, speed = 385},

["Shiny Starmie"] = {lookType=1029, speed = 685},

["Shiny Goldeen"] = {lookType=1026, speed = 355},

["Shiny Seadra"] = {lookType=1025, speed = 655},

["Shiny Golduck"] = {lookType=1009, speed = 760},

["Shiny Squirtle"] = {lookType=1000, speed = 365},

["Shiny Wartortle"] = {lookType=1001, speed = 605},

["Shiny Tentacool"] = {lookType=1013, speed = 340},

["Shiny Snorlax"] = {lookType=1035, speed = 500},

 

["Mantine"] = {lookType=636, speed = 820},

["Totodile"] = {lookType=637, speed = 360},

["Croconow"] = {lookType=638, speed = 590},

["Feraligatr"] = {lookType=645, speed = 900},

["Marill"] = {lookType=639, speed = 340},

["Azumarill"] = {lookType=642, speed = 680},

["Quagsire"] = {lookType=643, speed = 740},

["Kingdra"] = {lookType=644, speed = 1020},

["Octillery"] = {lookType=641, speed = 600},

["Wooper"] = {lookType=640, speed = 315},

}

 

function onLogin(cid)

 

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100)

doCreatureSetDropLoot(cid, false)

 

local accountManager = getPlayerAccountManager(cid)

 

if(accountManager == MANAGER_NONE) then

local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage

if(lastLogin > 0) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."

else

str = str

end

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

 

elseif(accountManager == MANAGER_NAMELOCK) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")

elseif(accountManager == MANAGER_ACCOUNT) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")

end

 

if getCreatureName(cid) == "Account Manager" then

local outfit = {}

if accountManagerRandomPokemonOutfit then

outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}

else

outfit = accountManagerOutfit

end

 

doSetCreatureOutfit(cid, outfit, -1)

return true

end

 

if(not isPlayerGhost(cid)) then

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

end

 

local outfit = {}

 

if getPlayerVocation(cid) == 0 then

doPlayerSetMaxCapacity(cid, 0)

doPlayerSetVocation(cid, 1)

setCreatureMaxMana(cid, 6)

doPlayerAddSoul(cid, -getPlayerSoul(cid))

setPlayerStorageValue(cid, 19898, 0)

if getCreatureOutfit(cid).lookType == 128 then

outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

elseif getCreatureOutfit(cid).lookType == 136 then

outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}

end

doCreatureChangeOutfit(cid, outfit)

end

 

registerCreatureEvent(cid, "WatchTv")

registerCreatureEvent(cid, "StopWatchingTv")

registerCreatureEvent(cid, "WalkTv")

registerCreatureEvent(cid, "RecordTv")

--registerCreatureEvent(cid, "Death")

registerCreatureEvent(cid, "PlayerLogout")

registerCreatureEvent(cid, "WildAttack")

registerCreatureEvent(cid, "Idle")

registerCreatureEvent(cid, "PokemonIdle")

registerCreatureEvent(cid, "EffectOnAdvance")

registerCreatureEvent(cid, "GeneralConfiguration")

registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "LookSystem")

registerCreatureEvent(cid, "T1")

registerCreatureEvent(cid, "T2")

registerCreatureEvent(cid, "task_count")

 

if getPlayerStorageValue(cid, 99284) == 1 then

setPlayerStorageValue(cid, 99284, -1)

end

 

if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then

setPlayerStorageValue(cid, 6598754, -1)

setPlayerStorageValue(cid, 6598755, -1)

end

 

doChangeSpeed(cid, -(getCreatureSpeed(cid)))

 

if getPlayerStorageValue(cid, 17000) >= 1 then -- fly

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

 

local apos = getFlyingMarkedPos(cid)

apos.stackpos = 0

 

if getTileThingByPos(apos).itemid <= 2 then

doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)

doCreateItem(460, 1, getFlyingMarkedPos(cid))

end

 

doTeleportThing(cid, apos, false)

 

local posicao = getTownTemplePosition(getPlayerTown(cid))

markFlyingPos(cid, posicao)

 

elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1)

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

 

elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride

 

local item = getPlayerSlotItem(cid, 8)

local poke = getItemAttribute(item.uid, "poke")

 

 

if rides[poke] then

doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))

doRemoveCondition(cid, CONDITION_OUTFIT)

doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)

else

setPlayerStorageValue(cid, 17001, -1)

doChangeSpeed(cid, PlayerSpeed)

end

 

local posicao2 = getTownTemplePosition(getPlayerTown(cid))

markFlyingPos(cid, posicao2)

 

elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive

if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then

setPlayerStorageValue(cid, 13008, 0)

doChangeSpeed(cid, PlayerSpeed)

doRemoveCondition(cid, CONDITION_OUTFIT)

return true

end

 

if getPlayerSex(cid) == 1 then

doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)

end

doChangeSpeed(cid, 800)

 

elseif getPlayerStorageValue(cid, 5700) > 0 then --bike

doChangeSpeed(cid, getPlayerStorageValue(cid, 5700))

if getPlayerSex(cid) == 1 then

doSetCreatureOutfit(cid, {lookType = 1394}, -1)

else

doSetCreatureOutfit(cid, {lookType = 1393}, -1)

end

elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then

doChangeSpeed(cid, 140*getPlayerGroupId(cid))

else

doChangeSpeed(cid, PlayerSpeed)

end

 

return true

end

 

 

Tem outros scripts... Aqui esta a Xml do creature, se quizerem algum outro script para voces verem so pedir...

 

 

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

<creaturescripts>


<event type="kill" name="task_count" script="task.lua"/>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="think" name="Idle" event="script" value="idle.lua"/>
<event type="death" name="Death" event="script" value="playerpdeath.lua"/>
<event type="death" name="Experience" event="script" value="pokeexp.lua"/>
<event type="spawn" name="Spawn" event="script" value="spawn.lua"/>
<event type="think" name="PokemonIdle" event="script" value="poketele.lua"/>
<event type="think" name="t" event="script" value="wildpoke.lua"/>
<event type="statschange" name="GeneralConfiguration" event="script" value="exp.lua"/>
<event type="advance" name="EffectOnAdvance" event="script" value="levelup.lua"/>
<event type="direction" name="DirectionSystem" event="script" value="wildpoke.lua"/>
<event type="attack" name="AttackSystem" event="script" value="wildpoke.lua"/>
<event type="cast" name="CastSystem" event="script" value="wildpoke.lua"/>
<event type="target" name="WildAttack" event="script" value="playerattack.lua"/>
<event type="look" name="LookSystem" event="script" value="look.lua"/>
<event type="death" name="SummonDeath" event="script" value="goback.lua"/>
<event type="logout" name="PlayerLogout" event="script" value="goback.lua"/>

<!-- TV SYSTEM -->
<event type="joinchannel" name="WatchTv" event="script" value="tvsys.lua"/>
<event type="leavechannel" name="StopWatchingTv" event="script" value="tvsys.lua"/>
<event type="walk" name="WalkTv" event="script" value="tvsys.lua"/>
<event type="textedit" name="RecordTv" event="script" value="tvsys.lua"/>
<event type="traderequest" name="T2" event="script" value="trade system.lua"/>
<event type="tradeaccept" name="T1" event="script" value="trade system.lua"/>

</creaturescripts>

 

 

Ainda não consegui arrumar o bugs: "Sera que pode ser por eu usar windows 7 - 64bits? ou não tem nada haver?"

 

(luaHasItemProperty) Item not found "M1 ate M12"

(luaGetThingFromPos) Tile not found "Spell"

Link para o comentário
Compartilhar em outros sites

  • 0

Wildpoke.lua:

 

function onAttack(cid, target)

doSendMagicEffect(getThingPos(target), 15)

return true

end

 

function onThink(cid, interval)

 

doSendAnimatedText(getThingPos(cid), getPlayerStorageValue(cid, 1008).."/"..getPlayerStorageValue(cid, 1009).."", COLOR_GRASS)

 

end

 

function onDirection(cid)

 

if isSleeping(cid) then

return false

end

 

if getPlayerStorageValue(cid, 446) >= 1 then

return false

end

 

if isSummon(cid) and isCreature(getCreatureTarget(cid)) then

return true

end

 

if getCreatureSpeed(cid) == 0 then

return false

end

 

if isPassive(cid) and getCreatureSpeed(cid) ~= 1 then

return false

end

 

return true

end

 

function onCast(cid, target)

 

if isSleeping(cid) then

return false

end

 

if getCreatureCondition(cid, CONDITION_INVISIBLE) and not isGhostPokemon(cid) then

return false

end

 

return true

end

 

 

 

Galera, o atake "Selfdestruction", esta tirando life das pessoas... mesmo sendo de um player, tira a life do outro player quando da self... mas somente o self ta assim, ja olhei no spell.xml e no lua e nenhum dos 2 ta diferente do resto...

Link para o comentário
Compartilhar em outros sites

  • 0

Coloque isto

 

 

 

function onAttack(cid, target)

doSendMagicEffect(getThingPos(target), 15)

return true

end

 

function onThink(cid, interval)

 

doSendAnimatedText(getThingPos(cid), getPlayerStorageValue(cid, 1008).."/"..getPlayerStorageValue(cid, 1009).."", COLOR_GRASS)

 

end

 

function onDirection(cid)

 

if isSleeping(cid) then

return false

end

 

 

 

if getCreatureSpeed(cid) == 0 then

return false

end

 

 

return true

end

 

function onCast(cid, target)

 

if isSleeping(cid) then

return false

end

 

 

return true

end

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

  • 0

Bom... testei...

 

 

[13/05/2012 14:32:38] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/wildpoke.lua)

[13/05/2012 14:32:38] data/creaturescripts/scripts/wildpoke.lua:35: 'end' expected (to close 'function' at line 10) near '<eof>'

 

Coloquei um end no final e deu esse outro erro.

 

 

[13/05/2012 14:33:02] (luaCreateCombatArea) This function can only be used while loading the script.

[13/05/2012 14:33:02] [Warning - Event::loadScript] Event onCast not found (data/creaturescripts/scripts/wildpoke.lua)

Link para o comentário
Compartilhar em outros sites

  • 0
local fightcondition = createConditionObject(CONDITION_INFIGHT)

setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 12 * 1000)

 

function fightCondic(cid)

if not isCreature(cid) then return true end

if not isCreature(getCreatureTarget(cid)) then return true end

doAddCondition(cid, fightcondition)

addEvent(fightCondic, 1000, cid)

end

 

function onTarget(cid, target)

 

if isPlayer(target) then

if canAttackOther(cid, target) == "Cant" then --edited PVP system

return false

elseif isPlayer(target) and #getCreatureSummons(target) >= 1 and canAttackOther(cid, target) == "Can" then

return false

end

end

 

if getPlayerStorageValue(target, 201) ~= -1 then

for a, b in pairs(ginasios) do

if getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) == 1 then

if getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 then

doPlayerSendCancel(cid, "You can't attack this pokemon.")

return false

end

end

end

end

 

if isSummon(target) then --edited PVP system

if canAttackOther(cid, target) == "Cant" then

return false

end

end

 

if false then -- desativado

 

if not isPlayerInAgressiveList(target, cid) then

addPlayerToAgressiveList(target, cid)

end

 

if isPassive(target) then

setAgressive(target)

if #getCreatureSummons(cid) >= 1 then

doMonsterSetTarget(target, getCreatureSummons(cid)[1])

 

else

doMonsterSetTarget(target, cid)

end

 

else

local histarget = getCreatureTarget(target)

if isCreature(histarget) and isPlayer(getCreatureMaster(histarget)) and #getCreatureSummons(cid) >= 1 and #getCreatureSummons(getCreatureMaster(histarget)) <= 0 then

doMonsterSetTarget(target, getCreatureSummons(cid)[1])

end

end

end

 

return TRUE

end

 

o playeratake que vc pediu... eu não tenho o wildatake... sera que e por isso???

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

  • 0

acho que agr vai

 

 

local fightcondition = createConditionObject(CONDITION_INFIGHT)

setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 12 * 1000)

 

function fightCondic(cid)

doAddCondition(cid, fightcondition)

addEvent(fightCondic, 1000, cid)

end

 

function onTarget(cid, target)

 

if getPlayerStorageValue(target, 201) ~= -1 then

for a, b in pairs(ginasios) do

if getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) == 1 then

if getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 then

doPlayerSendCancel(cid, "You can't attack this pokemon.")

return false

end

end

end

end

 

if false then -- desativado

 

 

if isPassive(target) then

setAgressive(target)

if #getCreatureSummons(cid) >= 1 then

doMonsterSetTarget(target, getCreatureSummons(cid)[1])

 

else

doMonsterSetTarget(target, cid)

end

 

else

return TRUE

end

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

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