Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 03/18/10 em todas áreas

  1. satan666

    [ Resolvido ]Storagevalue

    apocarai: issó não é um error, e sim uma forma dele não responder caso sua storage seja diferente.
    1 ponto
  2. joaohd

    [ Resolvido ]Storagevalue

    @Marcryzius O erro não é somente este. Note que no primeiro status da conversação, ele checa se há storage ou não... Este é o erro maior. @Topic Estou tentando refazer seu npc. Caso consiga, postarei. @Edited Aqui está seu npc: 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 storage = 80150 if msgcontains(msg, 'quest') and getPlayerStorageValue(cid, storage) == -1 then selfSay("Hello, I am a fisherman, now my work is stopped because someone stole my {worms}", cid) talk_state = 1 elseif msgcontains(msg, 'worms') and talk_state == 1 then selfSay("Some days ago I went out to buy a new fishing rod, when I returned someone had taken all my worms, I have no money to buy more worms because I spent all the new rod, you can get some for me?", cid) talk_state = 2 elseif msgcontains(msg, 'yes') and talk_state == 3 then selfSay("Thank you young man, this task should not be difficult for you, I see that you carry weapons and shield, is an adventurer, killing rats is easy for you, I will reward you, I promise. Bring {200 worms} for me", cid) setPlayerStorageValue(cid,storage,1) talk_state = 0 elseif msgcontains(msg,'quest') and getPlayerStorageValue(cid, storage) == 1 then selfSay("Did you bring my worms?", cid) talk_state = 3 elseif msgcontains(msg, 'yes') and talk_state == 3 then if getPlayerItemCount(cid,3976) >= 200 then doPlayerRemoveItem(cid,3976,200) local cclub = doPlayerAddItem(cid,2448,1) doItemSetAttribute(cclub,"name","Studded Club of Sea") doItemSetAttribute(cclub,"attack",10) doItemSetAttribute(cclub,"defense",10) doItemSetAttribute(cclub,"description","A club forged by ancient pirates") doPlayerAddExp(cid,200) selfSay("Thank you young man, now I can go back to my work, take this club that I found on the seabed... {you received 300xp and a Studded club}") setPlayerStorageValue(cid,storage,2) talk_state = 0 else selfSay("You don't have the {worms} yet. come back when you have",cid) talk_state = 0 end elseif msgcontains(msg, 'quest') and getPlayerStorageValue(cid, storage) == 2 then selfSay("Oh, i am thankful, but i have no missions now.", cid) talk_state = 0 elseif msg == "no" and talk_state == 2 or msg == "no" and talk_state == 3 then selfSay("I will find someone who can help me.", cid) talk_state = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Não testei, porém acho que funciona. flw
    1 ponto
  3. spartangui

    [ Resolvido ]sign System

    eu tava procurando um script que faz uma sign simples com o nome do char, level, cidade e talz sabe? alguem pode me ajudar? plz
    -1 pontos
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...