Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. local tpId = 1387 local tps = { ["Kurama"] = {pos = {x=1243, y=1090, z=9}, toPos = {x=1276, y=1055, z=9}, time = 30}, } function removeTp(pos) local t = getTileItemById(pos, 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(pos, CONST_ME_POFF) end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeTp, tp.time*1000, tp.pos) end return true end
  2. function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local from, to = {x = 996, y = 903, z = 7}, {x = 1003, y = 905, z = 7} -- pos começo e final da arena local tp = {x = 979, y = 907, z = 7} -- para onde vai if isPlayer(cid) and isInRange(getPlayerPosition(cid), from, to) then doTeleportThing(cid, tp) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce saiu da arena.") return false end return true end
  3. tenta assim: function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local from, to = {x=110,y=297,z=7}, {x=145,y=321,z=7} -- pos começo e final da arena local tp = {x=154,y=160,z=7} -- para onde vai if isPlayer(cid) and isInRange(getPlayerPosition(cid), from, to) then doTeleportThing(cid, tp) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce saiu da arena.") return false end return true end ou function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) local from, to = {x=110,y=297,z=7}, {x=145,y=321,z=7} -- pos começo e final da arena local tp = {x=154,y=160,z=7} -- para onde vai if isPlayer(cid) and isInRange(getPlayerPosition(cid), from, to) then addEvent(doTeleportThing, 300, cid, tp) end return true end
  4. pode ser que ja exista um script nessa arena, entendeu? ai pode estar fazendo que leve ao templo... tenta achar o código em creaturescript ou testar em uma nova arena(fazer no rme)
  5. isso mesmo, cuidado para nao ter registro duplicado(com o msm nome do script e evento)
  6. function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) local from, to = {x=110,y=297,z=7}, {x=145,y=321,z=7} -- pos começo e final da arena local tp = {x=154,y=160,z=7} -- para onde vai if isPlayer(cid) and isInRange(getPlayerPosition(cid), from, to) then doTeleportThing(cid, tp) end return true end n esquece a tag e de registrar no login.lua o evento
  7. isso é algum script já? ou e aquelas arenas que ja tem no otserv?
  8. usa o creaturescript normal daquele topic e usa esse globalevents: local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- 1 hora de vip account } function addVipHoursByAccount(acc, hours) local hValue = hours*3600 local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local time = getVipDaysByAccount(acc) == 0 and (timeNow + hValue) or (vipTime + hValue) return setVipTimeByAccount(acc, time) end local function givePoints(cid, quant) if os.time() - getCreatureStorage(cid, 1219) >= config.p_time then doPlayerSendTextMessage(cid, 19, "Congratulations, you recieved ".. config.p_points .." Hour from Vip Account.") addVipHoursByAccount(getPlayerAccountId(cid), quant) doCreatureSetStorage(cid, 1219, 0) doCreatureSetStorage(cid, 1219, os.time()) end return true end function onThink(interval) for i, v in pairs(getPlayersOnline()) do givePoints(v, config.p_points) end return true end
  9. getCreatureCondition(cid, condition[, subId = 0]) conditions: CONDITION_NONE = 0 CONDITION_POISON = 1 CONDITION_FIRE = 2 CONDITION_ENERGY = 4 CONDITION_PHYSICAL = 8 CONDITION_HASTE = 16 CONDITION_PARALYZE = 32 CONDITION_OUTFIT = 64 CONDITION_INVISIBLE = 128 CONDITION_LIGHT = 256 CONDITION_MANASHIELD = 512 CONDITION_INFIGHT = 1024 CONDITION_DRUNK = 2048 CONDITION_EXHAUST = 4096 CONDITION_FOOD = 8192 CONDITION_REGENERATION = 8192 CONDITION_SOUL = 16384 CONDITION_DROWN = 32768 CONDITION_MUTED = 65536 CONDITION_ATTRIBUTES = 131072 CONDITION_FREEZING = 262144 CONDITION_DAZZLED = 524288 CONDITION_CURSED = 1048576 CONDITION_PACIFIED = 2097152 CONDITION_GAMEMASTER = 4194304 CONDITION_HUNTING = 8388608 no caso do bebado é a CONDITION_DRUNK usaria assim : if getCreatureCondition(cid, CONDITION_DRUNK) then --bloco vazio end
  10. tranquilo, qualquer coisa grita
  11. mas ele tenta deslogar dentro da arena? tenta da /reload mods ou fecha e abre o ot... mto estranho!
  12. é isso ai, eu comecei assim vendo e aprendendo, depois tenta fazer uns código sozinho, basicão mesmo, não me considero um scripter bom, mas tudo aquilo que eu queria fazer eu consegui e tal. aprende que vale a pena, le uns tutoriais ai, na otland ou aqui msm que la na frente uma coisa ou outra vai servir. abraços
  13. depende do que você quer fazer, ai quem decide é você! digamos que antes ou depois dessa linha por exemplo selfSay('Hahaha, vejo que nao sera dificil de tomar decisoes no futuro, tem potencial pra se tornar um captao anbu algum dia!', cid)
  14. setPlayerStorageValue(cid,key,value) key = numero da storage value = valor dela exemplo: setPlayerStorageValue(cid,1500,1)
  15. Adicione isto an pasta lib em 050-function.lua: function doPlayerRemoveLethalConditions(cid) local tmp = {1, 2, 4, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 32768, 65536} for i = 1, #tmp do if(hasCondition(cid, tmp)) then doRemoveCondition(cid, tmp) end end return true end
  16. qual seu vip time? sistema que vc usa
  17. <?xml version="1.0" encoding="UTF-8"?> <mod name="Exame Jounin" enabled="yes" author="Demonbholder" forum="XTibia.com"> <config name="ArenaLib2"><![CDATA[ dinheiro = 10000 storage = 47002 storage2 = 47003 playerpos = {x = 964, y = 899, z = 7} -- posicao da arena trofypos = {x=986, y=902, z=8} -- posicao da area apos a arena monpos = {x = 964, y = 894, z = 7} -- posicao onde o monstro sera criado fromPos,toPos = {x = 960, y = 893, z = 7},{x = 969, y = 900, z = 7} -- posio do canto superior direito, posio do canto inferior esquerdo da arena monsters = { [0] = 'uchiha fugaku', [1] = 'chouza akimichi', [2] = 'anko', [3] = 'zabuza', [4] = 'kakashi' } function doRemoveCorpse(pos) for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then doRemoveItem(tile.uid) end end end ]]></config> <creaturescript type="death" name="Arena2" event="script"><![CDATA[ domodlib('ArenaLib2') if isPlayer(deathList[1]) and isMonster(cid) then if getPlayerStorageValue(deathList[1], storage) > -1 and getPlayerStorageValue(deathList[1], storage) < 5 then setPlayerStorageValue(deathList[1], storage, getPlayerStorageValue(deathList[1], storage) + 1) addEvent(doRemoveCorpse, 500, getCreaturePosition(cid)) setPlayerStorageValue(deathList[1], storage2, -1) end if getPlayerStorageValue(deathList[1], storage) == 5 then doTeleportThing(deathList[1], trofypos) setPlayerStorageValue(deathList[1],49502,1) end end return TRUE ]]></creaturescript> <creaturescript type="kill" name="ArenaK2" event="script"><![CDATA[ domodlib('ArenaLib2') if isMonster(cid) and isPlayer(target) then if getPlayerStorageValue(target, storage) > -1 and getPlayerStorageValue(target, storage) < 5 then setPlayerStorageValue(target, storage, -1) setPlayerStorageValue(target, storage2, -1) doRemoveCreature(cid) addEvent(doRemoveCorpse, 500, getCreaturePosition(target)) end end return TRUE ]]></creaturescript> <creaturescript type="logout" name="ArenaL2" event="script"><![CDATA[ domodlib('ArenaLib2') if isInRange(getPlayerPosition(cid), fromPos, toPos) then return FALSE, doPlayerSendCancel(cid, "You can't logout during arena!") end return TRUE ]]></creaturescript> <movevent type="StepIn" actionid="40003" event="script"><![CDATA[ domodlib('ArenaLib2') if monsters[getPlayerStorageValue(cid, storage)] then if getPlayerStorageValue(cid, storage2) == -1 then local mon = doCreateMonster(monsters[getPlayerStorageValue(cid, storage)], monpos) setPlayerStorageValue(cid, storage2, 1) registerCreatureEvent(mon, "Arena2") registerCreatureEvent(mon, "ArenaK2") end end return TRUE ]]></movevent> <movevent type="StepIn" actionid="40002" event="script"><![CDATA[ domodlib('ArenaLib2') for x = fromPos.x, toPos.x do for y = fromPos.y,toPos.y do local m = getTopCreature({x=x, y=y, z=fromPos.z}).uid if m~= 0 and isPlayer(m) then doTeleportThing(cid, fromPosition, true) return doPlayerSendCancel(cid, "Alguem esta fazendo o exame Jounin.") end end end if getPlayerMoney(cid) < dinheiro then return TRUE, doTeleportThing(cid, fromPosition), doPlayerSendCancel(cid, "Tens que ter 1g para fazer o exame jounin, sera para seus proprios medicamentos.") end doPlayerRemoveMoney(cid, dinheiro) setPlayerStorageValue(cid, storage, 0) doPlayerSendTextMessage(cid, 4, "Exame Jounin!") return TRUE, doTeleportThing(cid, playerpos) ]]></movevent> </mod>
  18. tenta trocar essa função: function doRemoveCorpse(pos) for i = 1, 255 do corp = {x=pos.x, y=pos.y, z=pos.z, stackpos=i} if isCorpse(getThingFromPos(corp).uid) then break end end doRemoveItem(getThingFromPos(corp).uid, 1) end por essa: function doRemoveCorpse(pos) for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then doRemoveItem(tile.uid) end end end acho que com essa edição funciona
  19. n testei 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,msg = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower() local storage1,storage2 = 15754,89745 local tabble = { ["primeira"] = {10551,10,0, "Va até o local 06 do MAPA, mate uns nekenins e me traga 10 Nukenin talisma!"}, ["segunda"] = {6500,25,1,"Va ate a Florest Renegade, quero que me tragas 25 renegade essence!"}, ["terceira"] = {2690,1,2,"Va ate o Local 05 do mapa que fica na Floresta Renegade, Tens um Shinobi de graduação Jounin la que roubou 1 saco de dinheiro de um aldeão, pegue e traga para mim"} } if isInArray({'missao','mission', 'missoes', 'tarefa', 'missions'}, msg) then if getPlayerStorageValue(cid,storage2) <= 0 then npcHandler:say("voce nao eh um gennin entao nao pode fazer missao aqui!", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) return true end npcHandler:say("qual missão deseja fazer agora, lembre-se de terminar uma para começar a outra, eu tenho disponivel {primeira}, {segunda} ou {terceira} missao!", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if tabble[msg] then local t = tabble[msg] local var = getPlayerStorageValue(cid,storage1) <= 0 and 0 or getPlayerStorageValue(cid,storage1) if var ~= t[3] then npcHandler:say('Voce ainda nao pode fazer ou ja terminou essa missao.', cid) return true elseif not doPlayerRemoveItem(cid, t[1], t[2]) then npcHandler:say(t[4], cid) return true end doPlayerAddExperience(cid,1000) doPlayerAddItem(cid,10136,1) setPlayerStorageValue(cid,storage1,var+1) npcHandler:say(getPlayerStorageValue(cid,storage1) > 2 and "Obrigado! Voce ja terminou 3 missões minhas, ja é digno de fazer o exame Jounin." or "Obrigado! ganhou um livro do kakashi de presete e ganhou 1000 de exp por ler!! agora ja podes fazer outra missao!", cid) return true end elseif msg == "no" then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) ----------------------- editado arrumei uma coisa agora
  20. remove essa parte do login.lua if getPlayerSlotItem(cid, 2).itemid == 7889 then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 49) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end e no outro script deixa assim: function onDeath(cid, corpse, deathList) if getPlayerSlotItem(cid, 2).itemid == 7889 and getPlayerSkullType(cid) >= 4 then doCreatureSetDropLoot(cid, false) end return true end
  21. n esta achando o arquivo

Informação Importante

Confirmação de Termo