Ir para conteúdo

joaohd

Visconde
  • Total de itens

    361
  • Registro em

  • Última visita

  • Dias Ganhos

    10

Tudo que joaohd postou

  1. joaohd

    [System Vip] + Storage

    Na seção de Actions, Talkactions&Movements você encontra alguns vip's system. flw
  2. joaohd

    Sistema De Fly

    Existem scripts assim na seção de Actions&Talkactions... Vale a pena dar uma conferida. flw
  3. Isso seria em pedidos de websites... Reportado para moverem. flw
  4. Acho difícil... Coloca aqui seu config.lua... de repente eu ache algo parecido. Nunca mexi em 8.0... flw
  5. Veja se tem a opção: newPlayerChooseVoc no config.lua. Caso tenha, mude para "no" flw
  6. joaohd

    [Pedido] Bless

    Tente este: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 buyBlessing(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerBlessing(cid, parameters.blessing) then npcHandler:say("A god has already blessed you with this blessing.", cid) end if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, parameters.blessing) npcHandler:say("You have been blessed by one of the five gods!", cid) else npcHandler:say("You don't have enough money.", cid) end keywordHandler:moveUp(1) return true end local node1 = keywordHandler:addKeyword({'first bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first blessing for 10000 gold coins?'}) node1:addChildKeyword({'yes'}, buyBlessing, {blessing = 1}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node2 = keywordHandler:addKeyword({'second bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the second blessing for 10000 gold coins?'}) node2:addChildKeyword({'yes'}, buyBlessing, {blessing = 2}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node3 = keywordHandler:addKeyword({'third bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the third blessing for 10000 gold coins?'}) node3:addChildKeyword({'yes'}, buyBlessing, {blessing = 3}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node4 = keywordHandler:addKeyword({'fourth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fourth blessing for 10000 gold coins?'}) node4:addChildKeyword({'yes'}, buyBlessing, {blessing = 4}) node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) local node5 = keywordHandler:addKeyword({'fifth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fifth blessing for 10000 gold coins?'}) node5:addChildKeyword({'yes'}, buyBlessing, {blessing = 5}) node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Then not.'}) keywordHandler:addKeyword({'blessing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can provide you with five blessings... the 'first bless', 'second bless', 'third bless', 'fourth bless' and the 'fifth bless', they cost 10000 gold coins each."}) keywordHandler:addKeyword({'blessings'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can provide you with five blessings... the 'first bless', 'second bless', 'third bless', 'fourth bless' and the 'fifth bless', they cost 10000 gold coins each."}) keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can provide you with five blessings... the 'first bless', 'second bless', 'third bless', 'fourth bless' and the 'fifth bless', they cost 10000 gold coins each."}) keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can provide you with five blessings... the 'first bless', 'second bless', 'third bless', 'fourth bless' and the 'fifth bless', they cost 10000 gold coins each."}) npcHandler:addModule(FocusModule:new()) flw
  7. Tente o do WeDo ou o do Diamond flw
  8. joaohd

    Erro No Distro.

    Tem que baixar um outro distro... flw
  9. O distro do WeDo é muito bom... flw
  10. joaohd

    Erro No Distro.

    Bom, o primeiro: [30/08/2010 21:15:09] >> Checking software version... outdated, please consider updating! [30/08/2010 21:15:10] > Current version information - version: 0.3.4, patch: 2, build: 1879, timestamp: 1242396574. [30/08/2010 21:15:10] > Latest version information - version: 0.3.6, patch: 0, build: 3293, timestamp: 1260652199. Isso indica que há uma atualização para seu distro. O erro das vocações deve ser porque você registrou no movements.xml assim: <vocation name="Sorcerer"> Quando o correto (pelo menos algumas versões é: <vocation id="2"> O erro dos "moveable itens" é porque há itens na casa com o id especificado no erro (160)... O erro do spawntime é porque você colocou muitos monstros em um mesmo spawn sem o intervalo mínimo de 1 segundo... E por último: [30/08/2010 21:15:59] [Warning - Houses::loadFromXml] House entry not set for: (158) [30/08/2010 21:15:59] [Warning - Houses::loadFromXml] House entry not set for: (160) [30/08/2010 21:15:59] [Warning - Houses::loadFromXml] House entry not set for: (161) [30/08/2010 21:15:59] [Warning - Houses::loadFromXml] House entry not set for: (162) [30/08/2010 21:15:59] [Warning - Houses::loadFromXml] House entry not set for: (163) [30/08/2010 21:15:59] [Warning - Houses::loadFromXml] House entry not set for: (164) [30/08/2010 21:16:00] [Warning - Houses::loadFromXml] House entry not set for: (165) [30/08/2010 21:16:00] [Warning - Houses::loadFromXml] House entry not set for: (166) [30/08/2010 21:16:00] [Warning - Houses::loadFromXml] House entry not set for: (167) Esse é porque você não especificou no map editor as entradas para essas casas... flw
  11. É problema no distro. Baixe um mais atualizado pois já foi lançado o patch de correção. flw
  12. Edite aqui: eachBlessReduction = 8 flw
  13. Creio que seja impossível. Pelo menos com as ferramentas que contamos hoje não é possível... flw
  14. O problema é no distro. Os distros mais atuais já estão com isso resolvido. Tente baixar outro distro e substituir na pasta do seu OT. flw
  15. joaohd

    [Pedido] Npc

    Erro meu o npc não retirar o item: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 config = { itemid = 3942, reward = {{item = 2160, count = 100}}, -- Pode adicionar mais se quiser. removeItem = "yes", storage = 6598 } if msgcontains(msg:lower(), "ajuda") then if getPlayerStorageValue(cid,config.storage) <= 0 then selfSay("Preciso que voce procure a cup que perdi...foi um presente do meu pai,aceita me {ajudar}?", cid) talk_state = 1 else selfSay("Muito obrigado pela sua ajuda companheiro...", cid) talk_state = 0 end elseif msgcontains(msg:lower(), "sim") and talk_state == 1 then selfSay("obrigado procure ne casas abondonadas e outras contruções do tipo..não sei onde botei.", cid) setPlayerStorageValue(cid, config.storage, 1) talk_state = 0 elseif msgcontains(msg:lower(), "pronto") and getPlayerStorageValue(cid, config.storage) == 1 then selfSay("Você trouxe o cup?", cid) talk_state = 2 elseif msgcontains(msg:lower(), "sim") and talk_state == 2 then if getPlayerItemCount(cid, config.itemid) >= 1 then selfSay("Nossa, muito obrigado... Aqui está sua recompensa.", cid) setPlayerStorageValue(cid, config.storage, 2) for k,v in pairs(config.reward) do doPlayerAddItem(cid, v.item, v.count or 1) end if config.removeItem == "yes" then doPlayerRemoveItem(cid, config.itemid, 1) end talk_state = 0 else selfSay("Que pena, voce ainda não achou...", cid) talk_state = 0 end elseif msg:lower() == "no" and talk_state >= 1 then selfSay("Obrigado mesmo assim...", cid) talk_state = 0 npcHandler:resetNpc() end return true end As falas voce muda aí... flw npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  16. joaohd

    [Pedido] Npc

    Exemplo: local config = { itemid = 3942, -- Item que será removido reward = {{item = 2160, count = 100}, {item = 2173, count = 1}, -- Aqui vai adicionar 100 crystal e 1 aol removeItem = "yes", -- aqui voce deixa "yes" se for remover e "no" para n remover storage = 6598 } flw
  17. joaohd

    [Pedido] Npc

    Tô fora! ashasash Reportado para moverem. flw
  18. joaohd

    [Pedido] Npc

    Esse ae é o arquivo lua do npc. O xml está abaixo: <?xml version="1.0" encoding="UTF-8"?> <npc name="Campones" script="data/npc/scripts/campones.lua" walkinterval="5000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="100" body="100" legs="114" feet="114" addons="2"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|! Estou presisando muito de {ajuda}" /> </parameters> </npc> flw
  19. Tem que usar storages. Exemplo: Para o jogador soltar exevo gran mas vis, terá de soltar antes o utamo vita: Script do utamo vita: ---- Configurações da magia, bla bla bla ---- function onCastSpell(cid, var) doCombat(cid, combat, var) setPlayerStorageValue(cid, 21598, 1) return true end Agora o script do exevo gran mas vis ---- Configurações da magia, bla bla bla ---- function onCastSpell(cid, var) if getPlayerStorageValue(cid, 21598) >= 1 then doCombat(cid, combat, var) setPlayerStorageValue(cid, 21598, 0) else doPlayerSendCancel(cid, "You must first cast the spell called utamo vita.") end return true end Espero que entenda. flw
  20. joaohd

    [Pedido] Npc

    Acho que é isso: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 config = { itemid = 3942, reward = {{item = 2160, count = 100}}, -- Pode adicionar mais se quiser. removeItem = "yes", storage = 6598 } if msgcontains(msg:lower(), "ajuda") then if getPlayerStorageValue(cid,config.storage) <= 0 then selfSay("Preciso que voce procure a cup que perdi...foi um presente do meu pai,aceita me {ajudar}?", cid) talk_state = 1 else selfSay("Muito obrigado pela sua ajuda companheiro...", cid) talk_state = 0 end elseif msgcontains(msg:lower(), "sim") and talk_state == 1 then selfSay("obrigado procure ne casas abondonadas e outras contruções do tipo..não sei onde botei.", cid) setPlayerStorageValue(cid, config.storage, 1) talk_state = 0 elseif msgcontains(msg:lower(), "pronto") and getPlayerStorageValue(cid, config.storage) == 1 then selfSay("Você trouxe o cup?", cid) talk_state = 2 elseif msgcontains(msg:lower(), "sim") and talk_state == 2 then if getPlayerItemCount(cid, config.itemid) >= 1 then selfSay("Nossa, muito obrigado... Aqui está sua recompensa.", cid) setPlayerStorageValue(cid, config.storage, 2) for k,v in pairs(config.reward) do doPlayerAddItem(cid, v.item, v.count or 1) end if config.removeItem == "yes" then doPlayerRemoveItem(cid, config.itemId, 1) end talk_state = 0 else selfSay("Que pena, voce ainda não achou...", cid) talk_state = 0 end elseif msg:lower() == "no" and talk_state >= 1 then selfSay("Obrigado mesmo assim...", cid) talk_state = 0 npcHandler:resetNpc() end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Fiz na biblioteca do curso. Se tiver algo errado, ja ta explicado... flw
  21. joaohd

    Ajude.me

    O problema pode estar no seu actions.xml ou em algum outro script de stairs. flw
  22. Tente: local EMPTY_POTION = 7635 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 130) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end if doCreatureAddHealth(itemEx.uid, (getCreatureMaxHealth(cid)*0.6)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doTransformItem(item.uid, EMPTY_POTION) return TRUE end flw
  23. Use: local conf = { cityId = 1 } function onStepIn(cid, item, pos, frompos) if isPlayer(cid) then doPlayerSetTown(cid, conf.cityId) doPlayerSendTextMessage(cid,25,"Congratulations! You are the newest resident of ".. getTownName(conf.cityId) ..".") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) else doTeleportThing(cid, frompos) end return true end Tag xml: <movevent type="StepIn" uniqueid="20001" event="script" value="city.lua"/> flw
  24. Tente este: local conf = { cityId = 1 } function onStepIn(cid, item, pos, frompos) if isPlayer(cid) then doPlayerSetTown(cid, conf.cityId) doPlayerSendTextMessage(cid,25,"Congratulations! You are the newest resident of ".. getTownName(conf.cityId) ..".") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) else doTeleportThing(cid, frompos) end return true end A tag : <movevent type="StepIn" uniqueid="20001" event="script" value="city.lua"/> Lembre-se de colocar uniqueid 200001 no teleport. flw
  25. Caso sejão as chamadas "enchanted spells", ou seja, com muitas waves, tente adicionar um "return TRUE" antes do último "end" na spell. Exemplo: ... Aqui estão as configurações da spell, área, dano ... function onCastSpell(cid, var) addEvent(doCombat, 1000, combat1, var) addEvent(doCombat, 2000, combat2, var) addEvent(doCombat, 3000, combat3, var) end Ficaria assim: ... Aqui estão as configurações da spell, área, dano ... function onCastSpell(cid, var) addEvent(doCombat, 1000, combat1, var) addEvent(doCombat, 2000, combat2, var) addEvent(doCombat, 3000, combat3, var) return TRUE end flw
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...