-
Total de itens
831 -
Registro em
-
Última visita
-
Dias Ganhos
69
Tudo que Marshmello postou
-
Fala galera , faz tempo que não venho aqui estou postando pq vi uns frango vendendo o código idêntico ao meu Antes de começar já aviso que e necessário ter opcodes instalados na source do server Vamos la Em Creaturescript crie um arquivo chamado lookhouse.lua e cole isso lá function stringValue(preco) if preco < 100 then return tostring(preco) else return tostring(string.format("%1.01f", value/100)) end return 'none' end function onLook(cid, thing, position, lookDistance) if not isCreature(thing.uid) then local house = getHouseFromPos(position) if house then local str = "Casa: "..getHouseName(house)..".\n" if getHouseOwner(house) ~= 0 then str = str.."Propietário: "..getPlayerNameByGUID( getHouseOwner(house) ).."\nPreço: "..getHousePrice(house).." dólares" else str = str.."Propietário: Não tem\nPreço: "..getHousePrice(house).." dólares" end if thing.itemid == 1252 or thing.itemid == 1249 or thing.itemid == 1251 or thing.itemid == 1254 or thing.itemid == 1250 or thing.itemid == 1212 or thing.itemid == 1214 or thing.itemid == 6891 or thing.itemid == 6893 or thing.itemid == 6900 or thing.itemid == 6902 or thing.itemid == 6892 or thing.itemid == 1213 or thing.itemid == 1219 or thing.itemid == 1220 or thing.itemid == 1222 or thing.itemid == 1221 or thing.itemid == 5515 or thing.itemid == 5516 or thing.itemid == 5517 or thing.itemid == 5518 or thing.itemid == 5119 or thing.itemid == 5120 or thing.itemid == 5128 or thing.itemid == 5129 or thing.itemid == 5098 or thing.itemid == 5100 or thing.itemid == 5107 or thing.itemid == 5109 then if getHouseOwner(house) ~= 0 then doSendPlayerExtendedOpcode(cid, 78, getHouseName(house).."@"..getPlayerNameByGUID( getHouseOwner(house) ).."@"..getHousePrice(house).."@"..getHouseInfo(house).beds/2) else doSendPlayerExtendedOpcode(cid, 78, getHouseName(house).."@Não a Propietário@"..stringValue(getHousePrice(house)).."@"..getHouseInfo(house).beds/2) end end return false end end return true end em login.lua registre o evento registerCreatureEvent(cid, "LookHouse") em creaturescript.xml coloque a tag <event type="look" name="Lookhouse" event="script" value="lookhouse.lua"/> Modules do OTC game_house.rar Não esqueça de registrar o modulo no interface.otmod - game_house E isso bom proveito Créditos a mim por te feito o código e o modulo Como vai ficar
-
manda o script
-
function onStepIn(cid, item, position, fromPosition) local pos = {x = 1037, y = 1034, z = 7} local battlewin = 1 if #getCreatureSummons(cid) >= 1 then return true end addEvent(function() if #getPlayersInArea(battleroyale.area) > 1 then doTeleportThing(cid, pos) local item = doPlayerAddItem(cid, 5805, 1) doItemSetAttribute(item, "description", getCreatureName(cid).." conquistou este trofeu apos vencer uma partida no Battle Royale.") doBroadcastMessage(""..getCreatureName(cid).." Venceu o evento Battle Royale") doPlayerAddItem(cid,12618,1) doPlayerAddItem(cid,2152,30) addTopbattle(cid, battlewin) else doPlaerSendCancel(cid, "Not Win") end end,5*10000) return true end
-
Sim amigo
-
[CREATURESCRIPT] Exp Aura Sytem (OTP Based)
tópico respondeu ao Tony Araujo de Marshmello em CreatureScripts e Movements
Nice de mais meu brow -
pedido scripts TELEPORTE QUE TELEPORTA PLAYER VIP
pergunta respondeu ao guilherme Silva de Marshmello em Scripts
local cidades = { ["NOME DA CIDADE VIP"] = {pos = {x=1054,y=1050,z=7}}, -- POSICAO DA CIDADE VIP ["NOME DA CIDADE VIP"] = {pos = {x=1060,y=903,z=7}}, -- POSICAO DA CIDADE VIP ["NOME DA CIDADE VIP"] = {pos = {x=1204,y=1046,z=7}}, -- POSICAO DA CIDADE VIP ["NOME DA CIDADE VIP"] = {pos = {x=1122,y=1449,z=7}}, -- POSICAO DA CIDADE VIP ["NOME DA CIDADE VIP"] = {pos = {x=862,y=1035,z=6}}, -- POSICAO DA CIDADE VIP ["NOME DA CIDADE VIP"] = {pos = {x=575,y=1143,z=7}}, -- POSICAO DA CIDADE VIP } function onSay(cid, words, param, channel) local teleporta = cidades[param] if(param == "") then doPlayerSendCancel(cid, "digite o nome da cidade.") return true end if (param ~= teleporta ) then doPlayerSendCancel(cid, "Cidade não existente") return true end if(isPlayerPzLocked(cid) == false) and isPremium(cid) == true then doTeleportThing(cid, teleporta.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, 22, "Voce foi teleportado para ".. param ..".") else doPlayerSendCancel(cid, "Voce nao e premium account ou esta em batalha") end return true end -
function SendEffect(cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sem o Efeito de Gemas.") return TRUE end local storages = {77000,77001,77002,77003} local time = os.time() function onLogin(cid) for i = 1, #storages do if getPlayerStorageValue(cid, storage[i]) - time < 1 then return false and SendEffect(cid) end end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sob o Efeito de Gemas.") return true end
-
Tenta ai cara function SendEffect(cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sem o Efeito de Gemas.") return TRUE end local storages = {77000,77001,77002,77003} local time = os.time() function onLogin(cid) for i = 1, #storages do if getPlayerStorageValue(cid, storage[i]) - time < 1 then SendEffect(cid) end end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, "Você está sob o Efeito de Gemas.") return true end
-
Stone evoluir pelo level do pokemon nao pelo level do treinador
pergunta respondeu ao kamus9629 de Marshmello em Scripts
Manda seu level system.lua e evolution.lua -
local pokemon = "Alakazam" -- pokemon que vai precisar function onStepIn(cid, item, position, fromPosition) local slot = getPlayerSlotItem(cid, 8).uid if getItemAttribute(slot, "poke") == pokemon and #getCreatureSummons(cid) > 0 then doPlayerSendTextMessage(cid, 22, "Bem vindo") else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você não tem o pokemon nescessario") end return true end
-
em configuration.lua(lib) procure por youAre
-
Vai abrir normalmente só selecionar a pasta onde está as spr
-
Teste local sto = 44487 function isOnSameFloor(fromPos, toPos) return fromPos.z == toPos.z and true or false end function isEven(arg) return arg % 2 == 0 and true or false end function getMiddlePos(fromPos, toPos) if not isOnSameFloor(fromPos, toPos) then return false end local middle = {x = 0, y = 0, z = 0} middle.x = isEven(fromPos.x + toPos.x) and (fromPos.x + toPos.x)/2 or math.floor((fromPos.x + toPos.x)/2) + 1 middle.y = isEven(fromPos.y + toPos.y) and (fromPos.y + toPos.y)/2 or math.floor((fromPos.y + toPos.y)/2) + 1 middle.z = fromPos.z or toPos.z return middle end function getDistanceRadius(fromPos, toPos) if not isOnSameFloor(fromPos, toPos) then return false end local distance = getDistanceBetween(fromPos, toPos) return isEven(distance) and (distance/2) or math.floor(distance/2) + 1 end function cleareArea1(middlePos, rangex, rangey) local final = {x=1030, y=1085, z=7} -- Posição onde será teleportado quando acabar o tempo for i = -rangex, rangex do for j = -rangey, rangey do pos = {x = middlePos.x + i, y = middlePos.y + j, z = middlePos.z} creature = getTopCreature(pos).uid if isMonster(creature) then doSendMagicEffect(getThingPos(creature), 14) doRemoveCreature(creature) elseif isPlayer(creature) then doSendMagicEffect(getThingPos(creature), 10) doTeleportThing(creature, final) end end end setGlobalStorageValue(sto, -1) return true end local t = { lvl = 150, lvl2 = 201, entrada = { {x = 1067, y = 1067, z = 9}, -- pos players {x = 1067, y = 1068, z = 9}, -- pos players {x = 1067, y = 1069, z = 9}, -- pos players {x = 1067, y = 1070, z = 9}, -- pos players {x = 1067, y = 1071, z = 9}, -- pos players }, saida = { {x = 717, y = 1013, z = 9}, -- pos para onde eles irão {x = 717, y = 1013, z = 9}, -- pos para onde eles irão {x = 717, y = 1013, z = 9}, -- pos para onde eles irão {x = 717, y = 1013, z = 9}, -- pos para onde eles irão {x = 717, y = 1013, z = 9}, -- pos para onde eles irão }, } function onUse(cid, item, fromPosition, itemEx, toPosition) local configure = { fromPos = {x=702, y=988, z=9}, -- posição superior esquerda do mapa, da area em que esta mapeado a area. toPos = {x=811, y=1025, z=9}, -- posição inferior direita do mapa, da area em que esta mapeado a area. } local config = { position = {x=1067, y=1066, z=9}, -- Contagem fromPosition = {x=1022, y=1024, z=9}, toPosition = {x=1139, y=1134, z=9}, id = 1498, time = 1 } local time = 300 local check = {} for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if getPlayerLevel(cid) <= 149 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa estar entre os níveis 150 á 200 para poder entrar.") return true end for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if getPlayerLevel(cid) >= 201 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa estar entre os níveis 150 á 200 para poder entrar.") return true end if getGlobalStorageValue(sto) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde até que a sala seja liberada.") return true end table.insert(check, x) end for i, tid in ipairs(check) do doTeleportThing(tid, t.saida[i], false) doSendMagicEffect(t.saida[i], 10) doTransformItem(item.uid, item.itemid == 1810 and 1810 or 1810) end for i = 1,time do formula = time - 1*i addEvent(doSendAnimatedText, i*1000, config.position, formula, TEXTCOLOR_GREY) end setGlobalStorageValue(sto, 1) local rx = getDistanceRadius(configure.fromPos, configure.toPos) addEvent(cleareArea1, config.time * 1800 * 1000, getMiddlePos(configure.fromPos, configure.toPos), rx, rx) return true end end
-
Nem client otPokemon Mysterious show off
tópico respondeu ao Marshmello de Marshmello em Exposições (Show Off)
nem é a pokeZr foi feita em cima da minha que foi desponibilizada a um tempo atrais -
mano da uma olhada ai , nao sei se vai dar certo.. local config = { playerCount = 2001, -- Global storage for counting the players left/entered in the event zombieCount = 2002, -- Global storage for counting the zombies in the event teleportActionId = 2000, -- Action id of the teleport needed for the movement script teleportPosition = {x = 1143, y = 1054, z = 7, stackpos = 1}, -- Where the teleport will be created teleportToPosition = {x = 1152, y = 1028, z = 7}, -- Where the teleport will take you teleportId = 1387, -- Id of the teleport timeToStartEvent = 2, -- Minutes, after these minutes the teleport will be removed and the event will be declared started timeBetweenSpawns = 5, -- Seconds between each spawn of zombie zombieName = "Zombie", -- Name of the zombie that should be summoned playersNeededToStartEvent = 5, -- Players needed before the zombies can spawn. walls = {x = 1189, y = 1044, z = 7, stackpos = 1}, -- Should be the same as in the creaturescript! -- The zombies will spawn randomly inside this area fromPosition = {x = 1135, y = 1018, z = 7}, {x = 1170, y = 1040, z = 7}, -- top left cornor of the playground toPosition = {x = 1170, y = 1040, z = 7}, {x = 1135, y = 1018, z = 7}, -- bottom right cornor of the playground } function onThink() local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' começará em 2 minutos. O portal será fechado quando o evento começar.", MESSAGE_STATUS_CONSOLE_BLUE) doRemoveItem(getThingFromPos(config.walls).uid, 1) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) print(getGlobalStorageValue(2001)) end function startEvent() local get = getThingfromPos(config.teleportPosition) if get.itemid == config.teleportId then doRemoveItem(get.uid, 1) doCreateItem(9486, 9532, 1, config.walls) end local fromPosition, toPosition = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Boa sorte no evento 'Zumbi' jogadores! O portal foi fechado! E o primeiro zumbi aparecerá em 5 segundos.", MESSAGE_STATUS_CONSOLE_BLUE) doCreateItem(9486, 9532, 1, config.walls) for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do for z = fromPosition.z, toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doBroadcastMessage(getPlayers.uid, "EVENTO ZUMBI MENSAGEM: O primeiro zumbie vai aparecer em " .. config.timeBetweenSpawns .. " segundos. Boa sorte!", MESSAGE_STATUS_CONSOLE_BLUE) end end end end else doBroadcastMessage("EVENTO ZUMBI MENSAGEM: O evento 'Zumbi' não pode ser iniciado pelo pequeno número de jogadores participando. No mínimo " .. config.playersNeededToStartEvent .. " jogadores é necessário!", MESSAGE_STATUS_CONSOLE_BLUE) doCreateItem(9486, 9532, 1, config.walls) for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do for z = fromPosition.z, toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doRemoveCreature(pid) doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), true) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 2 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("EVENTO ZUMBI MENSAGEM: Um novo zumbi apareceu! Agora temos: " .. getGlobalStorageValue(config.zombieCount) .. " zumbis no evento!", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) end end
-
Porta que só atravessa se matar todos os monstros (pokes) dentro da area
tópico respondeu ao Marshmello de Marshmello em Actions e Talkactions
Colocou as posições corretas?, traçou a area corretamente? -
---------Criado por Alisson Linneker--------- ---Base local itemID = 6119 -- O ID do item que quando usado ira dar a quantidade de EXP desejada local exp = 500 -- A quantidade de EXP desejada local mensagem = "Uhul! EXP" -- A mensagem q ira aparecer quando for usado o item ----Estrutura function onUse(cid, item, frompos, item2, topos) playerpos = getPlayerPosition(cid) doPlayerAddExp(cid, exp) doSendMagicEffect(playerpos,30) doCreatureSay(cid, mensagem, 3) doRemoveItem(cid, item.uid, 1) doPlayerSendTextMessage(cid,20, "Você ganhou " ..exp.. " de experiência.") return 1 end --------Criado por Alisson Linneker---------
-
Teste adicionei 2 variaveis no topo do script para que vc mude os ids da outfit (male e female) local roupaFemale = 000 local RoupaMale = 000 local fishing = { ["Magikarp"] = {skill = 1, level = 1}, ["Krabby"] = {skill = 5, level = 5}, ["Horsea"] = {skill = 5, level = 5}, ["Luvdisc"] = {skill = 10, level = 10}, ["Finneon"] = {skill = 10, level = 10}, ["Tympole"] = {skill = 10, level = 10}, ["Tirtouga"] = {skill = 10, level = 10}, ["Ducklett"] = {skill = 10, level = 10}, ["Clamperl"] = {skill = 15, level = 15}, ["Tynamo"] = {skill = 15, level = 15}, ["Spheal"] = {skill = 15, level = 15}, ["Goldeen"] = {skill = 20, level = 20}, ["Marill"] = {skill = 20, level = 20}, ["Remoraid"] = {skill = 20, level = 20}, ["Tentacool"] = {skill = 20, level = 20}, ["Corphish"] = {skill = 20, level = 20}, ["Poliwag"] = {skill = 25, level = 25}, ["Chinchou"] = {skill = 25, level = 25}, ["Basculin"] = {skill = 30, level = 30}, ["Staryu"] = {skill = 30, level = 30}, ["Mantyke"] = {skill = 30, level = 30}, ["Seaking"] = {skill = 30, level = 30}, ["Psyduck"] = {skill = 35, level = 35}, ["Stunfisk"] = {skill = 35, level = 35}, ["Lanturn"] = {skill = 45, level = 45}, ["Lumineon"] = {skill = 45, level = 45}, ["Seadra"] = {skill = 45, level = 45}, ["Poliwhirl"] = {skill = 50, level = 50}, ["Qwilfish"] = {skill = 50, level = 50}, ["Corsola"] = {skill = 50, level = 50}, ["Squirtle"] = {skill = 55, level = 55}, ["Totodile"] = {skill = 55, level = 55}, ["Mudkip"] = {skill = 55, level = 55}, ["Piplup"] = {skill = 55, level = 55}, ["Oshawott"] = {skill = 55, level = 55}, ["Huntail"] = {skill = 60, level = 60}, ["Eelektrik"] = {skill = 60, level = 60}, ["Alomomola"] = {skill = 60, level = 60}, ["Gorebyss"] = {skill = 60, level = 60}, ["Palpitoad"] = {skill = 60, level = 60}, ["Azumarill"] = {skill = 65, level = 65}, ["Octillery"] = {skill = 65, level = 65}, ["Kingler"] = {skill = 65, level = 65}, ["Relicanth"] = {skill = 65, level = 65}, ["Marshtomp"] = {skill = 70, level = 70}, ["Crawdaunt"] = {skill = 70, level = 70}, ["Wartortle"] = {skill = 70, level = 70}, ["Prinplup"] = {skill = 70, level = 70}, ["Dewott"] = {skill = 70, level = 70}, ["Croconaw"] = {skill = 70, level = 70}, ["Feebas"] = {skill = 80, level = 80}, ["Starmie"] = {skill = 85, level = 85}, ["Golduck"] = {skill = 90, level = 90}, ["Vaporeon"] = {skill = 90, level = 90}, ["Kingdra"] = {skill = 100, level = 100}, ["Blastoise"] = {skill = 125, level = 125}, ["Feraligatr"] = {skill = 125, level = 125}, ["Empoleon"] = {skill = 125, level = 125}, ["Swampert"] = {skill = 125, level = 125}, ["Tentacruel"] = {skill = 130, level = 130}, ["Eelektross"] = {skill = 130, level = 130}, ["Gyarados"] = {skill = 130, level = 130}, ["Samurott"] = {skill = 130, level = 130}, ["Wailord"] = {skill = 140, level = 140}, ["Milotic"] = {skill = 150, level = 150}, } local storage = 15458 local bonus = 1 local limite = 150 local function doFish(cid, pos, ppos, chance, interval, number) if not isCreature(cid) then return false end if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end if getPlayerStorageValue(cid, storage) ~= number then return false end doSendMagicEffect(pos, CONST_ME_LOSEENERGY) local peixe = 0 local playerpos = getClosestFreeTile(cid, getThingPos(cid)) local fishes = {} local randomfish = "" if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus) end for a, b in pairs (fishing) do if getPlayerSkillLevel(cid, 6) >= b.skill then table.insert(fishes, a) end end if math.random(1, 100) <= chance then if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus) end randomfish = fishes[math.random(#fishes)] peixe = doSummonCreature(randomfish, playerpos) if not isCreature(peixe) then addEvent(doFish, interval, cid, pos, ppos, chance, interval, number) return true end -- doSetMonsterPassive(peixe) -- doWildAttackPlayer(peixe, cid) doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) doChallengeCreature(getCreatureSummons(cid)[1], peixe) else doSendMagicEffect(getThingPos(cid), 173) doChallengeCreature(cid, peixe) end return true end addEvent(doFish, interval, cid, pos, ppos, chance, interval, number) return true end local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825, 23765, 23766} function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerGroupId(cid) == 11 then return true end local checkPos = toPos checkPos.stackpos = 0 if getTileThingByPos(checkPos).itemid <= 0 then doPlayerSendCancel(cid, '!') return true end if not isInArray(waters, getTileInfo(toPos).itemid) then return true end if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then doPlayerSendCancel(cid, "You can't fish while surfing/flying.") return true end if getCreatureOutfit(cid).lookType == RoupaMale or getCreatureOutfit(cid).lookType == roupaFemale then doPlayerSendCancel(cid, "Você precisa esta usando a outfit de pesca") return true end if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then doPlayerSendCancel(cid, "You can\'t fish while surfing neither flying above water.") return true end if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then doPlayerSendCancel(cid, "You can't fish pokémons if you or your pokémon is in protection zone.") return true end if not tonumber(getPlayerStorageValue(cid, storage)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[fishing.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, storage).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, storage, 1) end setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1) if getPlayerStorageValue(cid, storage) >= 800 then setPlayerStorageValue(cid, storage, 1) end local delay = 3500 - getPlayerSkillLevel(cid, 6) * 25 local chance = 10 + getPlayerSkillLevel(cid, 6) / 2.5 doFish(cid, toPos, getThingPos(cid), chance, delay, getPlayerStorageValue(cid, storage)) return true end
-
Então essa global sorte não está sendo setada corretamente
-
local topquest = 1 function doBrokesCount(cid, str, ball) --alterado v1.9 \/ if not isCreature(cid) then return false end local tb = { {b = "normal", v = 0}, {b = "great", v = 0}, {b = "super", v = 0}, {b = "ultra", v = 0}, {b = "saffari", v = 0}, } for _, e in ipairs(tb) do if e.b == ball then e.v = 1 break end end local string = getPlayerStorageValue(cid, str) local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);" local t2 = "" for n, g, s, u, s2 in string:gmatch(t) do t2 = "normal = "..(n+tb[1].v)..", great = "..(g+tb[2].v)..", super = "..(s+tb[3].v)..", ultra = "..(u+tb[4].v)..", saffari = "..(s2+tb[5].v)..";" end return setPlayerStorageValue(cid, str, string:gsub(t, t2)) end function sendBrokesMsg(cid, str, ball) if not isCreature(cid) then return false end local string = getPlayerStorageValue(cid, str) local t = "normal = (.-), great = (.-), super = (.-), ultra = (.-), saffari = (.-);" local msg = {} table.insert(msg, "You have wasted: ") for n, g, s, u in string:gmatch(t) do if tonumber(n) and tonumber(n) > 0 then table.insert(msg, tostring(n).." Poke ball".. (tonumber(n) > 1 and "s" or "")) end if tonumber(g) and tonumber(g) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(g).." Great ball".. (tonumber(g) > 1 and "s" or "")) end if tonumber(s) and tonumber(s) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s).." Super ball".. (tonumber(s) > 1 and "s" or "")) end if tonumber(u) and tonumber(u) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(u).." Ultra ball".. (tonumber(u) > 1 and "s" or "")) end if tonumber(s2) and tonumber(s2) > 0 then table.insert(msg, (#msg > 1 and ", " or "").. tostring(s2).." Saffari ball".. (tonumber(s2) > 1 and "s" or "")) end end if #msg == 1 then return true end if string.sub(msg[#msg], 1, 1) == "," then msg[#msg] = " and".. string.sub(msg[#msg], 2, #msg[#msg]) end table.insert(msg, " trying to catch it.") sendMsgToPlayer(cid, 27, table.concat(msg)) end --alterado v1.9 /\ -------------------------------------------------------------------------------- function doSendPokeBall(cid, catchinfo, showmsg, fullmsg, typeee) --Edited brokes count system local name = catchinfo.name local pos = catchinfo.topos local topos = {} topos.x = pos.x topos.y = pos.y topos.z = pos.z local newid = catchinfo.newid local catch = catchinfo.catch local fail = catchinfo.fail local rate = catchinfo.rate local basechance = catchinfo.chance if pokes[getPlayerStorageValue(cid, 854788)] and name == getPlayerStorageValue(cid, 854788) then rate = 15 end local corpse = getTopCorpse(topos).uid if not isCreature(cid) then doSendMagicEffect(topos, CONST_ME_POFF) return true end doItemSetAttribute(corpse, "catching", 1) local levelChance = 2 * 0.02 local totalChance = math.ceil(basechance * (1.2 + levelChance)) local thisChance = math.random(0, totalChance) local myChance = math.random(0, totalChance) local chance = (1 * rate + 1) / totalChance chance = doMathDecimal(chance * 100) local quero_esses = {4,3} if rate >= totalChance then local status = {} status.gender = quero_esses[math.random(1, #quero_esses)] status.happy = 160 doRemoveItem(corpse, 1) doSendMagicEffect(topos, catch) addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) return true end if totalChance <= 1 then totalChance = 1 end local myChances = {} local catchChances = {} for cC = 0, totalChance do table.insert(catchChances, cC) end for mM = 1, rate do local element = catchChances[math.random(1, #catchChances)] table.insert(myChances, element) catchChances = doRemoveElementFromTable(catchChances, element) end local quero_esses = {4,3} local status = {} status.gender = quero_esses[math.random(1, #quero_esses)] status.happy = 70 doRemoveItem(corpse, 1) local doCatch = false for check = 1, #myChances do if thisChance == myChances[check] then doCatch = true end end if doCatch then doSendMagicEffect(topos, catch) addEvent(doCapturePokemon, 3000, cid, name, newid, status, typeee) else addEvent(doNotCapturePokemon, 3000, cid, name, typeee) doSendMagicEffect(topos, fail) end end function doCapturePokemon(cid, poke, ballid, status, typeee) if not isCreature(cid) then return true end local list = getCatchList(cid) if not isInArray(list, poke) and not isShinyName(poke) then doPlayerAddSoul(cid, 1) end doAddPokemonInOwnList(cid, poke) doAddPokemonInCatchList(cid, poke) if not tonumber(getPlayerStorageValue(cid, 54843)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, 54843, 1) end if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then setPlayerStorageValue(cid, 54843, 1) else setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1) end local description = "Contains a "..poke.."." local quero_esses = {4,3} if poke == "Porygon" or poke == "Metagross" or poke == "Porygon2" or poke == "Metang" or poke == "Beldum" or poke == "Shiny Metagross" or poke == "Solrock" then gender = 1 else gender = quero_esses[math.random(1, #quero_esses)] end local happy = 250 --alterado v1.9 \/ if getPlayerFreeCap(cid) <= 1 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then item = doCreateItemEx(ballid) else item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, ballid, 1) end doItemSetAttribute(item, "poke", poke) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "exp", 0) doItemSetAttribute(item, "level", 1) doItemSetAttribute(item, "fakedesc", description) doItemSetAttribute(item, "description", description) if poke == "Hitmonchan" or poke == "Shiny Hitmonchan" then doItemSetAttribute(item, "hands", 0) end ----------- task clan --------------------- if pokes[getPlayerStorageValue(cid, 854788)] and poke == getPlayerStorageValue(cid, 854788) then sendMsgToPlayer(cid, 27, "Quest Done!") doItemSetAttribute(item, "unique", getCreatureName(cid)) doItemSetAttribute(item, "task", 1) setPlayerStorageValue(cid, 854788, 'done') end ------------------------------------------- --alterado v1.9 \/ if getPlayerFreeCap(cid) <= 1 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) doPlayerSendTextMessage(cid, 27, "Você capturou um pokémon! ("..poke..")!") doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.") else doPlayerSendTextMessage(cid, 27, "Você capturou um pokémon! ("..poke..")!") end if string.find(tostring(getCreatureName(poke), "Shiny") then doPlayerSendChannelMessage(oid,getCreatureName(cid),"[Catch Channel] O Jogador [".. getCreatureName(cid) .."] Capturou um ["..poke.."]!.", TTALKTYPE_CHANNEL_O, 5) end else doPlayerSendChannelMessage(oid,getCreatureName(cid),"[Catch Channel] O Jogador [".. getCreatureName(cid) .."] Capturou um ["..poke.."]!.", TTALKTYPE_CHANNEL_W, 5) end end local storage = newpokedex[poke].stoCatch sendBrokesMsg(cid, storage, typeee) setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0;") --alterado v1.9 /\ if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) if catchMakesPokemonHappier then setPlayerStorageValue(getCreatureSummons(cid)[1], 1008, getPlayerStorageValue(getCreatureSummons(cid)[1], 1008) + 20) end else doSendMagicEffect(getThingPos(cid), 173) end end function doNotCapturePokemon(cid, poke, typeee) if not isCreature(cid) then return true end if not tonumber(getPlayerStorageValue(cid, 54843)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[csystem.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, 54843).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, 54843, 1) end if not tonumber(getPlayerStorageValue(cid, 54843)) or getPlayerStorageValue(cid, 54843) == -1 then setPlayerStorageValue(cid, 54843, 1) else setPlayerStorageValue(cid, 54843, getPlayerStorageValue(cid, 54843) + 1) end if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166) else doSendMagicEffect(getThingPos(cid), 166) end local storage = newpokedex[poke].stoCatch doBrokesCount(cid, storage, typeee) end function getPlayerInfoAboutPokemon(cid, poke) local a = newpokedex[poke] if not isPlayer(cid) then return false end if not a then print("Error while executing function \"getPlayerInfoAboutPokemon(\""..getCreatureName(cid)..", "..poke..")\", "..poke.." doesn't exist.") return false end local b = getPlayerStorageValue(cid, a.storage) if b == -1 then setPlayerStorageValue(cid, a.storage, poke..":") end local ret = {} if string.find(b, "catch,") then ret.catch = true else ret.catch = false end if string.find(b, "dex,") then ret.dex = true else ret.dex = false end if string.find(b, "use,") then ret.use = true else ret.use = false end return ret end function doAddPokemonInOwnList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).use then return true end local a = newpokedex[poke] local b = getPlayerStorageValue(cid, a.storage) setPlayerStorageValue(cid, a.storage, b.." use,") end function isPokemonInOwnList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).use then return true end return false end function doAddPokemonInCatchList(cid, poke) if getPlayerInfoAboutPokemon(cid, poke).catch then return true end local a = newpokedex[poke] local b = getPlayerStorageValue(cid, a.storage) setPlayerStorageValue(cid, a.storage, b.." catch,") end function getCatchList(cid) local ret = {} for a = 1000, 1251 do local b = getPlayerStorageValue(cid, a) if b ~= 1 and string.find(b, "catch,") then table.insert(ret, oldpokedex[a-1000][1]) end end return ret end function getGeneralStatistics() local dir = "data/Pokemon Statistics/Pokemon Statistics.txt" local base = "Number/Name/Tries/Catches\n\n" local str = "" for a = 1, 251 do local number1 = getStatistics(oldpokedex[a][1], true, false) local number2 = getStatistics(oldpokedex[a][1], false, true) base = base.."["..threeNumbers(a).."] "..oldpokedex[a][1].." "..str..""..number1.." / "..number2.."\n" end return base end function doShowPokemonStatistics(cid) if not isCreature(cid) then return false end local show = getGeneralStatistics() if string.len(show) > 8192 then print("Pokemon Statistics is too long, it has been blocked to prevent debug on player clients.") doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.") return false end doShowTextDialog(cid, math.random(2391, 2394), show) end
-
as menssagem de not_vip estão aparecendo?
-
Testa assim Brow local config = { [90] = {ID, COUNT}, -- [PORCENTAGEM] = {ID DO ITEM, QUANTIDADE} [80] = {ID, COUNT}, [59] = {ID, COUNT}, [50] = {ID, COUNT}, [40] = {ID, COUNT}, [30] = {ID, COUNT}, [20] = {ID, COUNT}, [10] = {ID, COUNT}, [3] = {ID, COUNT}, [1] = {ID, COUNT}, } function onUse(cid) local chance_growing = {} for chance, _ in pairs(config) do table.insert(chance_growing, chance) end table.sort(chance_growing, function(a, b) return a > b end) local chance = 0 for _, v in pairs(chance_growing) do if math.random(100) < v then chance = v break end end local item = config[chance] if item then doPlayerAddItem(cid, item[1], item[2]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Você encontrou ".. item[2] .." ".. item[1] .. ".") doSendMagicEffect(getThingPos(cid), 13) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Não foi dessa vez, tente na próxima ):") end return true end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.