Ir para conteúdo

Lucaswc15

Cavaleiro
  • Total de itens

    190
  • Registro em

  • Última visita

Tudo que Lucaswc15 postou

  1. Testa ae -- Lottery System local config = { lottery_hour = "5 Hours", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2160}, -- ID dos Itens Sorteados na Loteria crystal_counts = 5, -- Usado somente se a rewards_id for crystal coin (ID: 2160). website = "no" -- Only if you have php scripts and table `lottery` in your database! dias = {"Sunday", "Saturday"} } function onThink(interval, lastExecution) if(getWorldCreatures(0) == 0)then if isInArray(quedia.dias, os.date("%A")) then return true end return true end local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end local winner = list[math.random(1, #list)] local random_item = config.rewards_id[math.random(1, #config.rewards_id)] if(random_item == 2160) then doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .. " " .. getItemNameById(random_item) .. "s! Congratulations! (Proxima Loteria em " .. config.lottery_hour .. ")") else doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. getItemNameById(random_item) .. "! Congratulations! (Proxima Loteria em " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then db.query("INSERT INTO `lottery` (`name`, `item`) VALUES ('".. getCreatureName(winner) .."', '".. getItemNameById(random_item) .."');") end return true end
  2. Lucaswc15

    Npc De Addon

    Ola galera, preciso de ajuda nesse script aqui, eu precisava que o npc quando fosse dar o addon, desse o addon 1 do hunter male e o 2 do hunter female com 1 item só, e nao dar o addon 1 do male e 1 do female como de costume. Aqui vai: 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 npcHandler:setMessage(MESSAGE_GREET, "Ola |PLAYERNAME|. Com uma sniper gloves lhe fa\ço o {addon} 1 do hunter male e o addon 2 do hunter female.") function playerBuyAddonNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.confirm ~= true) and (parameters.decline ~= true) then if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == true) then npcHandler:say('Desculpe, mas este addon e apenas para jogadores premium!', cid) npcHandler:resetNpc() return true end if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then npcHandler:say('Voce ja tem esse addon!', cid) npcHandler:resetNpc() return true end local itemsTable = parameters.items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable[i] items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1]) if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (parameters.cost > 0) and table.maxn(parameters.items) then text = items_list .. ' and ' .. parameters.cost .. ' gp' elseif (parameters.cost > 0) then text = parameters.cost .. ' gp' elseif table.maxn(parameters.items) then text = items_list end npcHandler:say('Voc\ê trouxe a sniper gloves?', cid) return true elseif (parameters.confirm == true) then local addonNode = node:getParent() local addoninfo = addonNode:getParameters() local items_number = 0 if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] if (getPlayerItemCount(cid,item[1]) >= item[2]) then items_number = items_number + 1 end end end if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then doPlayerRemoveMoney(cid, addoninfo.cost) if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] doPlayerRemoveItem(cid,item[1],item[2]) end end doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon) doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon) setPlayerStorageValue(cid,addoninfo.storageID,1) npcHandler:say('Ficou lindo em voce!', cid) else npcHandler:say('Voc\ê n\ão tem o item!', cid) end npcHandler:resetNpc() return true elseif (parameters.decline == true) then npcHandler:say('Se nao lhe agrada, va embora!', cid) npcHandler:resetNpc() return true end return false end local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true}) local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true}) local outfit_node = keywordHandler:addKeyword({'addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10040}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new())
  3. FriikoPall vai em data/npcs/ crie um arquivo.xml e dentro escreva <?xml version="1.0" encoding="UTF-8"?> <npc name="NOME DO NPC" script="msg.lua" walkinterval="6000" speed="100" floorchange="0"> <health now="100" max="100"/> <look type="130" head="57" body="107" legs="114" feet="0" addons="2"/> </npc> Agora va em data/npc/scripts/ crie um arquivo chamado msg.lua e escreva dentro o que o SmartBox disse Créditos ao SmartBox.
  4. Com o primeiro addon e com a big feather continua o mesmo bug, o segundo addon funcionou, obs: só esse, e ja estava funcionando antes. @EDIT Ae, os addons consegui resolver sozinho, só falta a big feathers, alguem me ajuda? @EDIT AE CONSEGUI RESOLVER SOZINHO ALGUEM PODE FECHAR O TOPICO?
  5. Ae nbb147, voce leu a mensagem que te mandei? Aqui vai o script, testa ae, aqui funcionou.
  6. Tenta agora
  7. Nao deu certo Deu error na linha 7 "eof" eu arrumei, troquei pra Mas mesmo assim continua o mesmo bug do meu topico
  8. Se quiser mudar o tempo ali onde tem 2*1000, é 2 segundos.
  9. Ae galera estou com um erro nesse scripts, quando eu falo "chicken feathers" "yes" ou quando eu falo yes depois dos addons tambem da o mesmo error Da esse erro no executor. data/npc/script/citizenaddons.lu:8 in function data/npc/script/citizenaddons.lu:8> data/npc/script/citizenaddons.lu:21 in function callback data/npc/script/citizenaddons.lu:390 function on creaturesay Aqui vai o script: 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 talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'chicken feather')) then selfSay('Voc\ê me trouxe 100 chickens feathers?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerItemCount(cid,5890) >= 100 then if(doPlayerRemoveItem(cid, 5890,100) == true) then selfSay('Obrigado! Tome aqui sua big feather.', cid) setPlayerStorageValue(cid, 2366,1) talkState[talkUser] = 0 end else selfSay('Voc\ê n\ão tem 100 chickens feathers.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) npcHandler:setMessage(MESSAGE_GREET, "Ola |PLAYERNAME|. Esta aqui pela {big} {feather}, ou pelos {addons}?") function playerBuyAddonNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.confirm ~= true) and (parameters.decline ~= true) then if(getPlayerPremiumDays(cid) == 0) and (parameters.premium == true) then npcHandler:say('Desculpe, mas este addon e apenas para jogadores premium!', cid) npcHandler:resetNpc() return true end if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then npcHandler:say('Voce ja tem esse addon!', cid) npcHandler:resetNpc() return true end local itemsTable = parameters.items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable[i] items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1]) if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (parameters.cost > 0) and table.maxn(parameters.items) then text = items_list .. ' and ' .. parameters.cost .. ' gp' elseif (parameters.cost > 0) then text = parameters.cost .. ' gp' elseif table.maxn(parameters.items) then text = items_list end npcHandler:say('Trouxe os itens para este addon?', cid) return true elseif (parameters.confirm == true) then local addonNode = node:getParent() local addoninfo = addonNode:getParameters() local items_number = 0 if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] if (getPlayerItemCount(cid,item[1]) >= item[2]) then items_number = items_number + 1 end end end if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then doPlayerRemoveMoney(cid, addoninfo.cost) if table.maxn(addoninfo.items) > 0 then for i = 1, table.maxn(addoninfo.items) do local item = addoninfo.items[i] doPlayerRemoveItem(cid,item[1],item[2]) end end doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon) doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon) setPlayerStorageValue(cid,addoninfo.storageID,1) npcHandler:say('Ficou lindo em voce!', cid) else npcHandler:say('O que disse? Nao ouvi!!', cid) end npcHandler:resetNpc() return true elseif (parameters.decline == true) then npcHandler:say('Se nao lhe agrada, va embora!', cid) npcHandler:resetNpc() return true end return false end local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true}) local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true}) local outfit_node = keywordHandler:addKeyword({'primeiro'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5878,50},{5902,20}}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10038}) local outfit_node = keywordHandler:addKeyword({'segundo'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{2366,1}}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10039}) outfit_node:addChildKeywordNode(yesNode) outfit_node:addChildKeywordNode(noNode) keywordHandler:addKeyword({'big feather'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Me traga 100 {chicken} {feathers} que lhe dou 1 big feather.'}) keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Para o {primeiro} citizen addon voc\ê precisa de 50 minotaur leathers e 20 honey combs. Para o {segundo} citizen addon voc\ê precisa de uma big feather.'}) npcHandler:addModule(FocusModule:new())
  10. Lucaswc15

    Dota Event

    vai em creaturescripts/dota/gv3 e posta aqui.
  11. Lucaswc15

    Alavanca

    Mas o pedido foi outro. Duvida Sanada.
  12. Adicionou no movements.xml?
  13. Tipo nem um pokemon consegue atacar ele? ou só os das summons dos outros?
  14. Lucaswc15

    Magia Condicional

    Deu certo o de qual?
  15. Lucaswc15

    Desert Quest

    Amanha te do rep hj esgotou.
  16. Lucaswc15

    Desert Quest

    nao consigo ver o spoiler. Nao abre.
  17. Lucaswc15

    Desert Quest

    Ae galera, preciso que esse script teleport players com promotion tb, ou seja, em vez de voc 4, ser colocado voc 4 ou 8... e assim nas outras. function onUse(cid, item, frompos, item2, topos) --by GOD Rodrigo-- end1pos = {x=103, y=399, z=8, stackpos=255} end2pos = {x=104, y=399, z=8, stackpos=255} end3pos = {x=103, y=400, z=8, stackpos=255} end4pos = {x=104, y=400, z=8, stackpos=255} ppl1pos = {x=191, y=411, z=10, stackpos=253} ppl2pos = {x=195, y=415, z=10, stackpos=253} ppl3pos = {x=199, y=411, z=10, stackpos=253} ppl4pos = {x=195, y=410, z=10, stackpos=253} ppl1 = getThingfromPos(ppl1pos) ppl2 = getThingfromPos(ppl2pos) ppl3 = getThingfromPos(ppl3pos) ppl4 = getThingfromPos(ppl4pos) item1pos = {x=190, y=411, z=10, stackpos=255} --apple item2pos = {x=195, y=416, z=10, stackpos=255} --crossbow item3pos = {x=200, y=411, z=10, stackpos=255} --book item4pos = {x=195, y=409, z=10, stackpos=255} --sword- item1 = getThingfromPos(item1pos) item2 = getThingfromPos(item2pos) item3 = getThingfromPos(item3pos) item4 = getThingfromPos(item4pos) if item.uid == 4535 and item.itemid == 1945 and item1.itemid == 2674 and item2.itemid == 2455 and item3.itemid == 2175 and item4.itemid == 2376 and ppl1.itemid > 0 and ppl2.itemid > 0 and ppl3.itemid > 0 and ppl4.itemid > 0 and getPlayerVocation(ppl1.uid) == 2 and getPlayerVocation(ppl1.uid) == 6 and getPlayerVocation(ppl2.uid) == 3 and getPlayerVocation(ppl2.uid) == 7 and getPlayerVocation(ppl3.uid) == 1 and getPlayerVocation(ppl3.uid) == 5 and getPlayerVocation(ppl4.uid) == 4 and getPlayerVocation(ppl4.uid) == 8 then doRemoveItem(item1.uid,1) doSendMagicEffect(item1pos,13) doRemoveItem(item2.uid,1) doSendMagicEffect(item2pos,13) doRemoveItem(item3.uid,1) doSendMagicEffect(item3pos,13) doRemoveItem(item4.uid,1) doSendMagicEffect(item4pos,13) doTeleportThing(ppl1.uid,end1pos) doSendMagicEffect(ppl1pos,10) doSendMagicEffect(end1pos,10) doTeleportThing(ppl2.uid,end2pos) doSendMagicEffect(ppl2pos,10) doSendMagicEffect(end2pos,10) doTeleportThing(ppl3.uid,end3pos) doSendMagicEffect(ppl3pos,10) doSendMagicEffect(end3pos,10) doTeleportThing(ppl4.uid,end4pos) doSendMagicEffect(ppl4pos,10) doSendMagicEffect(end4pos,10) doTransformItem(item.uid,item.itemid+1) elseif item.uid == 4535 and item.itemid == 1946 then doTransformItem(item.uid,item.itemid-1) else return 0 end return 1 end
  18. Certinho jhon, vlw.
  19. Lucaswc15

    Bless

    Vai na config.lua e procura por essa tag blessingReductionBase = Mude para: blessingReductionBase = 70 Se der certo avisa.
  20. Ae galerinha preciso desse script de alavanca. Script: Todos os players que estiverem em uma certa área, para ser mais especifico, Xinicial =1532 , Yinicia= 992; Xfinal =1541 , Yfinal = 1001, fossem teleportados, e se estiver um player em cima de outro, tambem seja teleportado. Obs: Z=11. Serem teleportados para a position x= 0, y= 0, z=0. Script é tipo da wrath of the emperor mission 11, no começo. Se não conseguirem, entao pode ser um script que teleporte varios players, mesmo estando um em cima do outro, pode ser 1 position só.
  21. Lucaswc15

    Magia Condicional

    Interessante esse script vou testar aqui. @ Edit nao funcionou, entao resolvi fazer o script local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_LIGHT) setConditionParam(condition, CONDITION_PARAM_LIGHT_LEVEL, 8) setConditionParam(condition, CONDITION_PARAM_LIGHT_COLOR, 215) setConditionParam(condition, CONDITION_PARAM_TICKS, (11 * 60 + 35) * 1000) setCombatCondition(combat, condition) function onCastSpell(cid, var) if getPlayerItemCount(cid,2194) >= 1 then doCombat(cid, combat, var) end end
  22. vai na config lua e procura por teleportAllSummons = false teleportPlayerSummons = false substitua por teleportAllSummons = true teleportPlayerSummons = true
  23. Deve ser de outra coisa, porque se fosse isso, se voce adicionasse uma runa, iria bugar tudo o server? nao faz sentido, é outra coisa que esta fazendo cair o server. Talvez algum npc, ou creaturescripts, movements, mas nao esse spell.
  24. Cara nao intendi muito bem, explique exatamente o que voce quer e nao intendi nada sobre esse usar item nao sei o que LEGENDARY.
  25. Cara eu testei aqui com o item 8704 e funcionou direitinho. Talvez essa antidote potion esteja bugada e voce nao pode dar use with. Dai isso é com sprites nao sei mexer.
  • Quem Está Navegando   0 membros estão online

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