- 0
talkaction Comando Dive (Mergulhar)
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 1 reply
- 2040 views
-
- 0 replies
- 2931 views
-
- 2 replies
- 2550 views
-
- 6 replies
- 2388 views
-
- 0 replies
- 1444 views
-
Question
M i s s 9
Galera, encontrei um dive por talk que está funcionando porém quando eu mergulho o pokemon morre e quando eu volto pra superficie eu não vou direto pro surf
Script que faz o player mergulhar
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid,63215) >=1 then
pos = getCreaturePosition(cid)
if pos.z ~= 7 then return false end
npos = {x=pos.x, y=pos.y, z=pos.z + 1}
local grounds = {104}
if (not isInArray(grounds, getTileThingByPos(npos).itemid)) then
return doPlayerSendCancel(cid, "You cannot dive here.")
end
if doTeleportThing(cid, npos) then
doSendMagicEffect(npos, 14)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1034, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1035, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end
setPlayerStorageValue(cid, 63215, 0)
local item = getPlayerSlotItem(cid, ?
local pokemon = getItemAttribute(item.uid, "poke")
local x = pokes[pokemon]
if getItemAttribute(item.uid, "nick") then
doCreatureSay(cid, "".."Good job "..getItemAttribute(item.uid, "nick").." !", 1)
else
doCreatureSay(cid, "".."Good job "..getItemAttribute(item.uid, "poke").." !", 1)
end
local pk = getCreatureSummons(cid)[1]
doChangeSpeed(pk, getCreatureSpeed(cid))
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, PlayerSpeed)
doTeleportThing(pk, getThingPos(cid), true)
doCreatureSetLookDir(pk, getCreatureLookDir(cid))
adjustStatus(pk, item.uid, true, false, true)
end
else
return doPlayerSendCancel(cid, "You cannot dive here.")
end
return TRUE
end
Script que faze o player emergir
function onSay(cid, words, param, channel)
divepos = getCreaturePosition(cid)
npos2 = getPlayerMasterPos(cid)
poszao = {x=divepos.x, y=divepos.y, z=7}
pos = getCreaturePosition(cid)
local waters = {16357}
local poke = {'phione', 'Poliwag', 'Poliwhirl', 'Seaking', 'Dewgong', 'Blastoise', 'Tentacruel', 'Lapras', 'Gyarados', 'Omastar', 'Kabutops',
'Vaporeon', 'Staryu', 'Starmie', 'Goldeen', 'Seadra', 'Golduck', 'Squirtle', 'Wartortle', 'Tentacool', 'Snorlax', 'Poliwrath', 'Shiny Poliwag',
'Shiny Poliwhirl', 'Shiny Seaking', 'Shiny Dewgong', 'Shiny Blastoise', 'Shiny Tentacruel', 'Shiny Lapras', 'Shiny Gyarados', 'Shiny Omastar',
'Shiny Kabutops', 'Shiny Vaporeon', 'Shiny Staryu', 'Shiny Starmie', 'Shiny Goldeen', 'Shiny Seadra', 'Shiny Golduck', 'Shiny Squirtle',
'Shiny Wartortle', 'Shiny Tentacool', 'Shiny Snorlax', 'Shiny Poliwrath', "Mantine", "Totodile", "Croconow", "Feraligatr", "Marill",
"Azumarill", "Quagsire", "Wooper", "Octillery", "Kingdra"}
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, "You need a pokemon to dive.")
return true
end
if (not isInArray(poke, getPokemonName(getCreatureSummons(cid)[1]))) then
doPlayerSendCancel(cid, "This pokemon cannot dive.")
return true
end
if (not isInArray(waters, getTileThingByPos(poszao).itemid)) then
doPlayerSendCancel(cid, "You cant up here.")
return true
end
if pos.z >= 8 then
if doTeleportThing(cid, poszao) == true then
doSendMagicEffect(poszao, 14)
end
else return print("Erro ao utilizar comando !back")
end
if pos.z <=7 then
doPlayerSendCancel(cid, "Você precisa estar mergulhando para usar este comando.")
return true
end
end
Se alguém puder me ajudar além do REP vai ganhar um Lugarzinho no meu coração haha ❤️
Edited by R e dLink to comment
Share on other sites
0 answers to this question
Recommended Posts