Ir para conteúdo

jhon992

Conde
  • Total de itens

    631
  • Registro em

  • Última visita

  • Dias Ganhos

    13

Tudo que jhon992 postou

  1. Aparece algum erro no distro ou mensagem durante o jogo? Me add no msn que eu tento resolver...
  2. Sóh ir na porta desejada com o Map Editor e colocar actionid. 1001 = lvl maior que 1 1010 = lvl > 10 1050 = lvl > 50 ...
  3. vai em data/npc e procura pelo npc desejado e remova o item desejado que estara assim: nome do item,id do item,preço do item;
  4. Isso pode ser configurado atravez de data/weapons/weapons.xml, la se encontra informações editaveis como: id do wand ou rod, level para uso, minimo de hit, maximo de hit...
  5. Para criar um templo, você precisa selecionar uma NewTownID com seu mapa editor na posição que você desejar. Para o player nascer nessa determinada city você deve configurar o config.lua do seu ot onde se encontra: newPlayerSpawnPosX = 2478 -- as três primeiras são as posições de login do account manager. newPlayerSpawnPosY = 2447 newPlayerSpawnPosZ = 7 newPlayerTownId = 1 -- esse último é o id da NewTownID que você criou com seu mapa editor. Para configurar os itens iniciais você pode ir em mods/firstitems na pasta de seu otserv, ou procure um tutorial de configurando first items, aqui no xtibia msm existem varios tutoriais desse tipo.
  6. jhon992

    Doplayersendtextmessage

    hm, viajei lgl entaum... malz aew! tentei usar isso: doPlayerSendChannelMessage(cid, "", "...", TALKTYPE_CHANNEL_W, CHANNEL_DEFAULT) mais tbm n funciona, acho que no default não da msm =/
  7. jhon992

    Doplayersendtextmessage

    Branco = MESSAGE_EVENT_DEFAULT doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você esta fazendo isso certo.")
  8. vai em data/actions/scripts duplica um arquivo e nomeia para "addonquest1" e nele cole: function onUse(cid, item, fromPosition, itemEx, toPosition) local lugaritem1 = {x=1763, y=668, z=14, stackpos=1} -- lugar item 1 local itemid1 = 3362 -- id item 1 local quantRemov1 = 10 -- qauntidade a remover do item1 local lugaritem2 = {x=1763, y=668, z=14, stackpos=1} -- lugar item 2 local itemid2 = 3363 -- id item 2 local quantRemov2 = 5 local lugaritem3 = {x=1763, y=668, z=14, stackpos=1} -- lugar item 3 local itemid3 = 3364 -- id item 3 local quantRemov3 = 2 local lugaritem4 = {x=1763, y=668, z=14, stackpos=1} -- lugar item 4 local itemid4 = 3365 -- id item 4 local quantRemov4 = 15 if (getPlayerStorageValue(cid, 15000) <= 0) then if (getThingfromPos(lugaritem1).id == itemid1 and getThingfromPos(lugaritem2).id == itemid2 and getThingfromPos(lugaritem3).id == itemid3 and getThingfromPos(lugaritem4).id == itemid4) then doRemoveItem(getThingfromPos(lugaritem1).uid, quantRemov1) doRemoveItem(getThingfromPos(lugaritem2).uid, quantRemov2) doRemoveItem(getThingfromPos(lugaritem3).uid, quantRemov3) doRemoveItem(getThingfromPos(lugaritem4).uid, quantRemov4) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You now have a Barbarian addon!.") doPlayerAddOutfit(cid, 147, 1) -- 1 é igual ao first addon, se 2 = second, se 3 = full addon doPlayerAddOutfit(cid, 143, 1) -- o 146 e o 143, são o numero do outfit do barbarian male e female. setPlayerStorageValue(cid, 15000, 1) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Os itens nao estao nas posiçoes corretas.") end else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce ja fez esta quest.") end return true end agora em data/actions/actions.xml cole a tag: <action actionid="2012" event="script" value="addonquest1.lua"/> e por ultimo com seu mapa editor adicione o actionid 2012 na stone que sera clicada!
  9. na parte da função onCreatureSay, faltou fechar com "end" três "if". Exemplo: Antes - if msgcontains(msg, 'blood rage') and focus == cid then if pay(cid,170) then learnSpell(cid,'utito tempo') else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end Depois - if msgcontains(msg, 'blood rage') and focus == cid then if pay(cid,170) then learnSpell(cid,'utito tempo') else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end Dica: Quando criar um código lembra de levar organizadinho pra vc n se perder depois.
  10. local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then if getPlayerVocation(cid) == 4 then selfSay('Hello ' .. creatureGetName(cid) .. '! What spell do you want to learn?') focus = cid talk_start = os.clock() else selfSay('Sorry, I sell spells for knights.') end elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'annihilation') and focus == cid then if pay(cid,170) then learnSpell(cid,'exori gran ico') else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'blood rage') and focus == cid then if pay(cid,170) then learnSpell(cid,'utito tempo') else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'brutal strike') and focus == cid then if pay(cid,170) then learnSpell(cid,'exori ico') else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'challenge') and focus == cid then if pay(cid,170) then learnSpell(cid,'exeta res') else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end
  11. jhon992

    Serve Save

    Editei ali em cima, vai mandar a msg após 3 segundos depois que o salve começa a ser executado, se quiser mais segundos troque o "3000" por +.
  12. luaDoAddPlayerBanishment -- bane o player, nem conhecia essa função, na lista que eu tenho aqui ela n se encontra. Onde eu vejo uma lista mais atualizada com a maioria das funções? Sem precisar procurar nas sources ou libs.
  13. Imagino que não tenha como banir apenas um char, pois os banimentos funcionam pela account.
  14. Tens que postar o script da bike para que alguem possa ajudar. Ou vai no seu script e procure por essa linha de comando "doChangeSpeed(cid, speed)" e almenta a quantidade de speed.
  15. jhon992

    Serve Save

    local config = { local config = { broadcast = {120, 30}, shallow = "no", delay = 120, events = 30 } config.shallow = getBooleanFromString(config.shallow) local function executeSave(seconds) if(isInArray(config.broadcast, seconds)) then local text = "" if(not config.shallow) then text = "[Auto Save]" else text = "O" end text = text .. " Serve irá salvar em " .. seconds .. " segundos, porfavor aguarde!" doBroadcastMessage(text) end if(seconds > 0) then addEvent(executeSave, config.events * 1000, seconds - config.events) else doSaveServer(config.shallow) addEvent(doBroadcastMessage, 3000, "[Auto Save] Dados salvo com sucesso!") end end function onThink(interval) if(table.maxn(config.broadcast) == 0) then doSaveServer(config.shallow) addEvent(doBroadcastMessage, 3000, "[Auto Save] Dados salvo com sucesso!") else executeSave(config.delay) end return true end Esse /\ éh pra aparecer a msg e para salvar a cada 5 hras, altera no globalevents.xml: <globalevent name="save" interval="18000" event="script" value="save.lua"/>
  16. Ja arrumei la emcima, só substituir o seu "addpremium" eo "removepremium".
  17. Vai em data/talkactions/scritps e duplica 3 arquivos, um renomeia para "addpremium", outro para "premiumcheck" e o ultimo "removepremium" todos sem as aspas. Agora no arquivo "addpremium" cole isso: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local player = getPlayerByNameWildcard(tostring(t[1])) if(not isPlayer(player)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.") return true end local pos = getCreaturePosition(player) local effect = 30 local days = tonumber(t[2]) doPlayerAddPremiumDays(player, days) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "Voce recebeu "..days.." dia(s) premium.") doSendMagicEffect(pos, effect) return true end No arquivo "premiumcheck" cole isso: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local player = getPlayerByNameWildcard(tostring(param)) if(not isPlayer(player)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." possui "..getPlayerPremiumDays(player).." dias de premium restantes.") return true end E no arquivo "removepremium" cole isso: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local player = getPlayerByNameWildcard(tostring(t[1])) if(not isPlayer(player)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.") return true end local pos = getCreaturePosition(player) local effect = 30 local days = tonumber(t[2]) doPlayerRemovePremiumDays(player, days) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "Foi removido "..days.." dia(s) premium.") doSendMagicEffect(pos, effect) return true end E por último vai em data/talkactions/talkactions.xml e cole as tags: <talkaction words="/addpacc" access="6" event="script" value="addpremium.lua"/> <talkaction words="/premiumcheck" access="6" event="script" value="premiumcheck.lua"/> <talkaction words="/removepremium" access="6" event="script" value="removepremium.lua"/> Acho que é isso aew, nem testei, qualquer erro me avisa!
  18. tenta agora, modifiquei la em cima.
  19. tenta assim, nem testei: local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local citypremium = { "Aramunhra", "Livingstar", "Molour", "Menutis" } -- nome das cidades que precisa ser premium para viajar function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) --if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Welcome ' .. creatureGetName(cid) .. '! I can take you to Aramunhra (250gps), Livingstar (220gps), Molour (200gps), Menutis (250gps), Seruse Bay (300gps), Amazonia (330gps) and that the hellish world of Draconia! (520gps)... Where do you want to go?') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() for i=1, #citypremium do if msgcontains(msg, tostring(citypremium[i])) and focus == cid then if isPremium(cid) == false then selfSay('Sorry, only premium players can travel to city.') focus = 0 talk_start = 0 end end end if msgcontains(msg, 'aramunhra') and focus == cid then if pay(cid,250) then selfSay('Let\'s go!') travel(cid, 1080, 488, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'livingstar') and focus == cid then if pay(cid,220) then selfSay('Let\'s go!') travel(cid, 1483, 2834, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'molour') and focus == cid then if pay(cid,200) then selfSay('Let\'s go!') travel(cid, 732, 640, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'menutis') and focus == cid then if pay(cid,250) then selfSay('Let\'s go!') travel(cid, 1608, 470, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'seruse bay') and focus == cid then if pay(cid,300) then selfSay('Let\'s go!') travel(cid, 1532, 1012, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'amazonia') and focus == cid then if pay(cid,330) then selfSay('Let\'s go!') travel(cid, 1137, 880, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'ice island') and focus == cid then if pay(cid,480) then selfSay('Let\'s go!') travel(cid, 1521, 1380, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'draconia') and focus == cid then if pay(cid,520) then selfSay('Let\'s go!') travel(cid, 781, 181, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if msgcontains(msg, 'evento') and focus == cid then if pay(cid,100) then selfSay('Let\'s go!') travel(cid, 649, 361, 6) focus = 0 talk_start = 0 else selfSay('Sorry, you don\'t have enough money.') talk_start = os.clock() end end if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then selfSay('Good Bye ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end
  20. Nos seus scripts onde estiver: getPlayerPremium(cid) Troque por isso: isPremium(cid)
  21. @Maicondoze você deve ter feito algo errado na parte do itemlogin.lua, tenta refazer.
  22. Com esse script cada player morrera apenas uma vez ao passar por ele tile. Para morrer toda vez use assim: function onStepIn(cid, item, frompos, topos) if isPlayer(cid) == TRUE then doCreatureAddHealth(cid,-99999999) -- quantidade de vida player vai perder. doPlayerSendTextMessage(cid, 22, "Você foi morto!") end return TRUE end
  23. Troca por esse: function onSay(cid, words, param) local table, config = { toClose = {[9170] = 9169}, -- Coloque aqui os ids das portas seguindo o exemplo, a segunda tabela vai ser criada sozinha toOpen = {} }, { fromPos = {x=356,y=69,z=7}, toPos = {x=386,y=81,z=7} } for opened,closed in ipairs(table.toClose) do table.toOpen[closed] = opened end for x=config.fromPos.x, config.toPos.x do for y=config.fromPos.y, config.toPos.y do local doorPos = {x=x,y=y,z=config.fromPos.z} for stack=1,20 do doorPos.stackpos = stack for _,to in ipairs(table) do door = getThingFromPos(doorPos) if to[door.itemid] then doTransformThing(door.uid, to[door.itemid]) end end end end end return true end
  24. function onUse(cid, item, frompos, item2, topos) db1pos = {x=757, y=826, z=7, stackpos=1} -- posição item1 db2pos = {x=758, y=826, z=7, stackpos=1} -- 2 db3pos = {x=759, y=826, z=7, stackpos=1} -- 3 db4pos = {x=760, y=826, z=7, stackpos=1} -- 4 db5pos = {x=761, y=826, z=7, stackpos=1} -- 5 db6pos = {x=762, y=826, z=7, stackpos=1} -- 6 getpiece1 = getThingfromPos(db1pos) getpiece2 = getThingfromPos(db2pos) getpiece3 = getThingfromPos(db3pos) getpiece4 = getThingfromPos(db4pos) getpiece5 = getThingfromPos(db5pos) getpiece6 = getThingfromPos(db6pos) npcpos = {x=759, y=827, z=7} -- posição que sumonara o npc if item.uid == 7054 and item.itemid == 1945 and getpiece1.itemid == 10309 and getpiece2.itemid == 10310 and getpiece3.itemid == 10311 and getpiece4.itemid == 10312 and getpiece5.itemid == 10314 and getpiece6.itemid == 10315 then doRemoveItem(getpiece1.uid) doRemoveItem(getpiece2.uid) doRemoveItem(getpiece3.uid) doRemoveItem(getpiece4.uid) doRemoveItem(getpiece5.uid) doRemoveItem(getpiece6.uid) doTransformItem(item.uid,item.itemid+1) doCreateNpc('shenron', npcpos) elseif item.uid == 7054 and item.itemid == 1946 then doTransformItem(item.uid,item.itemid-1) else doPlayerSendTextMessage(cid,22,"You need right and left keys to transform key.") end return TRUE end
  • Quem Está Navegando   0 membros estão online

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