Ir para conteúdo

GiovaniRodrigo

Membro
  • Registro em

  • Última visita

Tudo que GiovaniRodrigo postou

  1. Já estou com script pronto, só estou com dificuldade em editar o post que eu fiz. @EDIT Consegui editar o post do script, refaça tudo pois mudou muita coisa. Tem um jeito bem mais simples, que quando o player colocar as pérolas na mesa ele será teletransportado para a próxima parte e as pérolas somem, sem essa de aparecer um teleport. Se quiser dessa maneira avise.
  2. Fala o addon que você quer por quest.
  3. Crie um arquivo chamado pearl.lua na pasta data/movements/scripts e cole isso local cfg = { posWhitePearl = {x=1060, y=1034, z=7, stackpos=2}, -- Posição da White Pearl posBlackPearl = {x=1062, y=1034, z=7, stackpos=2}, -- Posição da Black Pearl pos = {x=1061, y=1033, z=7} -- Local desejado para o jogador ser teletrasportado } function onAddItem(moveitem, tileitem, pos, cid) local getWhitePearl = getThingfromPos(cfg.posWhitePearl) local getBlackPearl = getThingfromPos(cfg.posBlackPearl) if getTileItemById(cfg.posWhitePearl, 2143).itemid >= 1 and getTileItemById(cfg.posBlackPearl, 2144).itemid >= 1 then doTeleportThing(cid, cfg.pos) doRemoveItem(getWhitePearl.uid, 1) doRemoveItem(getBlackPearl.uid, 1) doSendMagicEffect(cfg.posWhitePearl, 2) doSendMagicEffect(cfg.posBlackPearl, 2) doSendMagicEffect(getCreaturePosition(cid), 10) end end Adicione a seguinte linha no arquivo movements.xml que se encontra na pasta data/movements <movevent type="AddItem" tileitem="1" actionid="3366" event="script" value="pearl.lua"/> -- Map Editor Nas mesas que será colocado as pérolas coloque ActionID 3366 Testado e está 100% funcional Dúvidas? Me avise. Att. Giovani Rodrigo
  4. -- Quest Gems Crie um arquivo chamado gems.lua na pasta data/actions/scripts e cole isso function onUse(cid, item, frompos, item2, topos) if item.actionid == 1452 then if isPlayer(cid) == 1 then if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then doCreatureAddMaxMana(cid, 2000) doCreatureSay(cid, 'Aaah!', 1) else doPlayerSendTextMessage(cid, 18, 'You\'re not '.. getVocationInfo(1) ..' or '.. getVocationInfo(2) ..'.') end end elseif item.actionid == 1453 then if isPlayer(cid) == 1 then if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then doCreatureAddMaxHealth(cid, 500) doCreatureAddMaxMana(cid, 500 doCreatureSay(cid, 'Aaah!', 1) else doPlayerSendTextMessage(cid, 18, 'You\'re not '.. getVocationInfo(3) ..'.') end end elseif item.actionid == 1454 then if isPlayer(cid) == 1 then if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then doCreatureAddMaxHealth(cid, 1000) doCreatureSay(cid, 'Aaah!', 1) else doPlayerSendTextMessage(cid, 18, 'You\'re not '.. getVocationInfo(4) ..'.') end end end return TRUE end Adicione a seguinte linha no arquivo actions.xml que se encontra na pasta data/actions <action actionid="1452" event="script" value="gems.lua"/> <action actionid="1453" event="script" value="gems.lua"/> <action actionid="1454" event="script" value="gems.lua"/> -- Gems Crie um arquivo chamado questgems.lua na pasta data/actions/scripts e cole isso local cfg = { item = 1234, -- ID do item que será a jóia count = 1, -- Quantidade que o jogador irá ganhar ao clicar no baú money = 10000000 -- Preço que será cobrado do jogador } function onUse(cid, item, frompos, item2, topos) if item.uid == 30001 then if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then if doPlayerRemoveMoney(cid, cfg.money) then local itemAction = doPlayerAddItem(cid, cfg.item, cfg.count) doSetItemActionId(itemAction, 1452) doPlayerSendTextMessage(cid, 18, 'You just buy '.. cfg.count ..' '.. getItemNameById(cfg.item) ..'.') else doPlayerSendTextMessage(cid, 18, 'you don\'t have enough money' end end return TRUE elseif item.uid == 30002 then if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then if doPlayerRemoveMoney(cid, cfg.money) thenif doPlayerRemoveMoney(cid, cfg.money) then local itemAction = doPlayerAddItem(cid, cfg.item, cfg.count) doSetItemActionId(itemAction, 1453) doPlayerRemoveMoney(cid, cfg.money) doPlayerSendTextMessage(cid, 18, 'You just buy '.. cfg.count ..' '.. getItemNameById(cfg.item) ..'.') else doPlayerSendTextMessage(cid, 18, 'you don\'t have enough money' end end return TRUE elseif item.uid == 30003 then if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then if doPlayerRemoveMoney(cid, cfg.money) then local itemAction = doPlayerAddItem(cid, cfg.item, cfg.count) doSetItemActionId(itemAction, 1454) doPlayerRemoveMoney(cid, cfg.money) doPlayerSendTextMessage(cid, 18, 'You just buy '.. cfg.count ..' '.. getItemNameById(cfg.item) ..'.') else doPlayerSendTextMessage(cid, 18, 'you don\'t have enough money' end end return TRUE end return TRUE end Configurando Adicione a seguinte linha no arquivo actions.xml que se encontra na pasta data/actions <action uniqueid="30001" event="script" value="questgems.lua"/> <action uniqueid="30002" event="script" value="questgems.lua"/> <action uniqueid="30003" event="script" value="questgems.lua"/> -- Map Editor No baú do Sorcerer e Druid coloque UniqueID 30001 No baú do Paladin coloque UniqueID 30002 No baú do Knight coloque UniqueID 30003 Não testado. Dúvidas? Me avise. Att. Giovani Rodrigo
  5. Não vou te explicar como faz um script, se quiser aprender procure tutoriais. Eu ia postar links de tutoriais aqui pra você, mas por ser sarcástico e mal educado usa o Google agora.
  6. Teria que criar um script para ao invés dele remover dinheiro ele remover o substituto do mesmo. Att. Giovani Rodrigo
  7. Recopie o código novamente e teste.
  8. Crie um arquivo chamado tilevoc.lua na pasta data/movements/scripts e cole isso local vocation = 4 function onStepIn(cid, item, position, fromPosition) if getPlayerVocation(cid) ~= vocation then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 18, 'You need to be a '.. getVocationInfo(vocation) ..' to pass.') doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) end return TRUE end Configurando Adicione a seguinte linha no arquivo movements.xml que se encontra na pasta data/movements <movevent type="StepIn" actionid="5786" event="script" value="tilevoc.lua"/> No map editor coloque o ActionID 5786 no piso Dúvidas? Me avise. Att. Giovani Rodrigo
  9. GiovaniRodrigo postou uma resposta no tópico em Playground (Off-topic)
    Sim demais... Bob também destrói.
  10. Nesse caso mapa mesmo seria só um né, na verdade tem varias towns no mesmo mapa? Seu REP+ ta garantido. Att. Giovani Rodrigo
  11. Bom, eu modifiquei o mod por isso deve ter dado errado, pois na verdade ele precisa de um storage para iniciar a task de matar o boss pra depois ir matar o boss e em seguida pro baú, se você puder falar como ele pode conseguir essa storage para matar o boss. Pode ser por NPC, algum item no mapa que o jogador irá dar use, etc... Você escolhe. Att. Giovani Rodrigo
  12. Olá galera, Estou precisando de um script que a cada X minutos ele troque de mapa, os jogadores de vocação X cai na cidade 1 e vocação Y cai na cidade 2. Dou REP+ Att. Giovani Rodrigo
  13. O erro da linha 32 eu fixei local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executequery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executequery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end Att. Giovani Rodrigo
  14. Crie um arquivo chamado Jaul.xml na pasta mods e cole isso <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Kill Jaul" version="1.0" enabled="yes"> <config name="KillM_func"><![CDATA[ tsk = { storages = {40501}, task = {"jaul", 1} } ]]></config> <event type="login" name="AreKill" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "CountTask") return true end ]]></event> <event type="kill" name="CountTask" event="script"><![CDATA[ domodlib('KillM_func') function onKill(cid, target) if isMonster(target) then local n = string.lower(getCreatureName(target)) if n == tsk.task[1] then local contagem = getPlayerStorageValue(cid, tsk.storages) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then return true end if contagem > tsk.task[2] then return true end setPlayerStorageValue(cid, tsk.storages, contagem+1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,""..(contagem == tsk.task[2] and "Congratulations! You finished the task of "..n.."." or "defeated. Total [" .. contagem .. "/" .. tsk.task[2] .. "] " .. n .. ".").."") end end return true end ]]></event> </mod> Crie um arquivo chamado questJaul.lua na pasta data/actions/scripts e cole isso local cfg = { item = 15434, -- Item que o jogador vai ganhar count = 1 -- Quantidade do item que o jogador vai ganhar } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 40500) == -1 then if getPlayerStorageValue(cid, 40501) >= 1 then doPlayerAddItem(cid, 15434, 1) doPlayerSendTextMessage(cid, 18, 'You just won '.. cfg.count ..' '.. getItemNameById(cfg.item) ..'.') else doPlayerSendTextMessage(cid, 18, 'You must kill the boss.') end else doPlayerSendTextMessage(cid, 18, 'It\'s empty.') end return TRUE end Configurando Adicione a seguinte linha no arquivo actions.xml que se encontra na pasta data/actions <action uniqueid="30000" event="script" value="questJaul.lua" /> No map editor coloque o UniqueID 30000 do baú. Não testado, sem servidor com o item pedido no script e sem o monstro exigido. Dúvidas? Me avise. Att. Giovani Rodrigo
  15. Mande o script do arquivo playerdeath.lua...
  16. Obrigado pelos elogios cara, a questão de falar que não tem level já arrumei isso, ele esta dizendo agora
  17. Removido!
  18. GiovaniRodrigo postou uma resposta no tópico em Suporte Tibia OTServer
    Sim normal, por isso é aconselhado uma máquina sozinha para hostiar ou pagar um host.
  19. #FAIL, valeu por avisar, SUAHSAU.
  20. GiovaniRodrigo postou uma resposta no tópico em Suporte Tibia OTServer
    Lógico, CPU, memória, internet. Tudo...
  21. Quer que o professor leve suquinho de maçã e um lanche natural? Leia tutoriais colega. Professor que não cobre e que esteja a sua disposição? Você está querendo demais. Boa sorte nos estudos.
  22. Pronto, modifiquei. To sem nada pra testar ai fica meio difícil.
  23. Eu coloquei o nome dele como james Pronto arrumei, refaça o NPC.

Informação Importante

Confirmação de Termo