Postado Junho 9, 2012 13 anos GALERA COMO NO NOME DO POST JA DIZ GOSTARIA DE ATRIBUIR A FUNÇÃO DE VOAR E DE SURFAR NO SERVER APENAS PARA PLAYERS QUE FOREM PREMIUM <center><a href="http://otservlist.org/ots/1378930"><img src="http://otservlist.org/html/signatures/1378930_1.png" alt="" style="border: 0px"></a></center>
Postado Junho 9, 2012 13 anos SYSTEM DE FLY Data/Movements Fly.lua local del = {'460', '1022', '1023', '1024'} function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) position.stackpos = 0 if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV if getPlayerStorageValue(cid, 17000) <= 0 then doTeleportThing(cid, fromPosition, false) doRemoveItem(getTileThingByPos(position).uid, 1) doPlayerSendCancel(cid, "You can't fly.") return true end doAreaCombatHealth(cid, FLYSYSTEMDAMAGE, getThingPos(cid), splash, 0, 0, 255) local pos = getThingPos(cid) if pos.z == 7 then return true end pos.z = pos.z + 1 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, 3) or hasProperty(tile.uid, 7) or tile.itemid == 919 then doTransformItem(item.uid, 11677) end end end return true end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV local effect = 2 if toPosition.z == fromPosition.z and getCreatureOutfit(cid).lookType ~= 316 and getCreatureOutfit(cid).lookType ~= 648 then doSendMagicEffect(fromPosition, effect) end local oldtpos = fromPosition oldtpos.stackpos = STACKPOS_GROUND if getTileThingByPos(oldtpos).itemid >= 1 then doRemoveItem(getTileThingByPos(oldtpos).uid, 1) end return true end Flydown.lua local lower = {'460', '11675', '11676'} local houses = {'919', '1015', '1590', '1591', '1592', '1593', '1582', '1584', '1586', '1588', '5248', '5189'} function onSay(cid, words, param) if param ~= "" then return false end if getPlayerStorageValue(cid, 17000) <= 0 then return true end if getThingPos(cid).z == 7 then doPlayerSendCancel(cid, "You can\'t go lower!") return true end if getTileInfo(getThingPos(cid)).itemid == 11677 then doPlayerSendCancel(cid, "Sorry, it's not possible to go lower.") return true end if not isInArray(lower, getTileInfo(getThingPos(cid)).itemid) and getTileInfo(getThingPos(cid)).itemid >= 2 then doPlayerSendCancel(cid, "You can\'t go lower.") return true end local pos = getThingPos(cid) pos.z = pos.z+1 pos.stackpos = 0 if getTileThingByPos(pos).itemid >= 1 then if getTilePzInfo(pos) == true then doPlayerSendCancel(cid, "You can\'t go down here.") return true end if not canWalkOnPos(pos, true, true, false, false, true) then doPlayerSendCancel(cid, "You can't go down here.") return true end doTeleportThing(cid, pos) if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) end else doCombatAreaHealth(cid, 0, pos, 0, 0, 0, CONST_ME_NONE) doCreateItem(11675, 1, pos) doTeleportThing(cid, pos) if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) end return true end return true end Flyup.lua function onSay(cid, words, param) if param ~= "" then return false end if getPlayerStorageValue(cid, 17000) <= 0 then return true end if getThingPos(cid).z == 0 then doPlayerSendCancel(cid, "You can\'t go higher!") return true end local pos = getThingPos(cid) pos.z = pos.z-1 pos.stackpos = 0 if getTileThingByPos(pos).itemid >= 1 or getTileItemById(getThingPos(cid), 1386).itemid >= 1 then doPlayerSendCancel(cid, "You can\'t fly through constructions.") return true end doCombatAreaHealth(cid, 0, pos, 0, 0, 0, CONST_ME_NONE) doCreateItem(11676, 1, pos) doTeleportThing(cid, pos) if getCreatureOutfit(cid).lookType == 667 or getCreatureOutfit(cid).lookType == 999 then markPosEff(cid, getThingPos(cid)) end return true end Movements.lua <movevent type="StepIn" itemid="460;11675-11677" event="script" value="fly.lua"/> <movevent type="StepOut" itemid="460;11675-11677" event="script" value="fly.lua"/> Se precisar do storage : 17000 SYSTEM DE SURF Data/movements surf.lua 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} local poke = {'Shiny Poliwag', 'Poliwag', 'Shiny Poliwhirl', 'Poliwhirl', 'Shiny Seaking', 'Seaking', 'Shiny Dewgong', 'Dewgong', 'Shiny Blastoise', 'Blastoise', 'Shiny Tentacruel', 'Tentacruel', 'Shiny Lapras', 'Lapras', 'Shiny Gyarados', 'Gyarados', 'Shiny Omastar', 'Omastar', 'Shiny Kabutops', 'Kabutops', 'Shiny Vaporeon', 'Vaporeon', 'Shiny Staryu', 'Staryu', 'Shiny Starmie', 'Starmie', 'Shiny Goldeen', 'Goldeen', 'Shiny Seadra', 'Seadra', 'Shiny Golduck', 'Golduck', 'Shiny Squirtle', 'Squirtle', 'Shiny Wartortle', 'Wartortle', 'Shiny Tentacool', 'Tentacool', 'Shiny Snorlax', 'Snorlax', 'Shiny Poliwrath', 'Poliwrath', 'Mantine', 'Totodile', 'Croconow', 'Feraligatr', 'Marill', 'Azumarill', 'Quagsire', 'Wooper', 'Octillery', 'Kingdra'} local flie = {'4820', '4821', '4822', '4823', '4824', '4825'} local surf = { ["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}, ----------------Shiny---------------------- ["Shiny Poliwag"] = {lookType=1010, speed = 352}, ["Shiny Poliwhirl"] = {lookType=1011, speed = 528}, ["Shiny Seaking"] = {lookType=1027, speed = 572}, ["Shiny Dewgong"] = {lookType=1015, speed = 770}, ["Shiny Blastoise"] = {lookType=658, speed = 935}, ["Shiny Tentacruel"] = {lookType=1014, speed = 825}, ["Shiny Lapras"] = {lookType=1031, speed = 1056}, ["Shiny Gyarados"] = {lookType=1030, speed = 1155}, ["Shiny Omastar"] = {lookType=1033, speed = 748}, ["Shiny Kabutops"] = {lookType=1034, speed = 924}, ["Shiny Poliwrath"] = {lookType=1012, speed = 748}, ["Shiny Vaporeon"] = {lookType=1032, speed = 880}, ["Shiny Staryu"] = {lookType=1028, speed = 423.5}, ["Shiny Starmie"] = {lookType=1029, speed = 753.5}, ["Shiny Goldeen"] = {lookType=1026, speed = 390.5}, ["Shiny Seadra"] = {lookType=1025, speed = 720.5}, ["Shiny Golduck"] = {lookType=1009, speed = 836}, ["Shiny Squirtle"] = {lookType=1000, speed = 401.5}, ["Shiny Wartortle"] = {lookType=1001, speed = 665.5}, ["Shiny Tentacool"] = {lookType=1013, speed = 374}, ["Shiny Snorlax"] = {lookType=1035, speed = 550}, ----------------Johto---------------------- ["Mantine"] = {lookType=636, speed = 820}, ["Totodile"] = {lookType=637, speed = 360}, ["Croconow"] = {lookType=638, speed = 590}, ["Feraligatr"] = {lookType=645, speed = 900}, ["Marill"] = {lookType=639, speed = 340}, ["Azumarill"] = {lookType=642, speed = 680}, ["Quagsire"] = {lookType=643, speed = 740}, ["Kingdra"] = {lookType=644, speed = 1020}, ["Octillery"] = {lookType=641, speed = 600}, ["Wooper"] = {lookType=640, speed = 315}, } local premium = false function onStepIn(cid, item, position, fromPosition) 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, "Only premium members are allowed to surf.") 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, "You need a pokemon to surf.") doTeleportThing(cid, fromPosition, false) return true end if (not isInArray(poke, getPokemonName(getCreatureSummons(cid)[1]))) then doPlayerSendCancel(cid, "This pokemon cannot surf.") doTeleportThing(cid, fromPosition, false) return true end if getPlayerStorageValue(cid, 5700) == 1 then doPlayerSendCancel(cid, "You can't do that while is mount in a bike!") doTeleportThing(cid, fromPosition, false) return true end doSetCreatureOutfit(cid, {lookType = surf[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 onStepOut(cid, item, position, fromPosition) if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end local checkpos = fromPosition checkpos.stackpos = 0 if isInArray(waters, getTileInfo(checkpos).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)) if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then doChangeSpeed(cid, 140*getPlayerGroupId(cid)) else doChangeSpeed(cid, PlayerSpeed) end doTeleportThing(pk, fromPosition, false) doTeleportThing(pk, getThingPos(cid), true) doCreatureSetLookDir(pk, getCreatureLookDir(cid)) adjustStatus(pk, item.uid, true, false, true) end return true end surfcancel.lua function onStepIn(cid, item, position, fromPosition) if getPlayerStorageValue(cid, 17000) >= 1 then return true end if getPlayerStorageValue(cid, 63215) >= 1 then doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 63215, 0) local item = getPlayerSlotItem(cid, 8) local pokemon = getItemAttribute(item.uid, "poke") local x = pokes[pokemon] if getItemAttribute(item.uid, "nick") then doCreatureSay(cid, getItemAttribute(item.uid, "nick")..", Im tired of surfing!", 1) else doCreatureSay(cid, getItemAttribute(item.uid, "poke")..", Im tired of surfing!", 1) end doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] doChangeSpeed(pk, getCreatureSpeed(cid)) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, PlayerSpeed) doTeleportThing(pk, fromPosition, false) doTeleportThing(pk, getThingPos(cid), true) doCreatureSetLookDir(pk, getCreatureLookDir(cid)) adjustStatus(pk, item.uid, true, false, true) return true end end surfe.lua function onStepOut(cid, item, position, fromPosition) return true end Movements.lua <movevent type="StepIn" itemid="4820-4825;11756" event="script" value="surf.lua"/> <movevent type="StepOut" itemid="4820-4825;11756" event="script" value="surf.lua"/> <!-- <movevent type="StepIn" itemid="4632-4663;6627-6694" event="script" value="surfcancel.lua"/> --> Se precisar do storage:63215 Se o mundo é mesmo parecido com o que vejo, Prefiro acreditar no mundo do meu jeito. ( - Renato Russo)
Postado Junho 9, 2012 13 anos Autor É POR ORDER ESSE? <center><a href="http://otservlist.org/ots/1378930"><img src="http://otservlist.org/html/signatures/1378930_1.png" alt="" style="border: 0px"></a></center>
Postado Junho 9, 2012 13 anos Sim senhor. Se o mundo é mesmo parecido com o que vejo, Prefiro acreditar no mundo do meu jeito. ( - Renato Russo)
Postado Junho 9, 2012 13 anos Autor no caso 17000 seria a storage da premium? onde localiza ela? <center><a href="http://otservlist.org/ots/1378930"><img src="http://otservlist.org/html/signatures/1378930_1.png" alt="" style="border: 0px"></a></center>
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.