Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. ok 5 > 9 6 > 10 7 > 11 8 > 12 function onSay(cid, words, param) local custo = 500000 if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then if(doPlayerRemoveMoney(cid,custo) == TRUE) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doPlayerSendTextMessage(cid, 22, "Parabens você foi promovido.") else doPlayerSendCancel(cid,"Você precisa de " .. custo .. " gps para poder ser promovido .") end else doPlayerSendCancel(cid,"Você já foi promovido ou não tem vocação suficiente.") end return TRUE end
  2. ah será que dá por tpw na hora que passar doTransformItem(parede.uid,item.itemid+2) e na função de cria doTransformItem(parede.uid,item.itemid-2) testa ai
  3. qual o id da sua porta?
  4. @UP tem que mudar tbm o local onde os monstros estão se configura aqui: ZONE_MONSTERS = { {x = 94, y = 126, z = 7, range = 20}, {x = 92, y = 129, z = 8, range = 8}, }
  5. Vodkart

    Alavanca (Promotion)

    então ta certo você que ta fazendo alguma coisa errada eu testei aqui me adc no msn thiagoredlife@hotmail.com
  6. testa ai zé local config = { Time1 = 4, -- n mexa storage = 11458, -- Não mexa aqui! time = 3, -- tempo em segundos pos = {x=180,y=57,z=7}, -- posição da porta que ira sumir paredeid = 2703 -- id da porta } function onStepIn(cid, item, position, fromPosition) function criar() local parede = getTileItemById(config.pos, config.paredeid) doCreateItem(config.paredeid, 1, config.pos) end local parede = getTileItemById(config.pos, config.paredeid) if parede then if (getPlayerStorageValue(cid, config.storage) <= os.time()) then doRemoveItem(parede.uid, 1) setPlayerStorageValue(cid, config.storage, os.time()+config.Time1) addEvent(criar, config.time*1000) else doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doPlayerSendCancel(cid, "espere "..config.Time1.." seconds para pisar novamente.") end end return TRUE end movements.xml <movevent type="StepIn" actionid="2023" event="script" value="NOME DO SEU SCRIPT.lua"/>
  7. Vodkart

    Alavanca (Promotion)

    eu testei aqui e foi... qual id da sua alavanca? qual versao do seu ot?
  8. Vodkart

    Alavanca (Promotion)

    vc quer que ele use uma alavanca e retire uma quantia de vip coin e de um item pro player é isso? function onUse(cid, item, frompos, item2, topos) local t= { Coin={2160,100},Item={2123,1} } if item.uid == 1666 and item.itemid == 1945 then if doPlayerRemoveItem(cid,t.Coin[1],t.Coin[2]) == TRUE then doPlayerAddItem(cid, t.Item[1], t.Item[2]) doTransformItem(item.uid,item.itemid+1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, You need " .. t.Coin[2] .." vip coins.") end elseif item.uid == 1666 and item.itemid == 1946 then doTransformItem(item.uid,item.itemid-1) else doPlayerSendCancel(cid,"Sorry, not possible.") end return TRUE end 2160 = ID DA SUA VIP COIN 100 = QUANTIDADE de Vip coin QUE VAI SER RETIRADA 2123 = ITEM QUE O PLAYER VAI COMPRA 1 = QUANTIA DO ITEM QUE O PLAYER VAI COMPRA
  9. Vodkart

    Alavanca (Promotion)

    Cara essa deu sim e se não deu foi por sua culpa que não sabe pedir nada deireito,não especifica as vocaçoes(id) que poderão usar a alavanca,nao diz o ID sua sua vip coin,a quantia que será retirara,o ID da alavanca,enfim, uma serie de regras que são necessarias para que o pedido seja atendido. Acha que nós somos videntes e iremos fazer o script do jeito que você quer.
  10. @UP eu fiz aquele script. que é modificado de acordo com o sistema vip dele... o original ja vem com storage value da vip :]
  11. Vodkart

    Alavanca (Promotion)

    function onUse(cid, item, frompos, item2, topos) local Id_coin = 9927 -- id da sua coin vip local quanty = 100 -- quantidade if item.uid == 1666 and item.itemid == 1945 then if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then -- id das vocation if doPlayerRemoveItem(cid,Id_coin,quanty) then doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doTransformItem(item.uid,item.itemid+1) doPlayerSendTextMessage(cid, 22, "Parabens você foi promovido.") else doPlayerSendCancel(cid,"Você precisa de " .. quanty .. " para poder ser promovido .") end else doPlayerSendCancel(cid,"Voce ja tem promotion.") end elseif item.uid == 1666 and item.itemid == 1946 then doTransformItem(item.uid,item.itemid-1) else doPlayerSendCancel(cid,"Sorry, not possible.") end return TRUE end actions.xml add tag: <action actionid="1666" script="NOME DO SEU SCRIPT.lua" />
  12. da sim vou dar um exemplo bem facil... Bom o vermelho significa nossa primeira magia no caso o exevo gran mas frigo original o azul significa nossa a magia exevo gran mas frigo alterada (exemplo) então se ele tiver usando o colar 2196 vip (exemplo pode ser qualquer item) ele vai soltar a magia azul(alterada) se ele não estiver usando o colar ele irá soltar a magia vermelha (original)
  13. ve ai se ajuda: http://www.xtibia.com/forum/topic/138211-duvida-wayfarer-addons/
  14. ta na mão então parcerinho
  15. sim tem sim mais iria remover o item quando ele usasse?
  16. pedido resolvido via MSN abraços
  17. bem legal esse script poe um também só para a equipe do servidor function onLogin(cid) local g = getPlayerGroupId(cid) if(g >= 3 and isPlayerGhost(cid) ~= TRUE) then doBroadcastMessage(getCreatureName(cid) .. " Acabou de entrar [Grupo: " .. getGroupInfo(g).name .. "]", MESSAGE_INFO_DESCR) end return TRUE end
  18. Vodkart

    Reset System

    isso mesmo cara só ir adicionando as variaveis :] abraços
  19. Vodkart

    Reset System

    function onSay(cid, words, param) config = { RemainingLvl=8, -- level que ficará depois de ser resetado. exper=4200, -- experiencia que ficará depois de ser resetado. pid=getPlayerGUID(cid), -- não mecha redskull="yes", -- players com red skull podem resetar? ("yes" or "no"). bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no"). } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"Apenas player sem red skull podem resetar.") return true end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == false) then doPlayerSendTextMessage(cid,22,"Você precisa estar em protection zone pra poder resetar.") return true end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == true) then doPlayerSendTextMessage(cid,22,"Você precisa estar sem battle pra poder resetar.") return true end if getPlayerStorageValue(cid,1020) > 24 then if getPlayerLevel(cid) >= 500 then setPlayerStorageValue(cid,1020,getResets(cid)+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level 500 or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You need to have 24 reset or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end if getPlayerStorageValue(cid,1020) > 14 then if getPlayerLevel(cid) >= 450 then setPlayerStorageValue(cid,1020,getResets(cid)+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level 450 or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You need to have 14 resets or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end if getPlayerLevel(cid) >= 350 then setPlayerStorageValue(cid,1020,getResets(cid)+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level 350 or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end
  20. Preste atenção,o script também poderia ser assim: Analise 1 doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) doAddContainerItem(bag, spr_id, cargasspr_id) agora se você usa o for i=1,20 do -- indica que a instrução será executada de 1 até 20 doAddContainerItem(bag, spr_id, cargasspr_id) --20x a mesma linha repete um bloco das instruções quando uma condição for verdadeira ou até que uma condição se torne verdadeira executara 20x e depois irá parar(em vez da analise 1 de adicionar 20 linhas),no caso do exemplo acima, a estrutura de repetição será executada enquanto i < 20.
  21. edita esse aqui: 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'list')) then selfSay('Eu vendo {Ultrax Cometta Hat}, {Ultrax Cometta Armor}, {Ultrax Cometta Legs}, {Ultrax Cometta Boots}, {Cometta Blade}, {Cometta Axe}, {Cometta Club}, {Cometta Bow}, {Ultrax Cometta Shield}, {Ultrax Cometta Blade}, {Ultrax Cometta Axe}, {Ultrax Cometta Club}, {Ultrax Cometta Wand}, {Ultrax Cometta Rod}, e {Ultrax Cometta Bow}.Por Moedas VIP', cid) elseif(msgcontains(msg, 'ultrax cometta hat')) then selfSay('Voc\ê quer comprar Ultrax Cometta Hat por 100 VIP coins?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'ultrax cometta armor')) then selfSay('Voc\ê quer comprar Ultrax Cometta Armor por 100 VIP coins?', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'ultrax cometta legs') )then selfSay('Voc\ê quer comprar Ultrax Cometta Legs por 100 VIP coins?', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'ultrax cometta boots')) then selfSay('Voc\ê quer comprar Ultrax Cometta Boots por 100 VIP coins?', cid) talkState[talkUser] = 4 elseif(msgcontains(msg, 'cometta blade')) then selfSay('Voc\ê quer comprar Cometta Blade por 50 VIP coins?', cid) talkState[talkUser] = 5 elseif(msgcontains(msg, 'cometta axe')) then selfSay('Voc\ê quer comprar Cometta Axe por 50 VIP coins?', cid) talkState[talkUser] = 6 elseif(msgcontains(msg, 'cometta club')) then selfSay('Voc\ê quer comprar Cometta Club por 50 VIP coins?', cid) talkState[talkUser] = 7 elseif(msgcontains(msg, 'cometta bow')) then selfSay('Voc\ê quer comprar Cometta Bow por 50 VIP coins?', cid) talkState[talkUser] = 8 elseif(msgcontains(msg, 'ultrax cometta shield')) then selfSay('Voc\ê quer comprar Ultrax Cometta Shield por 100 VIP coins?', cid) talkState[talkUser] = 9 elseif(msgcontains(msg, 'ultrax cometta blade')) then selfSay('Voc\ê quer comprar Ultrax Cometta Blade por 100 VIP coins?', cid) talkState[talkUser] = 10 elseif(msgcontains(msg, 'ultrax cometta axe')) then selfSay('Voc\ê quer comprar Ultrax Cometta Axe por 100 VIP coins?', cid) talkState[talkUser] = 11 elseif(msgcontains(msg, 'ultrax cometta club')) then selfSay('Voc\ê quer comprar Ultrax Cometta Club por 100 VIP coins?', cid) talkState[talkUser] = 12 elseif(msgcontains(msg, 'ultrax cometta wand')) then selfSay('Voc\ê quer comprar Ultrax Cometta Wand por 100 VIP coins?', cid) talkState[talkUser] = 13 elseif(msgcontains(msg, 'ultrax cometta rod')) then selfSay('Voc\ê quer comprar Ultrax Cometta Rod por 100 VIP coins?', cid) talkState[talkUser] = 14 elseif(msgcontains(msg, 'ultrax cometta bow')) then selfSay('Voc\ê quer comprar Ultrax Cometta Bow por 100 VIP coins?', cid) talkState[talkUser] = 15 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 6096, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 6095, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 5918, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 5462, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 5) then if(doPlayerRemoveItem(cid, 2157, 50) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8932, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 50 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 6) then if(doPlayerRemoveItem(cid, 2157, 50) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7388, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 50 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 7) then if(doPlayerRemoveItem(cid, 2157, 50) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7437, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 50 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 8) then if(doPlayerRemoveItem(cid, 2157, 50) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8858, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 50 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 9) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 11368, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 10) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2408, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 11) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8925, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 12) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2444, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 13) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2184, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 14) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7735, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 15) then if(doPlayerRemoveItem(cid, 2157, 100) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8856, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 100 VIP coins', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  22. Vodkart

    Bargolinhas Tesudo

    vei ve se para de toma os hemogenin ai :X
  23. versão testada: 8.54+ talkactions/script addhpmana.lua --[[ Script by 10% Vodkart and 90% Devilmoon ]]-- --[[ para o Xtibia.com ]]-- function onSay(cid, words, param) if(words == "/addmana") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) mana = getCreatureMana(player)+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end setCreatureMaxMana(player, mana) doCreatureAddMana(player, getCreatureMaxMana(player)) doPlayerSendTextMessage(player, 19, "Foram adicionados "..quanty.." de mana do seu character agora você tem " .. getCreatureMana(cid) .. "/" .. getCreatureMaxMana(cid) .. " de Mana.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você adicionou "..quanty.." de mana ao jogador " .. t[1] .. " ") elseif(words == "/delmana") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) mana = getCreatureMana(player)-quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end setCreatureMaxMana(player, mana) doCreatureAddMana(player, getCreatureMaxMana(player)) doPlayerSendTextMessage(player, 19, "Foram removidos "..quanty.." de mana do seu character agora você tem " .. getCreatureMana(cid) .. "/" .. getCreatureMaxMana(cid) .. " de Mana.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você Removeu "..quanty.." de mana do jogador " .. t[1] .. " ") elseif(words == "/addhp") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) health = getCreatureMaxHealth(player)+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end setCreatureMaxHealth(player, health) doCreatureAddHealth(player, getCreatureMaxHealth(player)) doPlayerSendTextMessage(player, 19, "Foram adicionados "..quanty.." de hp do seu character agora você tem " .. getCreatureHealth(cid) .. "/" .. getCreatureMaxHealth(cid) .. " de HP.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você adicionou "..quanty.." de health do jogador " .. t[1] .. " ") elseif(words == "/delhp") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) health = getCreatureHealth(player)-quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end setCreatureMaxHealth(player, health) doCreatureAddHealth(player, getCreatureMaxHealth(player)) doPlayerSendTextMessage(player, 19, "Foram Removidos "..quanty.." de hp do seu character agora você tem " .. getCreatureHealth(cid) .. "/" .. getCreatureMaxHealth(cid) .. " de HP.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você Removeu "..quanty.." de health do jogador " .. t[1] .. " ") end return TRUE end talkactions.xml <talkaction log="yes" words="/addmana;/delmana;/addhp;/delhp" access="5" event="script" value="addhpmana.lua"/>
  • Quem Está Navegando   0 membros estão online

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