Ir para conteúdo

Featured Replies

Postado

galera o meu surf ta bugando quando meu pokemon entra no surf ele não consegui si mexe quando ta dentro da água
 
script do surf no moviments

local poke = {'feraligatr', 'croconaw', 'totodile', 'red gyarados', 'poliwag', 'poliwhirl', 'seaking', 'dewgong', 'blastoise', 'tentacruel', 'lapras', 'gyarados', 'omastar', 'kabutops', 'vaporeon', 'staryu', 'starmie', 'goldeen', 'seadra', 'golduck', 'squirtle', 'wartortle', 'tentacool', 'snorlax', 'poliwrath'}

local flie = {'4820', '4821', '4822', '4823', '4824', '4825'}

local surf = {
["feraligatr"] = {lookType=722, speed = 1500},
["croconaw"] = {lookType=715, speed = 1500},
["totodile"] = {lookType=714, speed = 1500},
["red gyarados"] = {lookType=529, speed = 1500},
["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},
}

function onStepIn(cid, item, position, fromPosition)
if isWatchingTv(cid) then
return true
end
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 400 then return false end -- TV
if getPlayerStorageValue(cid, 666) == 1 or getPlayerStorageValue(cid, 666) == 2 then
return false
end
if not isPlayer(cid) and not isPremium(cid) then -- tire o primeiro not, atras do isPlayer para ativar o premium
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "Only premium members are allowed to surf.")
return true
end
if getCreatureOutfit(cid).lookType == 316 then
doSendMagicEffect(fromPosition, 136)
end
if not isPlayer(cid) then
doTeleportThing(cid, fromPosition, false)
return true
end

if getPlayerStorageValue(cid, 63215) ~= 1 and getPlayerStorageValue(cid, 17000) <= 0 then
if #getCreatureSummons(cid) == 0 then
doPlayerSendCancel(cid, "You need a pokemon to surf.")
doTeleportThing(cid, fromPosition, false)
else
if (not isInArray(poke, getItemSpecialDescription(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid):match("Contains a (.*)."))) then
doPlayerSendCancel(cid, "This pokemon cannot surf.")
doTeleportThing(cid, fromPosition, false)
return true
end
end
end
if getPlayerGroupId(cid) == 1 then
setPlayerGroupId(cid, 8)
end
if #getCreatureSummons(cid) >= 1 and isInArray(poke, getItemAttribute(getPlayerSlotItem(cid, 8).uid, "description"):match("Contains a (.*).")) and getPlayerStorageValue(cid, 63215) ~= 1 and getPlayerStorageValue(cid, 17000) <= 0 then
doSetCreatureOutfit(cid, surf[getItemSpecialDescription(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid):match("Contains a (.*).")], -1)
local nick = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "nick")
local poke = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "description"):match("Contains a (.*).")

if nick == "Uknown" then
doPlayerSay(cid, poke .. ", Lets Surf!", TALKTYPE_SAY)
else
doPlayerSay(cid, nick .. ", Lets Surf!", TALKTYPE_SAY)
end
doChangeSpeed(cid, -(getCreatureSpeed(cid)))
doChangeSpeed(cid, surf[getItemSpecialDescription(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid):match("Contains a (.*).")].speed)
setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
addEvent(setPlayerStorageValue, 100, cid, 63215, 1)
end
if getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 666) == 1 then
if getCreatureLookDir(cid) == 0 then
doSendMagicEffect(fromPosition, 33)
elseif getCreatureLookDir(cid) == 1 then
doSendMagicEffect(fromPosition, 49)
elseif getCreatureLookDir(cid) == 2 then
doSendMagicEffect(fromPosition, 30)
elseif getCreatureLookDir(cid) == 3 then
doSendMagicEffect(fromPosition, 51)
end
end
if getPlayerStorageValue(cid, 17000) >= 1 then
if not isInArray(flie, getTileInfo(fromPosition).itemid) then
return true
end
if getCreatureLookDir(cid) == 0 then
doSendMagicEffect(fromPosition, 33)
elseif getCreatureLookDir(cid) == 1 then
doSendMagicEffect(fromPosition, 49)
elseif getCreatureLookDir(cid) == 2 then
doSendMagicEffect(fromPosition, 30)
elseif getCreatureLookDir(cid) == 3 then
doSendMagicEffect(fromPosition, 51)
end
end
return true
end

function onStepOut(cid, item, position, fromPosition)
if not isInArray({4820, 4821, 4822, 4823, 4824, 4825}, getTileThingByPos(getThingPos(cid)).itemid) then
setPlayerGroupId(cid, 1)
end
return true
end

 


@up

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo