-
Total de itens
116 -
Registro em
-
Última visita
-
Dias Ganhos
5
Posts postados por GniusP
-
-
Pessoal, tenho uma script que o player ganha x item e volta para o cp quando não tem ninguem em x area, mas eu gostaria de fazer com que essa script fosse ativada depois de 5 segundos após o player pisar nesse tile.
Exemplo: Player pisa no tile, da 5 segundos e o script é ativado
Se não tiver ninguem nessa area, o script passa 5 segundos e funciona normal, caso tenha player nessa area, o script não funciona!
A script ja esta ok, só falta adicionar 5 segundos
function onStepIn(cid, item, position, fromPosition) local pos = {x = 1037, y = 1034, z = 7} local battlewin = 1 if #getCreatureSummons(cid) >= 1 then else if #getPlayersInArea(battleroyale.area) > 1 then return true end doTeleportThing(cid, pos) local item = doPlayerAddItem(cid, 5805, 1) doItemSetAttribute(item, "description", getCreatureName(cid).." conquistou este trofeu apos vencer uma partida no Battle Royale.") doBroadcastMessage(""..getCreatureName(cid).." Venceu o evento Battle Royale") doPlayerAddItem(cid,12618,1) doPlayerAddItem(cid,2152,30) addTopbattle(cid, battlewin) return true end end
-
Pessoal, preciso de uma script que limitasse x item dos players
Por exemplo, ele só poderia ter na sua conta 5 pedras, se colocasse pra ter 6 pedra não teria como!
-
Pessoal, tenho uma script que o player só passa se ele tiver uma guild, a script funciona certinho, só q da um erro na distro quando um pokemon (monstro) passa por cima desse tile
Erro:
[07/03/2021 16:08:43] [Error - MoveEvents Interface]
[07/03/2021 16:08:43] datapack/movements/scripts/guildpiso.lua:onStepIn
[07/03/2021 16:08:43] Description:
[07/03/2021 16:08:43] datapack/movements/scripts/guildpiso.lua:2: attempt to compare number with boolean
[07/03/2021 16:08:43] stack traceback:
[07/03/2021 16:08:43] datapack/movements/scripts/guildpiso.lua:2: in function <datapack/movements/scripts/guildpiso.lua:1>Scritp:
Citarfunction onStepIn(cid, item, position, fromPosition)
if getPlayerGuildId(cid) > 0 then
doPlayerSendTextMessage(cid, 27, "Voce entrou, Guild "..getPlayerGuildName(cid)..".")
else
doPlayerSendTextMessage(cid, 27, "Desculpe,mais somente players que possuem guild pode entrar nessa area.")
doTeleportThing(cid, fromPosition)
end
return true
end -
2 horas atrás, KaboFlow disse:
acho ja?
Infelizmente nao
-
Pessoal, a alavanca do meu servidor faz com que o player que utilizar a alavanca, perde HP, mas não tem nada no scritp, todas a alavanca acontece isso, alguém tem ideia do que seja?
1 hora atrás, GniusP disse:Já arrumei pessoal, era uma script no actions...valeuu
-
Quero saber se é possivel eu fazer com que o player delete a guild(site modern acc) somente se ele não tiver nenhuma player na guild ou player invitado...
Uso modern acc
-
Em 27/02/2021 em 12:35, Yan18 disse:
Posta print do erro completo na distro.
Sobre o player matar um pokemon selvagem sem um dele fora da ball, é em situações do tipo quando o pokémon selvagem está sob algum efeito de status negativo, como burn por exemplo?
[28/02/2021 09:20:35] [Error - CreatureScript Interface]
[28/02/2021 09:20:35] datapack/creaturescripts/scripts/pokelevel.lua:onKill
[28/02/2021 09:20:35] Description:
[28/02/2021 09:20:35] (luaGetCreatureName) Creature not found -
18 horas atrás, Deadpool disse:
tas usando que base?
Poketibia (OTP) 0.3.6
-
Pessoal, preciso de uma script que o player é teleportado quando tiver x porcentagem de vida, e essa script só funciona se ele tiver em uma area especifica...(x.y)
-
Pessoal, preciso de uma script que ao player usar o item na pokeball do pokemon, ele ganhe +100 de vida
Exemplo:
Ele tem 1400 de vida, ai ao usar o item ele ficaria com 1500
-
Olá pessoal, eu tenho um sistema de level system para pokemons, só que quando um player mata um pokemon sem estar com seu pokemon para fora, da esse erro
datapack/creaturescripts/scripts/pokelevel.lua:onKill
(luaGetItemAttribute) Item not found
Como faço para quando o player não tiver com o poke pra fora e matar outro pokemon (no soco) não acontecer esse erro?
script:
function onKill(cid, target) ------------------ VARIAVEIS ------------------------------------------------------------------------------------------------------------ local posss = getCreaturePosition(cid) local exppp = math.random(15, 75) local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET) local chck = getItemAttribute(feet.uid, "exp") local chckc = getItemAttribute(feet.uid, "level") local mypoke = getCreatureSummons(cid)[1] local boostlevel = getItemAttribute(feet.uid, "boost") or 0 ----------------------------------------------------------------------------------------------------------------------------------------- if isPlayer(target) == false and getItemAttribute(feet.uid, "level") == 100 then --doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Limite de Level do Pokemon Atingido !") return true end if isPlayer(cid) == true and isSummon(target) == true then doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Your Pokemon dont gain experience in Duel") return true end ---------------------------------------------------------------- level 1 ---------------------------------------------------------------- if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == False then return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == 1 and getItemAttribute(feet.uid, "exp") >= 0 and getItemAttribute(feet.uid, "exp") <= 250 then doItemSetAttribute(feet.uid, "exp", chck +exppp) doSendAnimatedText(getThingPos(mypoke), ""..exppp.." (EXP)", 215) return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "exp") >= 250 and getItemAttribute(feet.uid, "level") == 1 then doPlayerSendTextMessage(cid, 25, "Seu "..getCreatureName(mypoke).." avançou do nível 1 para o nível 2!") doItemSetAttribute(feet.uid, "level", chckc +1) doSendAnimatedText(getCreaturePosition(getCreatureSummons(cid)[1]), "LEVEL UP!", 215) doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 211) doSendAnimatedText(getCreaturePosition(getCreatureSummons(cid)[1]), "LEVEL UP!", 215) doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 211) doItemSetAttribute(feet.uid, "exp", 1) local nick = ""..getCreatureName(getCreatureSummons(cid)[1]).." ["..getItemAttribute(feet.uid, "level").."]" doCreatureSetNick(getCreatureSummons(cid)[1], nick) return true end ------------------------------------------------------------------------------------------------------------------------------------------ ---------------------------------------------------------------- level 2 ---------------------------------------------------------------- if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == False then return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == 2 and getItemAttribute(feet.uid, "exp") >= 0 and getItemAttribute(feet.uid, "exp") <= 500 then doItemSetAttribute(feet.uid, "exp", chck +exppp) doSendAnimatedText(getThingPos(mypoke), ""..exppp.." (EXP)", 215) return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "exp") >= 500 and getItemAttribute(feet.uid, "level") == 2 then doPlayerSendTextMessage(cid, 25, "Seu "..getCreatureName(mypoke).." avançou do nível 2 para o nível 3!") doItemSetAttribute(feet.uid, "level", chckc +1) doSendAnimatedText(getCreaturePosition(getCreatureSummons(cid)[1]), "LEVEL UP!", 215) doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 211) doItemSetAttribute(feet.uid, "exp", 1) local nick = ""..getCreatureName(getCreatureSummons(cid)[1]).." ["..getItemAttribute(feet.uid, "level").."]" doCreatureSetNick(getCreatureSummons(cid)[1], nick) return true end end
-
Adaptei level sistem no meu servidor, mas quando o player pega um pokemon, o poke volta pro level 1, gostaria de deixar pro mesmo level q o pokemon estava na hora de ser morto
script:
linha aonde a função é ativada: doItemSetAttribute(item, "level", 1)
function doBrokesCount(cid, str, ball) --alterado v1.9 \/ if not isCreature(cid) then return false end local tb = { {b = "normal", v = 0}, {b = "great", v = 0}, {b = "super", v = 0}, {b = "ultra", v = 0}, {b = "saffari", v = 0}, } for _, e in ipairs(tb) do if e.b == ball then e.v = 1 break end end local string = getPlayerStorageValue(cid, str) local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);" local t2 = "" for n, g, s, u, s2 in string:gmatch(t) do t2 = "normal = "..(n+tb[1].v)..", great = "..(g+tb[2].v)..", super = "..(s+tb[3].v)..", ultra = "..(u+tb[4].v)..", saffari = "..(s2+tb[5].v)..";" end return setPlayerStorageValue(cid, str, string:gsub(t, t2)) end function sendBrokesMsg(cid, str, ball) if not isCreature(cid) then return false end local string = getPlayerStorageValue(cid, str) local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);" local msg = {} table.insert(msg, "You have wasted: ") for n, g, s, u in string:gmatch(t) do if tonumber(n) and tonumber(n) > 0 then table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or "")) end if tonumber(g) and tonumber(g) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or "")) end if tonumber(s) and tonumber(s) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or "")) end if tonumber(u) and tonumber(u) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or "")) end if tonumber(s2) and tonumber(s2) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or "")) end if tonumber(s2) and tonumber(s2) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." AW Ball".. (tonumber(s2) > 1 and "s" or "")) end end if #msg == 1 then return true end if string.sub(msg[#msg], 1, 1) == "," then msg[#msg] = " and".. string.sub(msg[#msg], 2, #msg[#msg]) end table.insert(msg, " trying to catch it.") sendMsgToPlayer(cid, 27, table.concat(msg)) end --alterado v1.9 /\ -------------------------------------------------------------------------------- function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system local name = catchinfo.name local pos = catchinfo.topos local topos = {} topos.x = pos.x topos.y = pos.y topos.z = pos.z local newid = catchinfo.newid local catch = catchinfo.catch local fail = catchinfo.fail local rate = catchinfo.rate local basechance = catchinfo.chance if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then rate = 15 end local corpse = getTopCorpse(topos).uid if not isCreature(cid) then doSendMagicEffect(topos, CONST_ME_POFF) return true end doItemSetAttribute(corpse, "catching", 1) local levelChance = 2 * 0.02 local totalChance = math.ceil(basechance * (1.2 + levelChance)) local thisChance = math.random(0, totalChance) local myChance = math.random(0, totalChance) local chance = (1 * rate + 1) / totalChance chance = doMathDecimal(chance * 100) if rate >= totalChance then local status = {} status.gender = getItemAttribute(corpse, "gender") status.happy = 160 doRemoveItem(corpse, 1) doSendMagicEffect(topos, catch) addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) return true end if totalChance <= 1 then totalChance = 1 end local myChances = {} local catchChances = {} for cC = 0, totalChance do table.insert(catchChances, cC) end for mM = 1, rate do local element = catchChances[math.random(1, #catchChances)] table.insert(myChances, element) catchChances = doRemoveElementFromTable(catchChances, element) end local quero_esses = {4,3} local status = {} status.gender = quero_esses[math.random(1, #quero_esses)] status.happy = 70 doRemoveItem(corpse, 1) local doCatch = false for check = 1, #myChances do if thisChance == myChances[check] then doCatch = true end end if doCatch then doSendMagicEffect(topos, catch) addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) else addEvent(doNotCapturePokemon, 3000, cid, name, typeee) doSendMagicEffect(topos, fail) end end function doCapturePokemon(cid, poke, ballid, status, typeee) if not isCreature(cid) then return true end local list = getCatchList(cid) if not isInArray(list, poke) and not isShinyName(poke) then doPlayerAddSoul(cid, 1) end doAddPokemonInOwnList(cid, poke) doAddPokemonInCatchList(cid, poke) if not tonumber(getPlayerStorageValue(cid, 54843)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, 54843, 1) end if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then setPlayerStorageValue(cid, 54843, 1) else setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1) end local description = "Contains a "..poke.."." local gender = status.gender local happy = 200 --alterado v1.6 if getPlayerFreeCap(cid) <= 1 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then item = doCreateItemEx(ballid) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) end doItemSetAttribute(item, "poke", poke) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "exp", 0) doItemSetAttribute(item, "level", 1) doItemSetAttribute(item, "fakedesc", description) doItemSetAttribute(item, "description", description) doItemSetAttribute(item, "tadport", fotos[poke]) if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then --edited passiva hitmonchan doItemSetAttribute(item, "hands", 0) end ----------- task clan --------------------- if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then sendMsgToPlayer(cid, 27, "Quest Done!") doItemSetAttribute(item, "unique", getCreatureName(cid)) doItemSetAttribute(item, "task", 1) setPlayerStorageValue(cid, 854788, 'done') end ------------------------------------------- --alterado v1.9 \/ if getPlayerFreeCap(cid) <= 1 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) doPlayerSendTextMessage(cid, 27, "Você capturou um pokémon! ("..poke..")!") doPlayerSendTextMessage(cid, 27, "Seu pokemon capturado foi para o depot porque você ja possui 6 pokemons.") addTopcatch(cid, 1) else doPlayerSendTextMessage(cid, 27, "Você capturou um pokémon! ("..poke..")!") addTopcatch(cid, 1) end local storage = newpokedex[poke].stoCatch sendBrokesMsg(cid, storage, typeee) setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0;") --alterado v1.9 /\ if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) if catchMakesPokemonHappier then setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + 20) end else doSendMagicEffect(getThingPos(cid), 173) end end function doNotCapturePokemon(cid, poke, typeee) if not isCreature(cid) then return true end if not tonumber(getPlayerStorageValue(cid, 54843)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, 54843, 1) end if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then setPlayerStorageValue(cid, 54843, 1) else setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1) end if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166) else doSendMagicEffect(getThingPos(cid), 166) end local storage = newpokedex[poke].stoCatch doBrokesCount(cid, storage, typeee) end function getPlayerInfoAboutPokemon(cid, poke) local a = newpokedex[poke] if not isPlayer(cid) then return false end if not a then print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.") return false end local b = getPlayerStorageValue(cid, a.storage) if b == -1 then setPlayerStorageValue(cid, a.storage, poke..":") end local ret = {} if string.find(b, "catch,") then ret.catch = true else ret.catch = false end if string.find(b, "dex,") then ret.dex = true else ret.dex = false end if string.find(b, "use,") then ret.use = true else ret.use = false end return ret end function doAddPokemonInOwnList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).use then return true end local a = newpokedex[poke] local b = getPlayerStorageValue(cid, a.storage) setPlayerStorageValue(cid, a.storage, b.." use,") end function isPokemonInOwnList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).use then return true end return false end function doAddPokemonInCatchList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).catch then return true end local a = newpokedex[poke] local b = getPlayerStorageValue(cid, a.storage) setPlayerStorageValue(cid, a.storage, b.." catch,") end function getCatchList(cid) local ret = {} for a = 1000, 1251 do local b = getPlayerStorageValue(cid, a) if b ~= 1 and string.find(b, "catch,") then table.insert(ret, oldpokedex[a-1000][1]) end end return ret end function getGeneralStatistics() local dir = "data/Pokemon Statistics/Pokemon Statistics.txt" local base = "Number/Name/Tries/Catches\n\n" local str = "" for a = 1, 251 do local number1 = getStatistics(oldpokedex[a][1], true, false) local number2 = getStatistics(oldpokedex[a][1], false, true) base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].." "..str..""..number1.." / "..number2.."\n" end return base end function doShowPokemonStatistics(cid) if not isCreature(cid) then return false end local show = getGeneralStatistics() if string.len(show) > 8192 then print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.") doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.") return false end doShowTextDialog(cid, math.random(2391, 2394), show) end
-
O meu servidor esta com esse erro
Alguem pode me ajudar?[Error - CreatureScript Interface]
[04/09/2020 16:37:42] datapack/creaturescripts/scripts/exp2.0.lua:onStatsChange
[04/09/2020 16:37:42] Description:
[04/09/2020 16:37:42] datapack/creaturescripts/scripts/exp2.0.lua:278: attempt to index field '?' (a nil value)
[04/09/2020 16:37:42] stack traceback:
[04/09/2020 16:37:42] datapack/creaturescripts/scripts/exp2.0.lua:278: in function <datapack/creaturescripts/scripts/exp2.0.lua:63>
Citarlocal combats = {
[PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC},
[GRASSDAMAGE] = {cor = COLOR_GRASS},
[POISONEDDAMAGE] = {cor = COLOR_GRASS},
[FIREDAMAGE] = {cor = COLOR_FIRE2},
[BURNEDDAMAGE] = {cor = COLOR_BURN},
[WATERDAMAGE] = {cor = COLOR_WATER},
[ICEDAMAGE] = {cor = COLOR_ICE},
[NORMALDAMAGE] = {cor = COLOR_NORMAL},
[FLYDAMAGE] = {cor = COLOR_FLYING},
[GHOSTDAMAGE] = {cor = COLOR_GHOST},
[GROUNDDAMAGE] = {cor = COLOR_GROUND},
[ELECTRICDAMAGE] = {cor = COLOR_ELECTRIC},
[ROCKDAMAGE] = {cor = COLOR_ROCK},
[BUGDAMAGE] = {cor = COLOR_BUG},
[FIGHTDAMAGE] = {cor = COLOR_FIGHTING},
[DRAGONDAMAGE] = {cor = COLOR_DRAGON},
[POISONDAMAGE] = {cor = COLOR_POISON},
[DARKDAMAGE] = {cor = COLOR_DARK},
[STEELDAMAGE] = {cor = COLOR_STEEL},
[MIRACLEDAMAGE] = {cor = COLOR_PSYCHIC},
[DARK_EYEDAMAGE] = {cor = COLOR_GHOST},
[SEED_BOMBDAMAGE] = {cor = COLOR_GRASS},
[SACREDDAMAGE] = {cor = COLOR_FIRE2},
[MUDBOMBDAMAGE] = {cor = COLOR_GROUND}, --alterado v1.9
}local function sendPlayerDmgMsg(cid, text)
if not isCreature(cid) then return true end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, text)
endlocal races = {
[4] = {cor = COLOR_FIRE2},
[6] = {cor = COLOR_WATER},
[7] = {cor = COLOR_NORMAL},
[8] = {cor = COLOR_FIRE2},
[9] = {cor = COLOR_FIGHTING},
[10] = {cor = COLOR_FLYING},
[11] = {cor = COLOR_GRASS},
[12] = {cor = COLOR_POISON},
[13] = {cor = COLOR_ELECTRIC},
[14] = {cor = COLOR_GROUND},
[15] = {cor = COLOR_PSYCHIC},
[16] = {cor = COLOR_ROCK},
[17] = {cor = COLOR_ICE},
[18] = {cor = COLOR_BUG},
[19] = {cor = COLOR_DRAGON},
[20] = {cor = COLOR_GHOST},
[21] = {cor = COLOR_STEEL},
[22] = {cor = COLOR_DARK},
[1] = {cor = 180},
[2] = {cor = 180},
[3] = {cor = 180},
[5] = {cor = 180},
}local damages = {GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, DARKDAMAGE, STEELDAMAGE}
local fixdmgs = {PSYCHICDAMAGE, COMBAT_PHYSICALDAMAGE, GRASSDAMAGE, FIREDAMAGE, WATERDAMAGE, ICEDAMAGE, NORMALDAMAGE, GHOSTDAMAGE}
local ignored = {POISONEDDAMAGE, BURNEDDAMAGE}
local cannotkill = {BURNEDDAMAGE, POISONEDDAMAGE}function onStatsChange(cid, attacker, type, combat, value)
if combat == FLYSYSTEMDAMAGE then return false end
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TVif not isCreature(attacker) then
if not isInArray(fixdamages, combat) and combats[combat] then
doSendAnimatedText(getThingPos(cid), value, combats[combat].cor)
end
return true
endlocal damageCombat = combat
--------------------------------------------------
if type == STATSCHANGE_HEALTHGAIN then
if cid == attacker then
return true
end
if isSummon(cid) and isSummon(attacker) and canAttackOther(cid, attacker) == "Cant" then
return false
end
return true
end
--------------------------------------------------
if isMonster(cid) then
local valor = value
if not pokes[getCreatureName(cid)] and damageCombat == COMBAT_PHYSICALDAMAGE then
valor = getOffense(attacker) * playerDamageReduction
doCreatureAddHealth(cid, -math.abs(valor), 3, races[7].cor)
return false
elseif not pokes[getCreatureName(cid)] and damageCombat ~= COMBAT_PHYSICALDAMAGE then
doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor)
return false
end
end
--------------------------------------------------
if isPlayer(attacker) thenlocal valor = value
if valor > getCreatureHealth(cid) then
valor = getCreatureHealth(cid)
endif combat == COMBAT_PHYSICALDAMAGE then
return false
endif combat == PHYSICALDAMAGE then
doSendMagicEffect(getThingPos(cid), 3)
doSendAnimatedText(getThingPos(cid), valor, races[getMonsterInfo(getCreatureName(cid)).race].cor)
endif combats[damageCombat] and not isInArray(fixdmgs, damageCombat) then
doSendAnimatedText(getThingPos(cid), valor, combats[damageCombat].cor)
endif #getCreatureSummons(attacker) >= 1 and not isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combat) then
doPlayerSendTextMessage(attacker, MESSAGE_STATUS_DEFAULT, "Your "..getPokeName(getCreatureSummons(attacker)[1]).." dealt "..valor.." damage to "..getSomeoneDescription(cid)..".")
endreturn true
end
--------------------------------------------------
if isPlayer(cid) and #getCreatureSummons(cid) >= 1 and type == STATSCHANGE_HEALTHLOSS then
return false
end
--------------------------------------------------
if isPlayer(cid) and #getCreatureSummons(cid) <= 0 and type == STATSCHANGE_HEALTHLOSS thenif isSummon(attacker) or isPlayer(attacker) then
if canAttackOther(cid, attacker) == "Cant" then return false end
endlocal valor = 0
if combat == COMBAT_PHYSICALDAMAGE then
valor = getOffense(attacker)
else
valor = getSpecialAttack(attacker)
endvalor = valor * playerDamageReduction
valor = valor * math.random(83, 117) / 100if valor >= getCreatureHealth(cid) then
valor = getCreatureHealth(cid)
endvalor = math.floor(valor)
if valor >= getCreatureHealth(cid) then
if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
setPlayerStorageValue(cid, 6598754, -1)
setPlayerStorageValue(cid, 6598755, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doTeleportThing(cid, posBackPVP, false)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
return false --alterado v1.8
end
if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then
doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid, 17000, 0)
setPlayerStorageValue(cid, 17001, 0)
setPlayerStorageValue(cid, 63215, -1)
doChangeSpeed(cid, PlayerSpeed)
local item = getPlayerSlotItem(cid, ?
local btype = getPokeballType(item.itemid)
if #getCreatureSummons(cid) <= 0 then
if isInArray(pokeballs[btype].all, item.itemid) then
doTransformItem(item.uid, pokeballs[btype].off)
doItemSetAttribute(item.uid, "hp", 0)
end
end
endif getPlayerStorageValue(cid, 22545) == 1 then
if getGlobalStorageValue(22550) == 1 then
doPlayerSendTextMessage(cid, 20, "You are the last survivor of the golden arena! Take your reward!")
doPlayerAddItem(cid, 2152, getPlayerStorageValue(cid, 22551)*2)
setPlayerStorageValue(cid, 22545, -1)
doTeleportThing(cid, getClosestFreeTile(cid, getClosestFreeTile(cid, posBackGolden)), false)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
setPlayerRecordWaves(cid)
endGoldenArena()
return false --alterado v1.8
else
setGlobalStorageValue(22550, getGlobalStorageValue(22550)-1)
setPlayerStorageValue(cid, 22545, -1)
doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
setPlayerRecordWaves(cid)
return true
end
endif getPlayerStorageValue(cid, 98796) >= 1 then
setPlayerStorageValue(cid, 98796, -1)
setPlayerStorageValue(cid, 98797, -1) --alterado v1.8
doTeleportThing(cid, SafariOut, false)
doSendMagicEffect(getThingPos(cid), 21)
doPlayerSendTextMessage(cid, 27, "You die in the saffari... Best luck in the next time!")
return false --alterado v1.8
endlocal corpse = doCreateItem(3058, 1, getThingPos(cid))
doDecayItem(corpse)
doItemSetAttribute(corpse, "pName", getCreatureName(cid)) --alterado v1.7 coloca corpse quando o player morre!
doItemSetAttribute(corpse, "attacker", getCreatureName(attacker))
doItemSetAttribute(corpse, "article", getPlayerSex(cid) == 0 and "She" or "He")
if getPlayerStorageValue(cid, Agatha.stoIni) >= 1 and getPlayerStorageValue(cid, Agatha.stoIni) <= 10 then
setPlayerStorageValue(cid, Agatha.stoIni, -1)
setPlayerStorageValue(cid, Agatha.stoRec, -1)
setPlayerStorageValue(cid, Agatha.stoPer, -1)
setPlayerStorageValue(cid, Agatha.stoEni, -1) --alterado v1.9 agatha quest
setPlayerStorageValue(cid, Agatha.stoRes, -1)
end
end
doCreatureAddHealth(cid, -valor, 3, 180)
if not isPlayer(cid) then
addEvent(sendPlayerDmgMsg, 5, cid, "You lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".")
end
return false
end
--------------------------------------------------
if isMonster(attacker) and getPlayerStorageValue(attacker, 201) ~= -1 then
if isPlayer(cid) then
return false
end
if getPlayerStorageValue(getCreatureMaster(cid), ginasios[getPlayerStorageValue(attacker, 201)].storage) ~= 1 then
return false
end
end
--------------------------------------------------
if isMonster(cid) and getPlayerStorageValue(cid, 201) ~= -1 then
if getPlayerStorageValue(getCreatureMaster(attacker), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then
return false
end
end
--------------------------------------------------
if ehMonstro(cid) and ehMonstro(attacker) and not isSummon(cid) and not isSummon(attacker) then
return false --alterado v1.9 /\
end
--------------------------------------------------
--------------------REFLECT-----------------------
if getPlayerStorageValue(cid, 21099) >= 1 and combat ~= COMBAT_PHYSICALDAMAGE then
if not isInArray({"Team Claw", "Team Slice"}, getPlayerStorageValue(attacker, 21102)) then
doSendMagicEffect(getThingPosWithDebug(cid), 135)
doSendAnimatedText(getThingPosWithDebug(cid), "REFLECT", COLOR_GRASS)
addEvent(docastspell, 100, cid, getPlayerStorageValue(attacker, 21102))
if getCreatureName(cid) == "Wobbuffet" then
doRemoveCondition(cid, CONDITION_OUTFIT)
end
setPlayerStorageValue(cid, 21099, -1)
setPlayerStorageValue(cid, 21100, 1)
setPlayerStorageValue(cid, 21101, attacker)
setPlayerStorageValue(cid, 21103, getTableMove(attacker, getPlayerStorageValue(attacker, 21102)).f)
setPlayerStorageValue(cid, 21104, getCreatureOutfit(attacker).lookType)
return false
end
end
-------------------------------------------------local multiplier = 1
if isCreature(cid) then
poketype1 = pokes[getCreatureName(cid)].type
poketype2 = pokes[getCreatureName(cid)].type2
end
if not poketype1 or not poketype2 then return false end
if getCreatureCondition(cid, CONDITION_INVISIBLE) then
return false
end
if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then
if isInArray(effectiveness[damageCombat].super, poketype1) then
multiplier = multiplier + 0.5
end
if isInArray(effectiveness[damageCombat].super, poketype2) then
multiplier = multiplier + 0.5
end
if isInArray(effectiveness[damageCombat].weak, poketype1) then
multiplier = multiplier - 0.25
end
if isInArray(effectiveness[damageCombat].weak, poketype2) then
multiplier = multiplier - 0.25
end
if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then
if isInArray(specialabilities["foresight"], getCreatureName(attacker)) then
multiplier = 0.5
end --alterado v1.6
end
elseif combat == COMBAT_PHYSICALDAMAGE then
if isGhostPokemon(cid) then
if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --passiva Foresight!!
doSendMagicEffect(getThingPos(cid), 3)
return false
end
end
local cd = getPlayerStorageValue(attacker, conds["Miss"])
local cd2 = getPlayerStorageValue(attacker, conds["Confusion"])
local cd3 = getPlayerStorageValue(attacker, conds["Stun"])
if cd >= 0 or cd2 >= 0 or cd3 >= 0 then
if math.random(1, 100) > 50 then
doSendMagicEffect(getThingPos(cid), 211)
doSendAnimatedText(getThingPos(attacker), "MISS", 215)
return false
end
end
end
--------------------------------------------------
local valor = valueif multiplier == 1.5 and poketype2 == "no type" then
multiplier = 2
elseif multiplier == 1.5 and poketype2 ~= "no type" then
multiplier = 1.75
elseif multiplier == 1.25 then
multiplier = 1
end--------------------------------------------------
if isSummon(cid) and isSummon(attacker) then
if getCreatureMaster(cid) == getCreatureMaster(attacker) then
return false
end
if canAttackOther(cid, attacker) == "Cant" then
return false
end
endvalor = valor * multiplier
if isSummon(attacker) then
valor = valor * getHappinessRate(attacker)
else
valor = valor * summonReduction
end
valor = math.floor(valor)
if combat == COMBAT_PHYSICALDAMAGE then
local value = getOffense(attacker) > 1000 and 3 or 2
block = 1 - (getDefense(cid) / (getOffense(attacker) + getDefense(cid))) --alterado v1.9 testem essa nova formula plzzz '--'
valor = (getOffense(attacker)/value) * block
if valor <= 0 then
valor = math.random(5, 10) --alterado v1.9
end
if isInArray(specialabilities["counter"], getCreatureName(cid)) then
if math.random(1, 100) <= 10 then
doCreatureAddHealth(attacker, -valor, 3, 180)
valor = 0
doSendAnimatedText(getThingPosWithDebug(cid), "COUNTER", 215)
end
end
else
valor = valor / getDefense(cid)
end
-------------------------Edited CLAN SYSTEM-----------------------------------
if isSummon(attacker) and getPlayerStorageValue(getCreatureMaster(attacker), 86228) >= 1 then
valor = valor*getClanPorcent(getCreatureMaster(attacker), combat, "atk")
elseif isSummon(cid) and getPlayerStorageValue(getCreatureMaster(cid), 86228) >= 1 then
valor = valor - (valor*getClanPorcent(getCreatureMaster(cid), combat, "def", pokes[getCreatureName(cid)].type, pokes[getCreatureName(cid)].type2))
end
-----------------------------------------------------------------------
---------------------- FEAR / ROAR ------------------------------------
if getPlayerStorageValue(attacker, conds["Fear"]) >= 1 then
return true
end
--------------------------------------------------------------------------
if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then
if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then
if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then
valor = valor * 0
end
end
endif damageCombat == GROUNDDAMAGE then
if isInArray(specialabilities["levitate"], getCreatureName(cid)) then
valor = 0
end
end
-----------------------------------------------------------------------------
local p = getThingPos(cid)
if p.x == 1 and p.y == 1 and p.z == 10 then
return false
endif getPlayerStorageValue(cid, 9658783) == 1 then
return false --imune
end
-------------------------------------------------------------------------------------------- FIGHT MODE -----------------------
if useOTClient then
if isSummon(cid) then
local master = getCreatureMaster(cid)
if getPlayerStorageValue(master, 248759) == 1 then
valor = valor * 1.1
elseif getPlayerStorageValue(master, 248759) == 3 then
valor = valor * 0.9
end
end
if isSummon(attacker) then
local master = getCreatureMaster(attacker)
if getPlayerStorageValue(master, 248759) == 1 then
valor = valor * 1.1
elseif getPlayerStorageValue(master, 248759) == 3 then
valor = valor * 0.9
end
end
end
-----------------------------------------------------------------------------
if valor >= getCreatureHealth(cid) then
if isInArray(cannotKill, combat) and isPlayer(cid) then
valor = getCreatureHealth(cid) - 1
else
valor = getCreatureHealth(cid)
end
end
valor = math.floor(valor)
------------------ SKILLs Q CURAM O ATTACKER ---------------------------------
local function doHeal(cid, amount)
if (getCreatureHealth(cid) + amount) >= getCreatureMaxHealth(cid) then
amount = math.abs(getCreatureHealth(cid)-getCreatureMaxHealth(cid))
end
if getCreatureHealth(cid) ~= getCreatureMaxHealth(cid) then
doCreatureAddHealth(cid, amount)
doSendAnimatedText(getThingPosWithDebug(cid), "+"..amount.."", 65)
end
end
if damageCombat == PSYCHICDAMAGE or damageCombat == MIRACLEDAMAGE then
if getPlayerStorageValue(attacker, 95487) >= 1 then
doHeal(attacker, valor)
setPlayerStorageValue(attacker, 95487, -1)
end
elseif damageCombat == SEED_BOMBDAMAGE then
doHeal(attacker, valor)
end
--------------------------------------------
----------SACRED FIRE-----------------------
if combat == SACREDDAMAGE and not ehNPC(cid) then
local ret = {}
ret.id = cid
ret.cd = 9
ret.check = getPlayerStorageValue(cid, conds["Silence"])
ret.eff = 39
ret.cond = "Silence"doCondition2(ret)
elseif combat == MUDBOMBDAMAGE and not ehNPC(cid) then
local ret = {}
ret.id = cid
ret.cd = 9
ret.eff = 34
ret.check = getPlayerStorageValue(cid, conds["Miss"])
ret.spell = "Mud Bomb" --alterado v1.9
ret.cond = "Miss"
doCondition2(ret)
end
---------------------------------------------
--------------Passiva Lifesteal Clobat------------
if combat == COMBAT_PHYSICALDAMAGE then
if getCreatureName(attacker) == "Crobat" then
doCreatureAddHealth(attacker, math.floor(valor))
doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30)
end
end
--------------------------------------------
valor = math.abs(valor) --alterado v1.9
if isSummon(attacker) then
if combat == COMBAT_PHYSICALDAMAGE then
doTargetCombatHealth(getCreatureMaster(attacker), cid, PHYSICALDAMAGE, -valor, -valor, 255)
addEvent(doDoubleHit, 1000, attacker, cid, valor, races)
else
doTargetCombatHealth(getCreatureMaster(attacker), cid, damageCombat, -valor, -valor, 255)
end
else
if combat ~= COMBAT_PHYSICALDAMAGE then
doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor)
else
doCreatureAddHealth(cid, -math.abs(valor), 3, races[getMonsterInfo(getCreatureName(cid)).race].cor)
addEvent(doDoubleHit, 1000, attacker, cid, valor, races)
endif isSummon(cid) and valor ~= 0 then
addEvent(sendPlayerDmgMsg, 5, getCreatureMaster(cid), "Your "..getCreatureName(cid).." lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".")
endend
if damageCombat == FIREDAMAGE and not isBurning(cid) then
local ret = {}
ret.id = cid
ret.cd = math.random(5, 12)
ret.check = getPlayerStorageValue(cid, conds["Burn"])
ret.damage = isSummon(attacker) and getMasterLevel(attacker)+getPokemonBoost(attacker) or getPokemonLevel(attacker)
ret.cond = "Burn"
doCondition2(ret)
elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) then
local ret = {}
ret.id = cid
ret.cd = math.random(6, 15)
ret.check = getPlayerStorageValue(cid, conds["Poison"])
local lvl = isSummon(attacker) and getMasterLevel(attacker) or getPokemonLevel(attacker)
ret.damage = math.floor((getPokemonLevel(attacker)+lvl)/2)
ret.cond = "Poison"
doCondition2(ret)
end
--[[---------------CD BAR-----------------------
if isSummon(cid) then
doCreatureExecuteTalkAction(getCreatureMaster(cid), "/pokeread")
end ]]
------------------------------------POTIONS-------------------------------------------
if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then
if getPlayerStorageValue(cid, 173) >= 1 then
if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then
setPlayerStorageValue(cid, 173, -1)
doSendAnimatedText(getThingPos(cid), "Lost Heal", 144)
end
end
end
----------------------------------------PASSIVAS-------------------------------------
-------------------------------------------Counter Helix------------------------------------
if passivesChances["Helix"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Helix"][getCreatureName(cid)] then
docastspell(cid, "Counter Helix")
end
-------------------------------------------Lava Counter/Electricity----------------------------
if passivesChances["Fire_Thunder"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Fire_Thunder"][getCreatureName(cid)] then
docastspell(cid, "Lava-Electricity")
end
---------------------------------------Stunning Confusion-----------------------------------------
if passivesChances["Stunning"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Stunning"][getCreatureName(cid)] then
docastspell(cid, "Stunning Confusion")
end
-----------------------------------------Groundshock-----------------------------------
if passivesChances["Groundshock"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Groundshock"][getCreatureName(cid)] then
docastspell(cid, "Groundshock")
end
--------------------------------------Electric Charge---------------------------------------------
if passivesChances["Electric Charge"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Electric Charge"][getCreatureName(cid)] then
docastspell(cid, "Electric Charge", 0, 0)
end
-------------------------------------Melody------------------------------------
if passivesChances["Melody"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Melody"][getCreatureName(cid)] then
docastspell(cid, "Melody")
end
------------------------------------- Dragon Fury / Fury ---------------------------------------
if passivesChances["Dragon Fury"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Dragon Fury"][getCreatureName(cid)] then
docastspell(cid, "Dragon Fury", 0, 0)
end
------------------------------------- Mega Drain ---------------------------------------
if passivesChances["Mega Drain"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Mega Drain"][getCreatureName(cid)] then
docastspell(cid, "Mega Drain")
end
------------------------------------- Spores Reaction ---------------------------------------
if passivesChances["Spores Reaction"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Spores Reaction"][getCreatureName(cid)] then
docastspell(cid, "Spores Reaction")
end
------------------------------------ Amnesia ----------------------------------------
if passivesChances["Amnesia"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Amnesia"][getCreatureName(cid)] then
docastspell(cid, "Amnesia", 0, 0)
end
----------------------------------- Zen Mind -----------------------------------------
if passivesChances["Zen Mind"][getCreatureName(cid)] and isWithCondition(cid) and math.random(1, 100) <= passivesChances["Zen Mind"][getCreatureName(cid)] then
docastspell(cid, "Zen Mind", 0, 0)
end
---------------------------------- Mirror Coat ---------------------------------------
if passivesChances["Mirror Coat"][getCreatureName(cid)] and math.random(1, 100) <= passivesChances["Mirror Coat"][getCreatureName(cid)] then
docastspell(cid, "Mirror Coat", 0, 0)
end
--------------------------------- Illusion -----------------------------------------
return false
end -
5 horas atrás, brazvct disse:
Link do download não funciona .-.
-
6 horas atrás, never myth disse:
me chama whats discord Dev.Never#4637
Ok.
Pronto!
-
Estou vendendo esse website Modern acc de poketibia, ele tem um modelo/layout diferenciado de qualquer outros servidores.
Também tem o sistema de feedback, onde a pessoa da um feedback e esse comentário é aparecido na home do site, e só pode dar 1 feedback por conta!
Dou todo o suporte para instalação e funcionamento do site.
confira os prints abaixo:
OBS:Se eu estiver no tópico errado, peço desculpa e que me avisem para eu poder corrigir.
-
1 hora atrás, GOD Vitor disse:
Conseguiu?
Infelizmente não ;/
-
Pessoal, eu quero uma script em que só pudesse ficar 1 player em cima desse tile, caso outra pessoa tentasse passar pro cima, aparecia uma mensagem negando sua passagem.
-
Pessoal, preciso de um magic wall só que por item
-
Pessoal, eu uso OTClient de poketibia, e ele é padrão, só que ja joguei em otclient em que os efeitos(animação) dos items, magias e etc era mais suave, digamos que um pouco mais "rápido"
Gostaria de saber como faço isso, sei que tem haver com a source do otcliente.
-
Olá, pessoal, eu gostaria de saber como faço pro npc falar com mais de um player
Por exemplo:
Chega 1 player e fala hi com npc, ai chega outra pessoa o npc fala isso
please wait for your turn. There are 1 customers before you.
Então o npc só vai falar com o outro player caso o primeiro saia...
queria que ele falasse com todos ao mesmo tempo
-
12 horas atrás, Marshmello disse:
Teste ae, não esqueça de fazer a tag do stepOut
local danos = { {5, 5, 5}, {5, 5, 5}, {5, 5, 5}} -- {Porcentagem, effect1 e effect2} local temp = 1 -- a cada 1 segundo ele toma dano local storage = 3459491 function tileDamange(cid, pos) local dmg = danos[math.random(1, #danos)] local damage = math.ceil((tonumber(dmg[1])* 0.01) * getCreatureMaxHealth(cid)) if getPlayerStorageValue(cid, storage) == 0 then return true end if (isCreature(cid) == TRUE) then npos = getThingPos(cid) doSendMagicEffect(getThingPos(cid), dmg[2]) doSendMagicEffect(getThingPos(cid), dmg[3]) doSendAnimatedText(getThingPos(cid), '-' ..dmg[1].. '%', TEXTCOLOR_LIGHTBLUE) doPlayerSendTextMessage(cid, 25, "Você esta tomando 5% de dano por estar na safe, vá para um lugar protegido!") doPlayerSendTextMessage(cid, 20, "Você esta tomando 5% de dano por estar na safe, vá para um lugar protegido!") addEvent(tileDamange, temp*1000, cid, npos) end function onStepIn(cid, item, position, fromPosition, pos) if not isPlayer(cid) then return true end setPlayerStorageValue(cid, storage, 1) addEvent(tileDamange, temp*1000, cid, pos) return true end function onStepOut(cid, item, position, fromPosition) if not isPlayer(cid) then return true end setPlayerStorageValue(cid, storage, 0) addEvent(tileDamange, temp*1000, cid, pos) return true end
Funcionou, porém faltou um and, mesmo assim obrigado
+REP
-
6 horas atrás, Marshmello disse:
Isso e na sources do Servidor
Sim, consegui arrumar já, pode fechar o tópico.
-
Pessoal, eu tenho um script que ela da % de dano no player se ele passar por cima do tile, funciona perfeitamente, ele passa por cima e toma % de dano, porém se ele ficar em cima do piso ele não toma mais dano, eu queria que ele tomasse hit a cada 2 segundos, por exemplo:
Player pisa no tile e tomou 5% de dano, ai ele fica em cima do tile e toma +5% de dano a cada 2 segundos
Script:Citarlocal danos = { {5, 5, 5}, {5, 5, 5}, {5, 5, 5}} -- {Porcentagem, effect1 e effect2}
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then
return true
end
local dmg = danos[math.random(1, #danos)]
local damage = math.ceil((tonumber(dmg[1])* 0.01) * getCreatureMaxHealth(cid))
doSendMagicEffect(getThingPos(cid), dmg[2])
doSendMagicEffect(getThingPos(cid), dmg[3])
doSendAnimatedText(getThingPos(cid), '-' ..dmg[1].. '%', TEXTCOLOR_LIGHTBLUE)
doCreatureAddHealth(cid, - damage)
doPlayerSendTextMessage(cid, 25, "Você esta tomando 5% de dano por estar na safe, vá para um lugar protegido!")
doPlayerSendTextMessage(cid, 20, "Você esta tomando 5% de dano por estar na safe, vá para um lugar protegido!")
return true
end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
Script boss que summon varios pokemons ao redor
em Scripts
Postado
Pessoal, preciso de uma script onde tem x pokemon, e quando esse pokemon é avistado por algum player, ele spawana +outrs pokemons ao redores, como se fosse defensores...
REP+