• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Pokemon Surf System v1.0

Zysen

=)
Joined
Sep 18, 2010
Messages
2,270
Reaction score
170
Location
Bosnia & Herzegovina
Hello.I release PSS v1.0 [Pokemon Surf System].


actions/scripts

surf.lua

Lua:
local pokes = {
    ["Poliwag"] = {lookType=278, speed = 400},
    ["Tentacruel"] = {lookType=185, speed = 400},
    ["Blastoise"] = {lookType=184, speed = 400},
    ["Dewgong"] = {lookType=183, speed = 400},
    ["Kabutops"] = {lookType=189, speed = 400},
    ["Omastar"] = {lookType=188, speed = 400},
    ["Gyarados"] = {lookType=187, speed = 400},
    ["Poliwrath"] = {lookType=190, speed = 400},
    ["Shiny Gyarados"] = {lookType=529, speed = 410},
    ["Shiny Seadra"] = {lookType=522, speed = 400},
    ["Shiny Tentacruel"] = {lookType=522, speed = 400},
    ["Squirtle"] = {lookType=273, speed = 400},
    ["Shiny Blastoise"] = {lookType=523, speed = 400},
    ["Wartotle"] = {lookType=275, speed = 400},
    ['Tentacool'] = {lookType=274, speed = 400},
    ['Staryu'] = {lookType=266, speed = 400},
    ['Starmie'] = {lookType=267, speed = 400},
    ['Golduck'] = {lookType=271, speed = 400},
    ['Poliwhirl'] = {lookType=137, speed = 400},
    ['Tentacool'] = {lookType=277, speed = 400},
    ['Goldeen'] = {lookType=268, speed = 400},
    ['Seaking'] = {lookType=269, speed = 400},
    ['Seadra'] = {lookType=270, speed = 400},
    ['Snorlax'] = {lookType=300, speed = 400},
    ['Vaporeon'] = {lookType=191, speed = 400}
}
 
local configs = {
    [4647] = {x = -2, y = 0}, 
    [4645] = {x = 2, y = 0}, 
    [4646] = {x = 0, y = 2}, 
    [4644] = {x = 0, y = -2}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
    local playerpos = getCreaturePosition(cid)
 
    if #getCreatureSummons(cid) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
        return doPlayerSendCancel(cid, "You need a pokemon to surf.")
    end
 
    local l = false
    for i,x in pairs(pokes) do
        if getPlayerStorageValue(cid, 63215) <= 0 and i:lower() == getCreatureName(getCreatureSummons(cid)[1]):lower() then
            l = true
        end
    end
 
    if not l and getPlayerStorageValue(cid, 63215) <= 0 then
        return doPlayerSendCancel(cid, "This pokemon can't surf.")
    end
 
    if getPlayerStorageValue(cid, 63215) <= 0 then
        doTeleportThing(cid, {x=playerpos.x+configs[itemEx.itemid].x, y=playerpos.y+configs[itemEx.itemid].y, z=playerpos.z})
        setPlayerStorageValue(cid, 63215, 1)
        doSetCreatureOutfit(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])], -1)
        doCreatureSay(cid, "Let's surf, "..getCreatureName(getCreatureSummons(cid)[1]), 1)
        setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
        setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
        doChangeSpeed(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])].speed)
        doRemoveCreature(getCreatureSummons(cid)[1])
    else
        doTeleportThing(cid, {x=playerpos.x-configs[itemEx.itemid].x, y=playerpos.y-configs[itemEx.itemid].y, z=playerpos.z})
        setPlayerStorageValue(cid, 63215, 0)
        doRemoveCondition(cid, CONDITION_OUTFIT)
        local item = getPokeOutLive(cid)[1]
        doCreatureSay(cid, "Im tired of surf, " .. getItemAttribute(item, "poke"):match("This is (.-)'s pokeball."), 1)
        local pk = doSummonCreature(getItemAttribute(item, "poke"):match("This is (.-)'s pokeball."), getThingPosition(cid))
        doConvinceCreature(cid, pk)
        registerCreatureEvent(pk, "DiePoke")
        registerCreatureEvent(cid, "PlayerPokeDeath")
        registerCreatureEvent(cid, "LogoutPoke")
        setCreatureMaxHealth(pk, getPlayerStorageValue(cid, 61209))
        doCreatureAddHealth(pk, getPlayerStorageValue(cid, 61209))
        doCreatureAddHealth(pk, getPlayerStorageValue(cid, 61210)-getPlayerStorageValue(cid, 61209))
        doChangeSpeed(cid, getCreatureBaseSpeed(cid)-getCreatureSpeed(cid))
    end
    return true
end

Change the looktypes if you don't got these looktype numbers.


actions.xml

XML:
<action itemid="4647;4645;4646;4644" event="script" value="surf.lua"/>


Regards,
Zysen
 
