Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. it's true, never thought of that... xd
  2. tem sim por ex: getItemWeaponType(getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid) 0 = first 1 = sword 2 = club 3 = axe 4 = shield 5 = dist agora só wand e rod que não dá para pegar =[ 6 = rod e wand lol ai por isso eu fiz por todos em uma tabela, acho que vou colocar do jeito que você falou mesmo k mas irei deixar a tabela de wands e rods ----------------------- pronto atualizado
  3. bem pensando! a maioria joga muitos lixos no templo, parabéns cara rep + sem dúvida
  4. CONST_SLOT_FIRST = 1 CONST_SLOT_HEAD = CONST_SLOT_FIRST CONST_SLOT_NECKLACE = 2 CONST_SLOT_BACKPACK = 3 CONST_SLOT_ARMOR = 4 CONST_SLOT_RIGHT = 5 CONST_SLOT_LEFT = 6 CONST_SLOT_LEGS = 7 CONST_SLOT_FEET = 8 CONST_SLOT_RING = 9 CONST_SLOT_AMMO = 10 CONST_SLOT_LAST = CONST_SLOT_AMMO
  5. vou ver, o anel é fácil, só colocar para checar slot do anel e o id dele.
  6. local s = { ["Catirus"] = {x = 1025, y = 1002, z = 6}, ["Tribrehith"] = {x = 1023, y = 1002, z = 6}, ["Umac"] = {x = 1021, y = 1002, z = 6}, } t = {} for k, v in pairs(s) do table.insert(t,k) end local item = 1252 doPlayerAddItemEx(cid, item,1) doItemSetAttribute(item, "present", t[math.random(1, #t)]) --- para que a pos então? porque não fez uma tabela simples local s = {"Demon","Dragon","Rat"} local item = 1252 doPlayerAddItemEx(cid, item,1) doItemSetAttribute(item, "present", s[math.random(1, #s)]) ...
  7. local s = { {"Dragon",{x = 1025, y = 1002, z = 6}}, {"Rat",{x = 1023, y = 1002, z = 6}}, {"Dragon Lord",{x = 1021, y = 1002, z = 6}} } r = math.random(1, #s) doCreateMonster(s[r][1], s[r][2])
  8. function getPlayersInArea(area) local players = {} for x = area.fromx,area.tox do for y = area.fromy,area.toy do for z = area.fromz,area.toz do local m = getTopCreature({x=x, y=y, z=z}).uid if m ~= 0 and isPlayer(m) then table.insert(players, m) end end end end return players end
  9. Vodkart

    Redskull Frags

    Se eu não me engano o redskull é contado por semana ou por mês, mesmo que a red skull sair ainda vai estar contando os frags, logo se ele matar ele volta a ser red skull
  10. lol é só colocar no parametro o level '-' 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 local travelNode = keywordHandler:addKeyword({'enigma city'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to Enigma City for 50 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 1000, cost = 50, destination = {x=942, y=978, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Enigma City\' for just a small fee.'}) npcHandler:addModule(FocusModule:new()) premium = true -- se precisa ser premium level = 1000 -- que level precisa ter cost = 50 -- o custo da viagem destination = {x=942, y=978, z=6} -- a pos para onde ele vai
  11. para criar o item só adicionar antes de doTeleportThing(tid, t.saida, false) isso: doCreateItem(5787, 1, t.entrada)
  12. Vodkart

    Private Respaw

    function onUse(cid, item, fromPosition, itemEx, toPosition) local monstros ={ {{x = 187, y = 56, z = 7}, "Demon"}, {{x = 187, y = 59, z = 7}, "Demon"}, {{x = 191, y = 59, z = 7}, "Ghazbaran"} } if Create() == false then return doPlayerSendCancel(cid, "sorry already have monster.") end for _, summon in pairs(monstros) do doCreateMonster(summon[2], summon[1]) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end function Create() local fromPosition,toPosition = {x = 183, y = 54, z = 7},{x = 192, y = 60, z = 7} -- começo e final da ára for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do local pos = {x=x, y=y, z=fromPosition.z} local m = getTopCreature(pos).uid if m ~= 0 and isMonster(m) then return false end doCleanTile(pos) end end return true end
  13. Vodkart

    Private Respaw

    está difícil de entender rs function onUse(cid, item, fromPosition, itemEx, toPosition) local monstros ={ {{x = 187, y = 56, z = 7}, "Demon"}, {{x = 187, y = 59, z = 7}, "Demon"}, {{x = 191, y = 59, z = 7}, "Ghazbaran"} } for _, summon in pairs(monstros) do local creature = getTopCreature(summon[1]).uid if(creature < 1 and not isPlayer(creature)) then CleanPos() doCreateMonster(summon[2], summon[1]) end end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end function CleanPos() local fromPosition,toPosition = {x = 182, y = 54, z = 7},{x = 192, y = 59, z = 7} -- começo e final da área for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do local pos = {x=x, y=y, z=fromPosition.z} doCleanTile(pos) end end end
  14. Vodkart

    Private Respaw

    function onUse(cid, item, fromPosition, itemEx, toPosition) local monstros ={ {{x = 187, y = 56, z = 7}, "Demon"}, {{x = 187, y = 59, z = 7}, "Demon"}, {{x = 191, y = 59, z = 7}, "Ghazbaran"} } for _, summon in pairs(monstros) do local creature = getTopCreature(summon[1]).uid if(creature > 0 and not isPlayer(creature)) then return doPlayerSendCancel(cid, "sorry already have monster.") end CleanPos() doCreateMonster(summon[2], summon[1]) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end function CleanPos() local fromPosition,toPosition = {x = 180, y = 51, z = 7},{x = 198, y = 59, z = 7} -- começo e final da área for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do local pos = {x=x, y=y, z=fromPosition.z} doCleanTile(pos) end end return true end
  15. Vodkart

    Script De Montaria

    ai vc vai em talkactions/script nome do seu script.lua function onSay(cid, words, param, channel) for i = 1,48 do doPlayerAddMount(cid, i) end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você recebeu todas as mounts") end talkactions.xml <talkaction words="!mounts" script="nome do seu script.lua"/>
  16. posta o seu talkactions.xml aki
  17. Vodkart

    Script De Montaria

    mas ai só tem 42 mounts não é? e ainda estão repetidas algumas '-' function onSay(cid, words, param, channel) for i = 1,42 do doPlayerAddMount(cid, i) end return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você recebeu todas as mounts") end 1,42 coloquei 42 porque é o limite de mounts do seu server?
  18. talkactions/script a tag é essa <talkaction words="!buyvip" event="script" value="nome do seu script.lua"/>
  19. function onUse(cid, item, pos) local days = tonumber(30) or 1 local price = 3000000 if doPlayerRemoveMoney(cid, price) then vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(days)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Foram adicionados "..tonumber(days).." dias de vip na sua account.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "você precisa de "..price.." gps para comprar vip!.") end return true end
  20. isso, ele vai comprar por gps ou por uma moeda especial?
  21. usa for '-' local t = { entrada = { {x = 192, y = 57, z = 7}, {x = 191, y = 57, z = 7}, {x = 190, y = 57, z = 7} }, saida = { {x = 192, y = 59, z = 7}, {x = 191, y = 59, z = 7}, {x = 190, y = 59, z = 7} } } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(isPlayer(x)) then table.insert(check, x) end end if(#check < 2) then return doPlayerSendCancel(cid, 'Está faltando player.') end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada[i], CONST_ME_POFF) doTeleportThing(tid, t.saida[i], false) setPlayerStorageValue(tid,78455,1) doSendMagicEffect(t.saida[i], CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end coloquei para dar a storage 78455
  22. tem como postar o script do vip system?
  23. Vodkart

    Private Respaw

    function onUse(cid, item, fromPosition, itemEx, toPosition) local monstros = {"Demon","Dragon","Ghazbaran"} local fromPosition,toPosition = {x = 187, y = 56, z = 7},{x = 191, y = 59, z = 7} function Create() for x = fromPosition.x, toPosition.x do for y = fromPosition.y, toPosition.y do local pos = {x=x, y=y, z=fromPosition.z} local m = getTopCreature(pos).uid if m ~= 0 and isMonster(m) then return false end doCleanTile(pos) doCreateMonster(monstros[math.random(1, #monstros)], pos) end end return true end Create() doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end mas tem limite de monstro? exemplo: 15 montro no máximo.
  24. é isso ai, agora pode alterar o script de health lá para essa função
  25. Ta dando isso, esta tudo do jeito que você falou para mim no tópico. Quando se usa !health ele da isso. Sabe porque está dando isso? é porque no seu servidor não existe essa função também! Vou te passar a função que eu fiz: lib/functions coloca function getPlayerHealth(cid) -- by vodka doPlayerSave(cid) local PlayerInfo = db.getResult("SELECT `health` FROM `players` WHERE `id` = " .. getPlayerGUID(cid)) return PlayerInfo:getDataInt("health") end ai no script ali onde tiver "getCreatureHealth" troca por "getPlayerHealth"
  • Quem Está Navegando   0 membros estão online

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