Ir para conteúdo

Featured Replies

Postado

galera queria um script que te desse um tipo task ex : matar 10 charizard e 10 blastoise, mas que fosse numa alavanca e quando player puxasse ela fosse teleportado para um lugar, e nesse lugar nascesse os 20 monstro da task, logo apos ele ganharia 1 storage.

 

olha aqui tenho 1 script do npc de task se ajudar

Spoiler

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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
 
local task = {
["Junior"] = {{"Abra", 20}, {"Kadabra", 20}, {"Alakazam", 25}, {"Hypno", 20}},
}
       
        if msgcontains(msg, 'task') or msgcontains(msg, 'Task') then
           if isMyTaskComplete(cid, getNpcCid()) then
              selfSay("Wow you have already complete my task! Ok then, take your reward!", cid)
              doPlayerAddExperience(cid, 800000)  --premio   --Quase 2 leveis no nivel 101
              doPlayerAddItem(cid, 2160, 10)
              local sto = getMyTaskSto(cid, getNpcCid())
              setPlayerStorageValue(cid, sto, -1)
              setPlayerStorageValue(cid, 181611, 1) --storage da outfit
              talkState[talkUser] = 0
              return true
           else
              selfSay("Then, is a simple task, i want to you kill {20 Abras, 20 Kadabras, 20 Hypnos and 25 Alakazams}, you accept the task?", cid)
              talkState[talkUser] = 2  
           end   
        elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 2 then
           if getMyTaskSto(cid, getNpcCid()) ~= -1 then
              selfSay("You are already doing my task! go end it!", cid)
              talkState[talkUser] = 0
              return true
           end
           local sto = getFreeTaskStorage(cid)
           if sto == -1 then 
              selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
              talkState[talkUser] = 0
              return true
           end
                  
           selfSay("OK then... Go kill your targets!", cid)
           setStorageArray(cid, sto, task)
           talkState[talkUser] = 0
           return true
        end

return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())       

 

e aqui tenho 1 script de sumonar monstro

Spoiler

function onUse(cid, item, fromPosition, itemEx, toPosition) --parte configurável-- local posmonster = {x= posx, y = posy, z= posz} --posição que monstro nascerá local monster = "Demon" --Nome do monstro que será spawnado local stor = 18992 local msg1 = "Voce Precisa ser premium para puxar esta alavanca" --fim parte configurável, sem conhecimentos básicos não edite.-- if isPremium(cid) == true if (getPlayerStorageValue(cid, stor) == 0) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 1) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 1) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 2) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 2) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 3) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 3) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 4) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 4) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 5) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 5) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 6) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 6) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 7) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 7) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 8) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 8) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 9) doPlayerRemovePremiumDays(cid, 1) elseif (getPlayerStorageValue(cid, stor) == 9) then doCreateMonster(monster, posmonster) setPlayerStorageValue(cid, stor, 0) doPlayerRemovePremiumDays(cid, 1) end else doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, msg1) end return true end

 

preciso muito desse script, ajudando dou rep   obgd galera

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo