Postado Fevereiro 14, 2018 7 anos Eae galera fmz? tou fazendo um poketibia e parei num bug que esta ocorrendo,que não consigo arrumar. "Surf ao clicar na borda da agua" Alguem poderia criar um para min? Script que eu uso/ Actions Spoiler local function doSendMagicEffecte(pos, effect) addEvent(doSendMagicEffect, 50, pos, effect) end local waters = {11756, 4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825} --alterado v2.5 local flie = {'4632', '4633', '4634', '4635', '4636', '4637','4638','4639','4640','4641','4642','4643','4644','4645','4646','4647','4648','4649','4650','4651','4652','4653','4654','4655','4656','4657','4658','4659','4660','4661','4662','4663'} --alterado v2.6 tabela agora em configuration.lua! local premium = false function onUse(cid, item, fromPosition, itemEx, toPosition) if not isPlayer(cid) or getPlayerAccess(cid) >= 6 then return true end if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV if isPlayer(cid) and not isPremium(cid) and premium == true then doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Somente os membros premium podem surfar.") return true end if getCreatureOutfit(cid).lookType == 316 or getCreatureOutfit(cid).lookType == 648 then doSendMagicEffect(fromPosition, 136) end if (getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1) then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "Você precisa de um pokemon para nadar.") doTeleportThing(cid, fromPosition, false) return true end if (not isInArray(specialabilities["surf"], getPokemonName(getCreatureSummons(cid)[1]))) then --alterado v2.6 doPlayerSendCancel(cid, "Este pokémon não pode nadar.") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 5700) == 1 then doPlayerSendCancel(cid, "Você não pode fazer nadar enquanto está montado em uma bike!") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6 doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 52480) >= 1 then doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v2.6 doTeleportThing(cid, fromPosition, false) return true end --alterado v2.6 doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid))) local speed = 75 + PlayerSpeed + getSpeed(getCreatureSummons(cid)[1]) * 8 * speedRate setPlayerStorageValue(cid, 54844, speed) doChangeSpeed(cid, speed) local pct = getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1]) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pct) doRemoveCreature(getCreatureSummons(cid)[1]) addEvent(setPlayerStorageValue, 100, cid, 63215, 1) return true end local direffects = {30, 49, 9, 51} function onUse(cid, item) if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end if isInArray(waters, getThingByPos(fromPosition).itemid ) then if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 then doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1]) end end if not isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then if getPlayerStorageValue(cid, 17000) >= 1 then return true end if getPlayerStorageValue(cid, 63215) <= 0 then return true end doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 63215, -1) local item = getPlayerSlotItem(cid, 8) local pokemon = getItemAttribute(item.uid, "poke") local x = pokes[pokemon] if not x then return true end if getItemAttribute(item.uid, "nick") then doCreatureSay(cid, getItemAttribute(item.uid, "nick")..", I'm tired of surfing!", 1) else doCreatureSay(cid, getItemAttribute(item.uid, "poke")..", I'm tired of surfing!", 1) end doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then pk = doCreateMonster(pokemon, backupPos) if not isCreature(pk) then doPlayerSendCancel(cid, "You can't stop surfing here.") doTeleportThing(cid, fromPosition, false) return true end doConvinceCreature(cid, pk) end doChangeSpeed(pk, getCreatureSpeed(cid)) doChangeSpeed(cid, -getCreatureSpeed(cid)) doRegainSpeed(cid) --alterado v2.6 doTeleportThing(pk, getThingPos(cid), false) doTeleportThing(pk, getThingPos(cid), true) doCreatureSetLookDir(pk, getCreatureLookDir(cid)) adjustStatus(pk, item.uid, true, false, true) end return true end actions.xml Spoiler <action itemid="4632-4663" event="script" value="surf.lua"/> Bom esse é o Sistema que eu estou utilizando no momento,porem ele buga. se alguem puder criar um pra min do 0 para que não haja bugs. Funciona assim. Ao clicar na borda da aguá,("eu iria pra aguá com o meu pokemon") para voltar era só clicar na borda dnv e voltava. se ele tentar clicar com pokemon sem surf aparece "Esse pokemon não pode surfar." se ele tentar clicar com bike aparece "saia da bike para surfar." se ele tentar clicar com pokemon de fly aparece "saia do fly para surfar."
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.