Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- :::::::::::::::::::::::::::::::::::::
- ::: Script feita por Marshmello :::
- ::: Não remova os creditos Plase :::
- :::::::::::::::::::::::::::::::::::::
- ]]
- local keywordHandler = KeywordHandler:new()
- local npcHandler = NpcHandler:new(keywordHandler)
- NpcSystem.parseParameters(npcHandler)
- local talkState = {}
- function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
- function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
- function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
- function onThink() npcHandler:onThink() end
- spawnPlayr = {
- playerS1 = {x = 1079, y = 198, z = 8}, --Lugar onde o player1 vai spawn
- playerS2 = {x = 1057, y = 198, z = 8}, --Lugar onde o player2 vai spawn
- playerS3 = {x = 1057, y = 218, z = 8}, --Lugar onde o player2 vai spawn
- playerS4 = {x = 1079, y = 218, z = 8},--Lugar onde o player3 vai spawn
- }
- global = {
- playerS1 = 14721,
- playerS2 = 14722,
- playerS3 = 14723,
- playerS4 = 14722,
- }
- globalName = {
- playerS1 = 14731,
- playerS2 = 14732,
- playerS3 = 14733,
- playerS4 = 14732,
- }
- local function puxarPlayers()
- puxar1 = getCreatureByName(getGlobalStorageValue(globalName.playerS1))
- puxar2 = getCreatureByName(getGlobalStorageValue(globalName.playerS2))
- puxar3 = getCreatureByName(getGlobalStorageValue(globalName.playerS3))
- puxar4 = getCreatureByName(getGlobalStorageValue(globalName.playerS4))
- doTeleportThing(puxar1, spawnPlayr.playerS1)
- doTeleportThing(puxar2, spawnPlayr.playerS2)
- doTeleportThing(puxar3, spawnPlayr.playerS3)
- doTeleportThing(puxar4, spawnPlayr.playerS4)
- Bombermon.resetPlayerConfigs(puxar1)
- Bombermon.resetPlayerConfigs(puxar2)
- Bombermon.resetPlayerConfigs(puxar3)
- Bombermon.resetPlayerConfigs(puxar4)
- Bombermon.resetArea()
- setGlobalStorageValue(global.playerS1, -1)
- setGlobalStorageValue(global.playerS2, -1)
- setGlobalStorageValue(global.playerS3, -1)
- setGlobalStorageValue(global.playerS4, -1)
- setPlayerStorageValue(puxar1, 14731,-1)
- setPlayerStorageValue(puxar2, 14731,-1)
- setPlayerStorageValue(puxar3, 14731,-1)
- setPlayerStorageValue(puxar4, 14731,-1)
- setPlayerStorageValue(puxar1, 77947, 1)
- setPlayerStorageValue(puxar2, 77947, 1)
- setPlayerStorageValue(puxar3, 77947, 1)
- setPlayerStorageValue(puxar4, 77947, 1)
- doPlayerSendTextMessage(puxar1, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
- doPlayerSendTextMessage(puxar2, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
- doPlayerSendTextMessage(puxar3, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
- doPlayerSendTextMessage(puxar4, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
- end
- function creatureSayCallback(cid, type, msg)
- if(not npcHandler:isFocused(cid)) then
- return false
- end
- if msgcontains(msg, 'sim') then
- local areaBomb = {fromx = 1057, fromy = 198, fromz = 8, tox = 1079, toy = 218, toz = 8}
- local storage = 72821168
- -- if getPlayerStorageValue(cid, storage) == 0 then
- -- selfSay('Você precisa está logado no new client para jogar o bombermon', cid)
- -- sendDialogNpc(cid, getNpcCid(),'Você precisa está logado no new client para jogar o bombermon')
- -- return true
- -- end
- if #getPlayersInArea(areaBomb) > 0 then
- selfSay('Você precisa esperar acabar uma rodada para entrar no bombermon', cid)
- sendDialogNpc(cid, getNpcCid(),'Você precisa esperar acabar uma rodada para entrar no bombermon')
- return true
- end
- if getPlayerStorageValue(cid,14731 ) > 0 then
- selfSay('Você já está na fila, por favor aguarde', cid)
- sendDialogNpc(cid, getNpcCid(),'Você já está na fila, por favor aguarde', cid)
- return true
- end
- if getGlobalStorageValue(global.playerS1) == -1 and getGlobalStorageValue(global.playerS2) == -1 getGlobalStorageValue(global.player3) == -1 and getGlobalStorageValue(global.player4) == -1 then
- selfSay('Você entrou na fila de espera, Aguarde os outros jogadores para iniciar', cid)
- sendDialogNpc(cid, getNpcCid(),'Você entrou na fila de espera, Aguarde os outros jogadores para iniciar')
- setGlobalStorageValue(globalName.playerS1, getPlayerName(cid))
- setGlobalStorageValue(global.playerS1, 1)
- setPlayerStorageValue(cid, 14731,1)
- elseif getGlobalStorageValue(global.playerS1) == 1 and getGlobalStorageValue(global.playerS2) == -1 getGlobalStorageValue(global.player3) == -1 and getGlobalStorageValue(global.player4) == -1 then
- selfSay('Você entrou na fila de espera, Aguarde os outros jogadores para iniciar', cid)
- sendDialogNpc(cid, getNpcCid(),'Você entrou na fila de espera, Aguarde os outros jogadores para iniciar')
- setGlobalStorageValue(globalName.playerS2, getPlayerName(cid))
- setGlobalStorageValue(global.playerS2, 1)
- setPlayerStorageValue(cid, 14731,1)
- elseif getGlobalStorageValue(global.playerS1) == 1 and getGlobalStorageValue(global.playerS2) == 1 and getGlobalStorageValue(global.player3) == -1 and getGlobalStorageValue(global.player4) == -1 then
- selfSay('Você entrou na fila de espera, Aguarde os outros jogadores para iniciar', cid)
- sendDialogNpc(cid, getNpcCid(),'Você entrou na fila de espera, Aguarde os outros jogadores para iniciar')
- setGlobalStorageValue(globalName.playerS3, getPlayerName(cid))
- setGlobalStorageValue(global.playerS3, 1)
- setPlayerStorageValue(cid, 14731,1)
- elseif getGlobalStorageValue(global.playerS1) == 1 and getGlobalStorageValue(global.playerS2) == 1 and getGlobalStorageValue(global.player3) == 1 and getGlobalStorageValue(global.player4) == -1 then
- selfSay('Pronto Você entrou na fila, o game irar começar em 5 segundos', cid)
- sendDialogNpc(cid, getNpcCid(),'Pronto Você entrou na fila, o game irar começar em 5 segundos')
- setGlobalStorageValue(globalName.playerS4, getPlayerName(cid))
- setGlobalStorageValue(global.playerS4, 1)
- setPlayerStorageValue(cid, 14731,1)
- addEvent(function()
- puxarPlayers()
- end, 5*1000)
- end
- end
- return true
- end
- npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
- npcHandler:addModule(FocusModule:new())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement