Cara, eu tentei fazer com o type water do pokémon, mas por algum motivo não estava dando, nem me lembro o erro que ocorria.
Então eu fiz desse jeito tosco de array, mas funciona.
Eu fiz para um servidor ai há pouco tempo atrás, espero que funcione para você também.
Se você der TP, a roupa sai e a velocidade volta ao normal.
Os pokémon que estão na tabela não tomam slow da água.
local condition = createConditionObject(CONDITION_DROWN)setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, 0)setConditionParam(condition, CONDITION_PARAM_TICKS, -1)setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000)local pokesWater = {"Squirtle", "Wartortle", "Blastoise", "Staryu", "Starmie", "Phione", "Manaphy", "Magikarp", "Gyarados", "Horsea", "Seadra", "Kingdra", "Tentacool", "Tentacruel","Goldeen", "Seaking", "Horsea", "Dewgong", "Cloyster", "Seel", "Shellder", "Krabby", "Kingler", "Lapras", "Wailord", "Milotic", "Corsola", "Psyduck", "Golduck", "Chinchou", "Lanturn","Poliwag", "Poliwhirl", "Politoed", "Poliwrath", "Slowpoke", "Slowbro", "Shiny Cloyster", "Piplup", "Prinplup", "Empoleon", "Mudkip", "Marshtomp", "Swampert", "Totodile", "Crocodile","Feraligatr", "Shiny Feraligatr", "Shiny Blastoise", "Shiny Empoleon", "Giant Magikarp", "Shiny Giant Magikarp", "Vaporeon", "Shiny Vaporeon", "Omanyte", "Shiny Omanyte", "Omastar","Shiny Omastar", "Kabuto", "Kabutops", "Shiny Kabutops", "Mantine", "Shiny Mantine", "Shiny Politoed", "Shiny Corsola", "Qwilfish", "Shiny Qwilfish", "Shiny Wartortle", "Shiny Squirtle", "Lotad", "Lombre", "Ludicolo", "Crawdaunt", "Marill", "Azumarill", "Wooper", "Quagsire", "Slowking", "Remoraid", "Octillery","Shiny Krabby", "Shiny Kingler", "Shiny Horsea", "Shiny Seadra", "Shiny Kingdra", "Shiny Tentacool", "Shiny Tentacruel", "Shiny Magikarp", "Shiny Gyarados", "Shiny Slowking","Shiny Wailord", "Shiny Milotic", "Shiny Lapras", "Shiny Golduck", "Shiny Psyduck", "Shiny Starmie", "Shiny Lanturn","Mega Blastoise", "Mega Gyarados", "Mega Slowking", "Mega Swampert"}function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) then if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue (cid, 17001) >= 1 then doPlayerSendCancel(cid, "A roupa apropriada para este solo não pode ser equipada enquanto você estiver montado em seu pokémon.") return true end if getPlayerStorageValue (cid, 5700) >= 1 then doPlayerSendCancel (cid, "A roupa apropriada para este solo não pode ser equipada enquanto você estiver montado em sua bike.") return true end local newtype = getPlayerSex(cid) == 0 and 1034 or 1035 doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 1500) doSetCreatureOutfit (cid, {lookType = newtype}, -1) doAddCondition(cid, condition) elseif isInArray (pokesWater, getCreatureName (cid)) then doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, getCreatureSpeed(cid) + 700) endreturn trueendfunction onStepOut(cid, item, position, fromPosition) if isPlayer(cid) then if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue (cid, 17001) >= 1 then return true end if getPlayerStorageValue (cid, 5700) >= 1 then return true end doRemoveCondition(cid, CONDITION_OUTFIT) doRemoveCondition(cid, CONDITION_DROWN) doRegainSpeed (cid) else doRegainSpeed (cid) endreturn trueend
XML:
<movevent type="StepIn" itemid="5405-5450" event="script" value="drown.lua"/><movevent type="StepOut" itemid="5405-5450" event="script" value="drown.lua"/>