Last edited:
Lua:
local pokes = {
    ["Poliwag"] = {lookType=278, speed = 400},
    ["Tentacruel"] = {lookType=185, speed = 400},
    ["Blastoise"] = {lookType=184, speed = 400},
    ["Dewgong"] = {lookType=183, speed = 400},
    ["Kabutops"] = {lookType=189, speed = 400},
    ["Omastar"] = {lookType=188, speed = 400},
    ["Gyarados"] = {lookType=187, speed = 400},
    ["Poliwrath"] = {lookType=190, speed = 400},
    ["Shiny Gyarados"] = {lookType=529, speed = 410},
    ["Shiny Seadra"] = {lookType=522, speed = 400},
    ["Shiny Tentacruel"] = {lookType=522, speed = 400},
    ["Squirtle"] = {lookType=273, speed = 400},
    ["Shiny Blastoise"] = {lookType=523, speed = 400},
    ["Wartotle"] = {lookType=275, speed = 400},
    ['Tentacool'] = {lookType=274, speed = 400},
    ['Staryu'] = {lookType=266, speed = 400},
    ['Starmie'] = {lookType=267, speed = 400},
    ['Golduck'] = {lookType=271, speed = 400},
    ['Poliwhirl'] = {lookType=137, speed = 400},
    ['Tentacool'] = {lookType=277, speed = 400},
    ['Goldeen'] = {lookType=268, speed = 400},
    ['Seaking'] = {lookType=269, speed = 400},
    ['Seadra'] = {lookType=270, speed = 400},
    ['Snorlax'] = {lookType=300, speed = 400},
    ['Vaporeon'] = {lookType=191, speed = 400}
}

local configs = {
    [4647] = {x = -2, y = 0}, 
    [4645] = {x = 2, y = 0}, 
    [4646] = {x = 0, y = 2}, 
    [4644] = {x = 0, y = -2}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)

    local playerpos = getCreaturePosition(cid)

    if #getCreatureSummons(cid) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then
        return doPlayerSendCancel(cid, "You need a pokemon to surf.")
    end
     
    local l = false
    for i,x in pairs(pokes) do
        if getPlayerStorageValue(cid, 63215) <= 0 and i:lower() == getCreatureName(getCreatureSummons(cid)[1]):lower() then
            l = true
        end
    end
     
    if not l and getPlayerStorageValue(cid, 63215) <= 0 then
        return doPlayerSendCancel(cid, "This pokemon can't surf.")
    end
     
    if getPlayerStorageValue(cid, 63215) <= 0 then
        doTeleportThing(cid, {x=playerpos.x+configs[itemEx.itemid].x, y=playerpos.y+configs[itemEx.itemid].y, z=playerpos.z})
        setPlayerStorageValue(cid, 63215, 1)
        doSetCreatureOutfit(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])], -1)
        doCreatureSay(cid, "Let's surf, "..getCreatureName(getCreatureSummons(cid)[1]), 1)
        setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
        setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
        doChangeSpeed(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])].speed)
        doRemoveCreature(getCreatureSummons(cid)[1])
    else
        doTeleportThing(cid, {x=playerpos.x-configs[itemEx.itemid].x, y=playerpos.y-configs[itemEx.itemid].y, z=playerpos.z})
        setPlayerStorageValue(cid, 63215, 0)
        doRemoveCondition(cid, CONDITION_OUTFIT)
        local item = getPokeOutLive(cid)[1]
        doCreatureSay(cid, "Im tired of surf, " .. getItemAttribute(item, "poke"):match("This is (.-)'s pokeball."), 1)
        local pk = doSummonCreature(getItemAttribute(item, "poke"):match("This is (.-)'s pokeball."), getThingPosition(cid))
        doConvinceCreature(cid, pk)
        registerCreatureEvent(pk, "DiePoke")
        registerCreatureEvent(cid, "PlayerPokeDeath")
        registerCreatureEvent(cid, "LogoutPoke")
        setCreatureMaxHealth(pk, getPlayerStorageValue(cid, 61209))
        doCreatureAddHealth(pk, getPlayerStorageValue(cid, 61209))
        doCreatureAddHealth(pk, getPlayerStorageValue(cid, 61210)-getPlayerStorageValue(cid, 61209))
        doChangeSpeed(cid, getCreatureBaseSpeed(cid)-getCreatureSpeed(cid))
    end
    return true
end

Tabbed and "fixed" somewhere.

Not bad script and maybe useful for some copies of poke ots.
But I think there is missing GetPokeOutLive(cid) function.
 
lol i have all the pokemon scripts, i can relase them if somebody want that!
 
Isnt this from the Pokemon Project from Xtibia? Because i searched there and they released there some Pokemon Scripts like this one...
 
Where are the credits? this script was MatheusMkalo he did, and this function, getPokesOut ~ ~, is in Lib he spent with the script, has script fly, ride and even the surf, put the credits guy!

~~ Sorry My Bad English!
 
Back
Top