Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. ficam preso sim, por isso quem faz o evento é o GM pra n ter bug ele ve qntos querem participar e tal mas da pra fazer automatico s
  2. ah pode crer bem pensando genio
  3. ta explica como acontece as voc 5,6,7 e 8 vao pra 9,10,11 e 12?
  4. Vodkart

    Aol Para Red Skull

    usa esse que o corpo n some http://www.xtibia.com/forum/topic/133412-red-skull-amulet-10/
  5. fiz uma nova versão baseada nessa do mkalo quem quiser testar avisa q eu mando por PM up
  6. Primeiro Npc que vende os items mais caros ou mais barato DEPENDENDO DO DIA 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 function PercentNumber(n) percent = { ["Monday"] = 1, ["Tuesday"] = 2, ["Wednesday"] = 5, ["Thursday"] = 1, ["Friday"] = 7, ["Saturday"] = 5, ["Sunday"] = 10 } return n + math.ceil(((percent[os.date("%A")]*n)/100)) end local trade = { {id=2386, buy= PercentNumber(20) , sell= PercentNumber(8),name="axe"}, {id=2382, buy= PercentNumber(15), sell= PercentNumber(4), name="club"}, {id=2413, buy= PercentNumber(2240), sell= PercentNumber(550), name="broadsword"}, } local items = {} for _, item in ipairs(trade) do items[item.id] = {item_id = item.id, buyPrice = item.buy, sellPrice = item.sell, subType = 0, realName = item.name} end local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if items[item].buyPrice ~= 0 then doPlayerRemoveMoney(cid, amount * items[item].buyPrice) for i = 1, amount do doPlayerAddItem(cid, items[item].item_id, amount) end end end local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks) if items[item].sellPrice ~= 0 then doPlayerAddMoney(cid, items[item].sellPrice * amount) doPlayerRemoveItem(cid, items[item].item_id, amount) end end if msgcontains(msg, 'trade') then openShopWindow(cid, trade, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) percent = { ["Monday"] = 1, ["Tuesday"] = 2, ["Wednesday"] = 5, ["Thursday"] = 1, ["Friday"] = 7, ["Saturday"] = 5, ["Sunday"] = 10 } ["DIA"] = % exemplo: {id=2386, buy= PercentNumber(20) , sell= PercentNumber(8),name="axe"}, 20 é o preço real do item pra comprar no caso hj é Sunday e está para ficar 10% mais caro, então o item ali vai custa hj 22 pq 10% de 20 é 2 --------------------------- o segundo é o npc que vende os itens com 50% do preço mais barato se ele tiver um X item 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 function PercentNumber(n) return getPlayerItemCount(cid, 2123) >= 1 and n - math.ceil(((50*n)/100)) or n end local trade = { {id=2386, buy= PercentNumber(20) , sell= 8,name="axe"}, {id=2382, buy= PercentNumber(15), sell= 4, name="club"}, {id=2413, buy= PercentNumber(2240), sell= 550, name="broadsword"}, } local items = {} for _, item in ipairs(trade) do items[item.id] = {item_id = item.id, buyPrice = item.buy, sellPrice = item.sell, subType = 0, realName = item.name} end local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if items[item].buyPrice ~= 0 then doPlayerRemoveMoney(cid, amount * items[item].buyPrice) for i = 1, amount do doPlayerAddItem(cid, items[item].item_id, amount) end end end local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks) if items[item].sellPrice ~= 0 then doPlayerAddMoney(cid, items[item].sellPrice * amount) doPlayerRemoveItem(cid, items[item].item_id, amount) end end if msgcontains(msg, 'trade') then openShopWindow(cid, trade, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Nesse caso eu coloquei para vender o item 50% mais barato se ele tiver o item com ID: 2123 só mudar aqui: function PercentNumber(n) return getPlayerItemCount(cid, 2123) >= 1 and n - math.ceil(((50*n)/100)) or n end o 2123 é o ID do item e o 50 é qntos % mais barato @TOPIC se não entender oq eu digo estude um pouco.
  7. Vodkart

    Pvp Arena

    para não contar Frags e perder o loot, skill, level tal como vc quer: function onKill(cid, target) local from,to = {x = 186, y = 54, z = 7},{x = 192, y = 60, z = 7} if isPlayer(cid) and isPlayer(target) and isInRange(getCreaturePosition(cid), from, to) then doCreatureSetSkullType(target, 3) addEvent(doCreatureSetSkullType, 100, cid, 0) end return true end OBS: N PODE SER EM PVP TOOL
  8. Vodkart

    Pvp Arena

    eu só tinha arrumado o script na verdade não se usa mais lastHitKiller, se usa deathList[1] oque eu não entendi é oq essa arena faz, me explica
  9. Vodkart

    Pvp Arena

    local config = { pvpParcent = 2, arenaFrom = {1250, 691, 6}, -- pvp arena from x,y,z position arenaTo = {1260, 724, 6}, -- pvp arena to x,y,z position } function gainExperience(cid,lastHitKiller, mostDamageKiller) if (isPlayer(lastHitKiller) and isPlayer(mostDamageKiller)) and (lastHitKiller ~= mostDamageKiller) then doPlayerAddExp(lastHitKiller, (getPlayerExperience(cid)/200)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(lastHitKiller), (getPlayerExperience(cid)/200)*config.pvpParcent, TEXTCOLOR_WHITE) doPlayerAddExp(mostDamageKiller, (getPlayerExperience(cid)/200)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(mostDamageKiller), (getPlayerExperience(cid)/200)*config.pvpParcent, TEXTCOLOR_WHITE) elseif (isPlayer(lastHitKiller) and not(isPlayer(mostDamageKiller))) then doPlayerAddExp(lastHitKiller, (getPlayerExperience(cid)/100)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(lastHitKiller), (getPlayerExperience(cid)/100)*config.pvpParcent, TEXTCOLOR_WHITE) elseif (not(isPlayer(lastHitKiller)) and isPlayer(mostDamageKiller)) then doPlayerAddExp(mostDamageKiller, (getPlayerExperience(cid)/100)*config.pvpParcent) doSendAnimatedText(getPlayerPosition(mostDamageKiller), (getPlayerExperience(cid)/100)*config.pvpParcent, TEXTCOLOR_WHITE) end end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local playerPos = getPlayerPosition(cid) local killerPos = getPlayerPosition(lastHitKiller) if isPlayer(cid) then if (playerPos.x >= config.arenaFrom[1] and playerPos.x <= config.arenaTo[1]) and (playerPos.y >= config.arenaFrom[2] and playerPos.y <= config.arenaTo[2]) and (playerPos.z >= config.arenaFrom[3] and playerPos.z <= config.arenaTo[3]) then if (killerPos.x >= config.arenaFrom[1] and killerPos.x <= config.arenaTo[1]) and (killerPos.y >= config.arenaFrom[2] and killerPos.y <= config.arenaTo[2]) and (killerPos.z >= config.arenaFrom[3] and killerPos.z <= config.arenaTo[3]) then gainExperience(cid,lastHitKiller, mostDamageKiller) end end end return TRUE end
  10. hm é pq no teu server assim como nos demais 9.1+, retiraram a função onTimer() enfim, acho que o melhor server é o TFS mesmo, só que eu não tenho ele aqui para dar uma olhada e ver as funções que são diferentes '-'
  11. ah tava certo então acabei me enganando dps kkkk
  12. é porque no seu server não tem a função 'isInRange' kct Vai em Data/lib/032-position.lua e adc essa função: function isInRange(position, fromPosition, toPosition) return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z) end
  13. Eu não preciso, ninguém sabe mas o xtibia me paga cerca de R$ 3000,00 Reais por mês para dar um help na comunidade, e tenho um termo que diz que quando eu chegar aos 1000 REP'S eu vou ganhar uma aposentadoria no valor de R$ 5000,00 até o fechamento do site, que no caso não tem previsão. @topic Esqueci de perguntar, mas o que o xtibia vai ganhar com o market?
  14. eita TFS 0.4 sempre fudendo meu cuzinho tenta assim então nome do seu script.lua function onThink(interval, lastExecution) local days = { ["Friday"] = {npc = "Rashid", pos = {x = 160, y = 54, z = 7}}, ["Saturday"] = {npc = "Rashid", pos = {x = 165, y = 54, z = 7}}, ["Sunday"] = {npc = "Rashid", pos = {x = 150, y = 56, z = 7}}, ["Monday"] = {npc = "Rashid", pos = {x = 160, y = 54, z = 7}} } local RemoveTime = 1 -- em minutos local t = days[os.date("%A")] if tostring(os.date("%X")):sub(1, 5) == "00:00" and t then doCreateNpc(t.npc, t.pos) doBroadcastMessage("O Npc "..t.npc.." apareceu na cidade! ele irá embora em "..RemoveTime .." minuto(s).") addEvent(doRemoveCreature, RemoveTime*60*1000, getCreatureByName(t.npc)) end return true end globalevents.xml <globalevent name="CityNpc" interval="60" event="script" value="nome do seu script.lua"/>
  15. trololo qual versão do seu server?
  16. Na minha opinião tanto faz, quem quiser vender que venda, já são bastante pessoas que vendem códigos, eles anunciam em site e e-mails, nunca foi um mistério isso. Agora vamos pensar o seguinte, João compra script do Gustavo, e esse tal joão posta o script na comunidade... O gustavo não vai pode reclama de nada, única coisa que ele vai pode reclamar é dos direitos autorais sobre o script, mas controlar a postagens do seu código na comunidade vai ser impossível. E sobre os requisitos acho que era quase isso que o jhon falou: Além disso como seria a forma de pagamento?
  17. @up tenta assim: nome do seu script.lua function onTimer() local days = { ["Friday"] = {npc = "Rashid", pos = {x = 160, y = 54, z = 7}}, ["Saturday"] = {npc = "Rashid", pos = {x = 165, y = 54, z = 7}}, ["Sunday"] = {npc = "Rashid", pos = {x = 150, y = 56, z = 7}}, ["Monday"] = {npc = "Rashid", pos = {x = 160, y = 54, z = 7}} } local RemoveTime = 1 -- em minutos local t = days[os.date("%A")] if t then doCreateNpc(t.npc, t.pos) doBroadcastMessage("O Npc "..t.npc.." apareceu na cidade! ele irá embora em "..RemoveTime .." minuto(s).") addEvent(doRemoveCreature, RemoveTime*60*1000, getCreatureByName(t.npc)) end return true end globalevents.xml <globalevent name="CityNpc" time="00:00" event="script" value="nome do seu script.lua"/>
  18. vc diz os 2 npc? que varia o preço do item pra vender/comprar dependendo do dia da semana e o do item com 50% de desconto?
  19. timescolor.lua local conditionBlack = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionBlack, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionBlack, {lookType = 134, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}) local conditionRed = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRed, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRed, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}) local time1,time2 = {x = 160, y = 54, z = 7},{x = 165, y = 54, z = 7} function onStepIn(cid, item, position, fromPosition) if item.actionid == 29856 or item.actionid == 29857 then local pos,out = item.actionid == 29856 and time1 or time2,item.actionid == 29856 and conditionBlack or conditionRed doAddCondition(cid, out) doTeleportThing(cid, pos) end return true end aqui você muda a pos pra onde cada time vai: local time1,time2 = {x = 160, y = 54, z = 7},{x = 165, y = 54, z = 7} movements.xml <movevent type="StepIn" actionid="29856;29857" event="script" value="timescolor.lua"/> Pro primeiro time vc coloca no mapa ActionID = 29856 Pro segundo time vc coloca no mapa ActionID = 29857
  20. sistema 100% já passei pro vinicius só ele reporta pra mover
  21. eu fiz um sistema aqui caso você queira eu mando pra vc testa
  22. Vodkart

    Vip Por Item

    kkkkkkkkkkkkkkkkkkkkkkk q besta mas vlw vou reportar pra moverem abraços
  23. Vodkart

    Hunted System

    ah sim é pq eu to postando pra dar errado desculpa ai
  24. Vodkart

    Hunted System

    oq eu n entendi foi o seguinte, ele só vai poder usar 1x? ele huntou o Subwat, ai se ele der !hunted off ele vai poder huntar alguem de novo? acho q vou fazer po db na db executa ALTER TABLE `players` ADD `hunted` INT NOT NULL DEFAULT '0' huntedsys.lua function onSay(cid, words, param, channel) if param == "" then doPlayerPopupFYI(cid,"Para huntar alguém digite: !hunted nome\n\nPara remover o hunted digite: !hunted off\n\n para saber a lista dos jogadores hunted's digite: !hunted list") return true elseif param == "list" then local max_players,str = 20,"" str = "--[ Hunted System ]--\n\n" local query = db.getResult("SELECT `name`, `hunted` FROM `players` WHERE `hunted` > 0 AND `id` > 6 AND `group_id` < 2;") if (query:getID() ~= -1) then k = 1 while true do str = str .. "\n " .. k .. ". ".. getPlayerNameByGUID(query:getDataInt("hunted")) .." Hunted By " .. query:getDataString("name") k = k + 1 if not(query:next()) or k > max_players then break end end query:free()end doShowTextDialog(cid,6500,str)return true elseif param == "off" then if getPlayerStorageValue(cid, 650585) <= 0 then doPlayerSendCancel(cid, "Você não está huntando ninguém.") return true end setPlayerStorageValue(cid, 650585, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tirou seu hunted.") db.executeQuery("UPDATE `players` SET `hunted` = 0 WHERE `id` = "..getPlayerGUID(cid)) return true end local player = getPlayerByNameWildcard(param) if(not player or player == cid)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true elseif getPlayerLevel(cid) < 2000 or getPlayerLevel(player) < 2000 then doPlayerSendCancel(cid, (getPlayerLevel(cid) < 2000 and "Você" or param).." precisa ser level 2000 ou mais.") return true elseif getPlayerStorageValue(cid, 650585) >= 1 then doPlayerSendCancel(cid, "Você já deu hunt em uma pessoa.") return true end setPlayerStorageValue(cid, 650585, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você acaba de dar hunted no Jogador "..param..".") db.executeQuery("UPDATE `players` SET `hunted` = "..getPlayerGUID(player).." WHERE `id` = "..getPlayerGUID(cid)) return true end tag <talkaction words="!hunted;/hunted" event="script" value="huntedsys.lua"/>
  25. Vodkart

    Vip Por Item

    Está certo, é a mesma função tanto no item como nesse seu script: vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(days)) vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(config.days)) é a mesma função
  • Quem Está Navegando   0 membros estão online

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