M i s s 9 Postado Março 28, 2020 Share Postado Março 28, 2020 Alguém sabe me dizer onde pode ser alterado para o player não passar de um Level minimo? Exemplo se um player morre e cai do nivel 8 para o 7 ele não perde mais XP ao chergar no nivel 7 Link para o comentário Compartilhar em outros sites More sharing options...
1 Ayron5 40 Postado Março 30, 2020 Share Postado Março 30, 2020 2 horas atrás, R e d disse: Uso a base do Pkmn Ilusion Amigo baixei a base e testei aqui, foi um errinho q passou despercebido hjdfhsjfhsj Spoiler local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) function remover(cid) doRemoveCreature(cid) end doCreatureSetDropLoot(cid, false) if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Staff")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end if #getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 and not (((string.find(tostring(getCreatureName(cid)),"ADM"))) or ((string.find(tostring(getCreatureName(cid)),"Manager")))) then doPlayerPopupFYI(cid, "Proibido logar mais que um char por conta.") addEvent(remover, 500, cid) return true end ---------- XP ------------ if getPlayerLevel(cid) <= 7 then -- edite ao seu gosto ^^ doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) -- vai perder 0 de xp end if getPlayerLevel(cid) >= 8 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 65) -- vai perder 65% edite como quiser end if getPlayerLevel(cid) >= 101 then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end -------------------------- registerCreatureEvent(cid, "LookVoc") local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end sendMsgToPlayer(cid, 20, "Bem-Vindo ao Pokemon Platinum!!") -- alterado msg quando o player entrar ao jogo doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") registerCreatureEvent(cid, "Arise") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages)) then if s == 3 then setPlayerStorageValue(cid, storages, 1) elseif s == 4 then setPlayerStorageValue(cid, storages, -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages, 1) else setPlayerStorageValue(cid, storages, -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if getPlayerStorageValue(cid, 8445610) >= 1 then local pos = getCreaturePosition(cid) local quant = getPlayerStorageValue(cid, 8445610) if quant <= 24 then quantia = quant*10 end if quant >= 25 then quantia = quant*12 end local bp = doPlayerAddItem(cid, 3940, 1, false) if bp then doSetItemText(doPlayerAddItem(cid, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkmn Platinum.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e recebeu ".. quantia .." ".. getItemNameById(2159) .."s!") doSendMagicEffect(pos, 506) setPlayerStorageValue(cid, 8445610, 0) return true end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e nao tem espaco para receber os ".. getItemNameById(2159) .."\nLibere espaco na sua bag e relogue.") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end local bonusvip = getConfigValue("BonusXpVip") if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!\nBonus de ".. bonusvip .."% de XP por ser VIP.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Torne-se VIP e ganhe ".. bonusvip .."% a mais de XP, e outros benefícios!\nhttp://pkmlerme.wixsite.com/pkmlerme") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end if temRopa(cid, "Halloween") <= 0 then darRopa(cid, "Halloween") doPlayerSendTextMessage(cid, 23, "Você recebeu a outfit Halloween!!") end return true end Link para o comentário Compartilhar em outros sites More sharing options...
0 Ayron5 40 Postado Março 28, 2020 Share Postado Março 28, 2020 (editado) 4 horas atrás, R e d disse: Alguém sabe me dizer onde pode ser alterado para o player não passar de um Level minimo? Exemplo se um player morre e cai do nivel 8 para o 7 ele não perde mais XP ao chergar no nivel 7 Você usa stages ou a xp do config.lua? Editado Março 28, 2020 por Ayron5 Link para o comentário Compartilhar em outros sites More sharing options...
0 M i s s 9 Postado Março 28, 2020 Autor Share Postado Março 28, 2020 4 horas atrás, Ayron5 disse: Você usa stages ou a xp do config.lua? Olha, sou meio leigo mas creio que o Xp do config Link para o comentário Compartilhar em outros sites More sharing options...
0 Ayron5 40 Postado Março 28, 2020 Share Postado Março 28, 2020 (editado) 3 horas atrás, R e d disse: Olha, sou meio leigo mas creio que o Xp do config posta aí teu login.lua do creaturescripts. Editado Março 29, 2020 por Ayron5 Link para o comentário Compartilhar em outros sites More sharing options...
0 M i s s 9 Postado Março 29, 2020 Autor Share Postado Março 29, 2020 13 horas atrás, Ayron5 disse: posta aí teu login.lua do creaturescripts. Spoiler local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) function remover(cid) doRemoveCreature(cid) end doCreatureSetDropLoot(cid, false) if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Staff")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end if #getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 and not (((string.find(tostring(getCreatureName(cid)),"ADM"))) or ((string.find(tostring(getCreatureName(cid)),"Manager")))) then doPlayerPopupFYI(cid, "Proibido logar mais que um char por conta.") addEvent(remover, 500, cid) return true end if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 10 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) else doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end registerCreatureEvent(cid, "LookVoc") local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end sendMsgToPlayer(cid, 20, "Bem-Vindo ao Pokemon Platinum!!") -- alterado msg quando o player entrar ao jogo doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") registerCreatureEvent(cid, "Arise") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages)) then if s == 3 then setPlayerStorageValue(cid, storages, 1) elseif s == 4 then setPlayerStorageValue(cid, storages, -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages, 1) else setPlayerStorageValue(cid, storages, -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if getPlayerStorageValue(cid, 8445610) >= 1 then local pos = getCreaturePosition(cid) local quant = getPlayerStorageValue(cid, 8445610) if quant <= 24 then quantia = quant*10 end if quant >= 25 then quantia = quant*12 end local bp = doPlayerAddItem(cid, 3940, 1, false) if bp then doSetItemText(doPlayerAddItem(cid, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkmn Platinum.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e recebeu ".. quantia .." ".. getItemNameById(2159) .."s!") doSendMagicEffect(pos, 506) setPlayerStorageValue(cid, 8445610, 0) return true end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e nao tem espaco para receber os ".. getItemNameById(2159) .."\nLibere espaco na sua bag e relogue.") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end local bonusvip = getConfigValue("BonusXpVip") if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!\nBonus de ".. bonusvip .."% de XP por ser VIP.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Torne-se VIP e ganhe ".. bonusvip .."% a mais de XP, e outros benefícios!\nhttp://pkmlerme.wixsite.com/pkmlerme") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end if temRopa(cid, "Halloween") <= 0 then darRopa(cid, "Halloween") doPlayerSendTextMessage(cid, 23, "Você recebeu a outfit Halloween!!") end return true end Link para o comentário Compartilhar em outros sites More sharing options...
0 Ayron5 40 Postado Março 29, 2020 Share Postado Março 29, 2020 1 hora atrás, R e d disse: Ocultar conteúdo local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) function remover(cid) doRemoveCreature(cid) end doCreatureSetDropLoot(cid, false) if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Staff")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end if #getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 and not (((string.find(tostring(getCreatureName(cid)),"ADM"))) or ((string.find(tostring(getCreatureName(cid)),"Manager")))) then doPlayerPopupFYI(cid, "Proibido logar mais que um char por conta.") addEvent(remover, 500, cid) return true end if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 10 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) else doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end registerCreatureEvent(cid, "LookVoc") local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end sendMsgToPlayer(cid, 20, "Bem-Vindo ao Pokemon Platinum!!") -- alterado msg quando o player entrar ao jogo doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") registerCreatureEvent(cid, "Arise") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages)) then if s == 3 then setPlayerStorageValue(cid, storages, 1) elseif s == 4 then setPlayerStorageValue(cid, storages, -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages, 1) else setPlayerStorageValue(cid, storages, -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if getPlayerStorageValue(cid, 8445610) >= 1 then local pos = getCreaturePosition(cid) local quant = getPlayerStorageValue(cid, 8445610) if quant <= 24 then quantia = quant*10 end if quant >= 25 then quantia = quant*12 end local bp = doPlayerAddItem(cid, 3940, 1, false) if bp then doSetItemText(doPlayerAddItem(cid, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkmn Platinum.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e recebeu ".. quantia .." ".. getItemNameById(2159) .."s!") doSendMagicEffect(pos, 506) setPlayerStorageValue(cid, 8445610, 0) return true end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e nao tem espaco para receber os ".. getItemNameById(2159) .."\nLibere espaco na sua bag e relogue.") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end local bonusvip = getConfigValue("BonusXpVip") if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!\nBonus de ".. bonusvip .."% de XP por ser VIP.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Torne-se VIP e ganhe ".. bonusvip .."% a mais de XP, e outros benefícios!\nhttp://pkmlerme.wixsite.com/pkmlerme") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end if temRopa(cid, "Halloween") <= 0 then darRopa(cid, "Halloween") doPlayerSendTextMessage(cid, 23, "Você recebeu a outfit Halloween!!") end return true end Testa aí Spoiler local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) function remover(cid) doRemoveCreature(cid) end doCreatureSetDropLoot(cid, false) if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Staff")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end if #getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 and not (((string.find(tostring(getCreatureName(cid)),"ADM"))) or ((string.find(tostring(getCreatureName(cid)),"Manager")))) then doPlayerPopupFYI(cid, "Proibido logar mais que um char por conta.") addEvent(remover, 500, cid) return true end ---------- XP ------------ if getPlayerLevel(cid) <= 7 then -- edite ao seu gosto ^^ doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) -- vai perder 0 de xp end if getPlayerLevel(cid) >= 8 and getPlayerLevel(cid) <= 100 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 65) -- vai perder 65% edite como quiser else doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) -- não mexer end -------------------------- registerCreatureEvent(cid, "LookVoc") local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end sendMsgToPlayer(cid, 20, "Bem-Vindo ao Pokemon Platinum!!") -- alterado msg quando o player entrar ao jogo doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") registerCreatureEvent(cid, "Arise") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages)) then if s == 3 then setPlayerStorageValue(cid, storages, 1) elseif s == 4 then setPlayerStorageValue(cid, storages, -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages, 1) else setPlayerStorageValue(cid, storages, -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if getPlayerStorageValue(cid, 8445610) >= 1 then local pos = getCreaturePosition(cid) local quant = getPlayerStorageValue(cid, 8445610) if quant <= 24 then quantia = quant*10 end if quant >= 25 then quantia = quant*12 end local bp = doPlayerAddItem(cid, 3940, 1, false) if bp then doSetItemText(doPlayerAddItem(cid, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkmn Platinum.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e recebeu ".. quantia .." ".. getItemNameById(2159) .."s!") doSendMagicEffect(pos, 506) setPlayerStorageValue(cid, 8445610, 0) return true end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e nao tem espaco para receber os ".. getItemNameById(2159) .."\nLibere espaco na sua bag e relogue.") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end local bonusvip = getConfigValue("BonusXpVip") if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!\nBonus de ".. bonusvip .."% de XP por ser VIP.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Torne-se VIP e ganhe ".. bonusvip .."% a mais de XP, e outros benefícios!\nhttp://pkmlerme.wixsite.com/pkmlerme") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end if temRopa(cid, "Halloween") <= 0 then darRopa(cid, "Halloween") doPlayerSendTextMessage(cid, 23, "Você recebeu a outfit Halloween!!") end return true end Link para o comentário Compartilhar em outros sites More sharing options...
0 M i s s 9 Postado Março 29, 2020 Autor Share Postado Março 29, 2020 5 horas atrás, Ayron5 disse: Testa aí Mostrar conteúdo oculto local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) function remover(cid) doRemoveCreature(cid) end doCreatureSetDropLoot(cid, false) if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Staff")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end if #getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 and not (((string.find(tostring(getCreatureName(cid)),"ADM"))) or ((string.find(tostring(getCreatureName(cid)),"Manager")))) then doPlayerPopupFYI(cid, "Proibido logar mais que um char por conta.") addEvent(remover, 500, cid) return true end ---------- XP ------------ if getPlayerLevel(cid) <= 7 then -- edite ao seu gosto ^^ doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) -- vai perder 0 de xp end if getPlayerLevel(cid) >= 8 and getPlayerLevel(cid) <= 100 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 65) -- vai perder 65% edite como quiser else doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) -- não mexer end -------------------------- registerCreatureEvent(cid, "LookVoc") local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end sendMsgToPlayer(cid, 20, "Bem-Vindo ao Pokemon Platinum!!") -- alterado msg quando o player entrar ao jogo doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") registerCreatureEvent(cid, "Arise") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages)) then if s == 3 then setPlayerStorageValue(cid, storages, 1) elseif s == 4 then setPlayerStorageValue(cid, storages, -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages, 1) else setPlayerStorageValue(cid, storages, -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if getPlayerStorageValue(cid, 8445610) >= 1 then local pos = getCreaturePosition(cid) local quant = getPlayerStorageValue(cid, 8445610) if quant <= 24 then quantia = quant*10 end if quant >= 25 then quantia = quant*12 end local bp = doPlayerAddItem(cid, 3940, 1, false) if bp then doSetItemText(doPlayerAddItem(cid, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkmn Platinum.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e recebeu ".. quantia .." ".. getItemNameById(2159) .."s!") doSendMagicEffect(pos, 506) setPlayerStorageValue(cid, 8445610, 0) return true end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e nao tem espaco para receber os ".. getItemNameById(2159) .."\nLibere espaco na sua bag e relogue.") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end local bonusvip = getConfigValue("BonusXpVip") if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!\nBonus de ".. bonusvip .."% de XP por ser VIP.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Torne-se VIP e ganhe ".. bonusvip .."% a mais de XP, e outros benefícios!\nhttp://pkmlerme.wixsite.com/pkmlerme") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end if temRopa(cid, "Halloween") <= 0 then darRopa(cid, "Halloween") doPlayerSendTextMessage(cid, 23, "Você recebeu a outfit Halloween!!") end return true end Testei, o personagem morre e perde level, não apareceu nenhum erro na distro. Link para o comentário Compartilhar em outros sites More sharing options...
0 Ayron5 40 Postado Março 29, 2020 Share Postado Março 29, 2020 (editado) 24 minutos atrás, R e d disse: Testei, o personagem morre e perde level, não apareceu nenhum erro na distro. ele tá perdendo xp no nível 7? estranho pq testei aqui .-. cria um personagem novo, pega level 9 com ele e vai morrendo pr vc ver. Tá usando qual base? Editado Março 29, 2020 por Ayron5 Link para o comentário Compartilhar em outros sites More sharing options...
0 M i s s 9 Postado Março 29, 2020 Autor Share Postado Março 29, 2020 Uso a base do Pkmn Ilusion Link para o comentário Compartilhar em outros sites More sharing options...
0 M i s s 9 Postado Abril 11, 2020 Autor Share Postado Abril 11, 2020 Em 29/03/2020 em 22:07, Ayron5 disse: Amigo baixei a base e testei aqui, foi um errinho q passou despercebido hjdfhsjfhsj Ocultar conteúdo local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) function remover(cid) doRemoveCreature(cid) end doCreatureSetDropLoot(cid, false) if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Staff")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end if #getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 and not (((string.find(tostring(getCreatureName(cid)),"ADM"))) or ((string.find(tostring(getCreatureName(cid)),"Manager")))) then doPlayerPopupFYI(cid, "Proibido logar mais que um char por conta.") addEvent(remover, 500, cid) return true end ---------- XP ------------ if getPlayerLevel(cid) <= 7 then -- edite ao seu gosto ^^ doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) -- vai perder 0 de xp end if getPlayerLevel(cid) >= 8 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 65) -- vai perder 65% edite como quiser end if getPlayerLevel(cid) >= 101 then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end -------------------------- registerCreatureEvent(cid, "LookVoc") local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end sendMsgToPlayer(cid, 20, "Bem-Vindo ao Pokemon Platinum!!") -- alterado msg quando o player entrar ao jogo doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") registerCreatureEvent(cid, "Arise") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages)) then if s == 3 then setPlayerStorageValue(cid, storages, 1) elseif s == 4 then setPlayerStorageValue(cid, storages, -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages, 1) else setPlayerStorageValue(cid, storages, -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if getPlayerStorageValue(cid, 8445610) >= 1 then local pos = getCreaturePosition(cid) local quant = getPlayerStorageValue(cid, 8445610) if quant <= 24 then quantia = quant*10 end if quant >= 25 then quantia = quant*12 end local bp = doPlayerAddItem(cid, 3940, 1, false) if bp then doSetItemText(doPlayerAddItem(cid, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkmn Platinum.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e recebeu ".. quantia .." ".. getItemNameById(2159) .."s!") doSendMagicEffect(pos, 506) setPlayerStorageValue(cid, 8445610, 0) return true end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce donatou e nao tem espaco para receber os ".. getItemNameById(2159) .."\nLibere espaco na sua bag e relogue.") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end local bonusvip = getConfigValue("BonusXpVip") if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!\nBonus de ".. bonusvip .."% de XP por ser VIP.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Torne-se VIP e ganhe ".. bonusvip .."% a mais de XP, e outros benefícios!\nhttp://pkmlerme.wixsite.com/pkmlerme") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end if temRopa(cid, "Halloween") <= 0 then darRopa(cid, "Halloween") doPlayerSendTextMessage(cid, 23, "Você recebeu a outfit Halloween!!") end return true end Oi desculpa a demora eu tive um problema com o PC, nessa linha eu tenho que editar algo? if getPlayerLevel(cid) >= 101 then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end Link para o comentário Compartilhar em outros sites More sharing options...
0 Ayron5 40 Postado Abril 11, 2020 Share Postado Abril 11, 2020 5 minutos atrás, R e d disse: Oi desculpa a demora eu tive um problema com o PC, nessa linha eu tenho que editar algo? if getPlayerLevel(cid) >= 101 then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end Pode remover ela. Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
M i s s 9
Alguém sabe me dizer onde pode ser alterado para o player não passar de um Level minimo?
Exemplo se um player morre e cai do nivel 8 para o 7 ele não perde mais XP ao chergar no nivel 7
Link para o comentário
Compartilhar em outros sites
11 respostass a esta questão
Posts Recomendados