Ir para conteúdo

ViitinG

Membro
  • Registro em

  • Última visita

Tudo que ViitinG postou

  1. O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Geral" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  2. O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → Geral" Para: "OTServ → Suporte OTServ → Suporte de OTServ Geral"
  3. @Jonybob21 cuidado com o flood !! Leia as regras do fórum : http://www.tibiaking.com/forum/topic/1281-regras-gerais/?p=7680
  4. É só mudar o nome e apertar CTRL + Return(apagar).
  5. Para remover o item na sua frente digite "/r" e para mudar o nome do character vá na opção "Players" no SQLite Studio e clique duas vezes,clique na aba "Data" e procure o nome do player que deseja mudar,clique duas vezes no nome e mude,depois segure CTRL e aperte Return(apagar). obs : o character tem que estar offline para poder trocar o nome !
  6. Clique duas vezes em "Account" e vai abrir uma janela e na janela você clica em "Data".
  7. Confere se as posições que estão no script está certa no seu mapa ! Está é a posição para onde o player vai,confere se está certo com a do seu mapa : newPos = {x=60, y=236, z=7},
  8. As contas estão na janela Accounts>Data e não Accounts>Triggers(disparadores)..
  9. ViitinG postou uma resposta no tópico em Suporte Tibia OTServer
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de OTServ Geral" Para: "OTServ → Suporte OTServ → Suporte de Programação" @TOPIC Já tentou atualizar o SQLite Studio ?
  10. Ve se esse de vagões está funcionando : "data/actions/actions.xml" <action fromaid="8034" toaid="8038" script="kazordoon/kazordoonOreWagons.lua"/> "data/actions/kazordoon/kazordoonOreWagons.lua" local nodes = { [8034] = {x = 32657, y = 31903, z = 8}, -- Depo [8035] = {x = 32606, y = 31905, z = 9}, -- Shops [8036] = {x = 32628, y = 31922, z = 11}, -- Temple [8037] = {x = 32576, y = 31973, z = 9}, -- Main Gate [8038] = {x = 32676, y = 31976, z = 15}, -- Steam Ship } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, 1131) > os.time()) then if(getPlayerStorageValue(cid, 1132) < 100) then setPlayerStorageValue(cid, 1132, math.max(0, getPlayerStorageValue(cid, 1132)) + 1) end doTeleportThing(cid, nodes[item.actionid]) doSendMagicEffect(nodes[item.actionid], CONST_ME_TELEPORT) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "To travel by ore wagons you must purchase a wagon ticket from any kazordoon's merchant.") end return true end
  11. Caso não funcione espere alguem mais experiente em mecher com scripts tentar ajudar :
  12. Tenta agora :
  13. Tenta esse para o NPC : "data/npc/lokur.xml" <?xml version="1.0" encoding="UTF-8"?> <npc name="Lokur" script="Lokur.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100" /> <look type="69" head="57" body="79" legs="60" feet="114" corpse="6007" /> <voices> <voice text="If you need help with letters or parcels, just ask me. I can explain everything." interval2="100" margin="1" yell="no"/> <voice text="Also selling weekly tickets for the ore wagon service!" interval2="120" margin="1" yell="no"/> <voice text="Welcome to the post office!" interval2="90" margin="1" yell="no"/> </voices> <parameters> <parameter key="message_greet" value="How may I help you |PLAYERNAME|? Ask me for a {trade} if you want to buy something. I can also explain the {mail} system, sell {tickets} for the ore wagon service or give you access to your {bank} account."/> <parameter key="message_farewell" value="Come back if you need my services, |PLAYERNAME|."/> <parameter key="message_walkaway" value="Come back if you need my services, |PLAYERNAME|." /> <parameter key="message_sendtrade" value="Here. Don't forget that you need to buy a label too if you want to send a parcel. Always write the name of the {receiver} in the first line and the name of the {city} in the second line." /> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="parcel,2595,15;letter,2597,8;label,2599,1;" /> </parameters> </npc> "data/npc/scripts/lokur.lua" local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local transaction = {} local transfer = {} local transfer_name = {} 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 local function getMoneyCount(s) local b, e = s:find("%d+") return b and e and tonumber(s:sub(b, e)) or -1 end local function doPlayerAddSafeMoney(cid, money) moneyAdd = money freeCap = getPlayerFreeCap(cid) crystalCoins = money >= 10000 and money / 10000 or 0 money = money - crystalCoins * 10000 platinumCoins = money >= 100 and money / 100 or 0 money = money - platinumCoins * 100 goldCoins = money if(freeCap >= (crystalCoins * 0.1 + platinumCoins * 0.1 + goldCoins * 0.1) and doPlayerAddMoney(cid, moneyAdd)) then return true else return false end end -- Check Balance if(msgcontains(msg, "balance")) then balance = getPlayerBalance(cid) if(balance > 100000 and balance < 1000000) then msg = "You certainly have made a pretty penny. " elseif(balance > 1000000 and balance < 10000000) then msg = "Wow, you have reached the magic number of a million gp!!! " elseif(balance > 10000000) then msg = "I think you must be one of the richest inhabitants of Tibia! " elseif (balance < 100000) then msg = "" end npcHandler:say(msg .. "Your account balance is " .. balance .. " gold.", cid) -- Deposit All elseif(msg == "deposit all") then if(getPlayerMoney(cid) > 0) then npcHandler:say("Do you really want to deposit " .. getPlayerMoney(cid) .. " to your bank account?", cid) transaction[talkUser] = getPlayerMoney(cid) talkState[talkUser] = 1 else npcHandler:say("You don't have any money with you.", cid) transaction[talkUser] = 0 talkState[talkUser] = 0 end -- Withdraw Money elseif(msgcontains(msg, "withdraw")) then npcHandler:say("How much money would you like to withdraw from your bank account?", cid) talkState[talkUser] = 2 elseif(talkState[talkUser] == 2) then if tonumber(msg) == nil then npcHandler:say("Please tell me a {number} you want to withdraw.", cid) talkState[talkUser] = 2 return true end if(tonumber(msg) > 0 and getMoneyCount(msg) <= getPlayerBalance(cid)) then npcHandler:say("Would you like to withdraw " .. getMoneyCount(msg) .. " gold from your bank account?", cid) transaction[talkUser] = getMoneyCount(msg) talkState[talkUser] = 3 elseif (tonumber(msg) < 1) then npcHandler:say("Sure, you want nothing you get nothing!", cid) talkState[talkUser] = 0 elseif(getMoneyCount(msg) < 1) then npcHandler:say("How much money would you like to withdraw from your bank account?", cid) elseif(getMoneyCount(msg) > getPlayerBalance(cid)) then npcHandler:say("You don't have enought money on your bank account.", cid) talkState[talkUser] = 0 end -- Deposit Money elseif(msgcontains(msg, "deposit")) then npcHandler:say("How much money would you like to deposit to your bank account?", cid) talkState[talkUser] = 4 elseif(talkState[talkUser] == 4) then if tonumber(msg) == nil then npcHandler:say("Please tell me a {number} you want to deposit.", cid) talkState[talkUser] = 4 return true end if(tonumber(msg) > 0 and getMoneyCount(msg) <= getPlayerMoney(cid)) then npcHandler:say("Would you like to deposit " .. getMoneyCount(msg) .. " gold to your bank account?", cid) transaction[talkUser] = getMoneyCount(msg) talkState[talkUser] = 5 elseif(tonumber(msg) < 1) then npcHandler:say("You are joking, aren't you??", cid) talkState[talkUser] = 0 elseif(getMoneyCount(msg) < 1) then npcHandler:say("How much money would you like to deposit to your bank account?", cid) elseif(getMoneyCount(msg) > getPlayerMoney(cid)) then npcHandler:say("You don't have enought money with you.", cid) talkState[talkUser] = 0 end -- Transfer Money elseif(msgcontains(msg, "transfer")) then npcHandler:say("Who do you want transfer money to?", cid) talkState[talkUser] = 6 elseif(talkState[talkUser] == 6) then if(getPlayerGUIDByName(string.lower(msg)) > 0 and string.lower(msg) ~= string.lower(getCreatureName(cid))) then transfer[talkUser] = getPlayerGUIDByName(string.lower(msg)) transfer_name[talkUser] = string.lower(msg) npcHandler:say("How much money would you like to transfer?", cid) talkState[talkUser] = 7 else npcHandler:say("There is no such player.", cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 7) then if tonumber(msg) == nil then npcHandler:say("Please tell me a {number} you want to transfer.", cid) talkState[talkUser] = 7 return true end if(tonumber(msg) > 0 and getMoneyCount(msg) <= getPlayerBalance(cid)) then npcHandler:say("Would you like to transfer " .. getMoneyCount(msg) .. " to " .. transfer_name[talkUser] .. "?", cid) transaction[talkUser] = getMoneyCount(msg) talkState[talkUser] = 8 elseif(tonumber(msg) < 1) then npcHandler:say("Please think about it. Okay?", cid) talkState[talkUser] = 0 elseif(getMoneyCount(msg) < 0) then npcHandler:say("How much money would you like to transfer?", cid) elseif(getMoneyCount(msg) > getPlayerMoney(cid)) then npcHandler:say("You don't have enought money on your bank account.", cid) talkState[talkUser] = 0 end -- Yes elseif(msgcontains(msg, "yes")) then if(talkState[talkUser] == 1) then if(getPlayerMoney(cid) == transaction[talkUser]) then doPlayerRemoveMoney(cid, transaction[talkUser]) doPlayerSetBalance(cid, getPlayerBalance(cid)+ transaction[talkUser]) npcHandler:say("You deposited " .. transaction[talkUser] .. " gold coins to your bank account.", cid) transaction[talkUser] = 0 talkState[talkUser] = 0 else npcHandler:say("You don't have enought money.", cid) transaction[talkUser] = 0 talkState[talkUser] = 1 end elseif(talkState[talkUser] == 3) then if(doPlayerAddSafeMoney(cid, transaction[talkUser])) then doPlayerSetBalance(cid, getPlayerBalance(cid)- transaction[talkUser]) npcHandler:say("You withdrawed " .. transaction[talkUser] .. " gold coins from your bank account.", cid) else npcHandler:say("You don't have anought capacity or slots in backpack to withdraw " .. transaction[talkUser] .. " gold.", cid) end transaction[talkUser] = 0 talkState[talkUser] = 0 elseif(talkState[talkUser] == 5) then if(transaction[talkUser] <= getPlayerMoney(cid)) then doPlayerRemoveMoney(cid, transaction[talkUser]) doPlayerSetBalance(cid, getPlayerBalance(cid)+ transaction[talkUser]) npcHandler:say("You deposited " .. transaction[talkUser] .. " gold coins to your bank account.", cid) transaction[talkUser] = 0 talkState[talkUser] = 0 else npcHandler:say("You don't have enought money.", cid) transaction[talkUser] = 0 talkState[talkUser] = 1 end elseif(talkState[talkUser] == 8) then if(transaction[talkUser] <= getPlayerMoney(cid)) then doPlayerRemoveMoney(cid, transaction[talkUser]) doPlayerSetBalance(cid, getPlayerBalance(cid)- transaction[talkUser]) npcHandler:say("You transfered " .. transaction[talkUser] .. " gold coins to " .. transfer_name[talkUser] .. "'s bank account.", cid) if(getPlayerByName(""..transfer_name[talkUser].."")) then doPlayerSetBalance(getPlayerByName(""..transfer_name[talkUser]..""), getPlayerBalance(getPlayerByName(""..transfer_name[talkUser].."")) + transaction[talkUser]) else transferGold(""..transfer_name[talkUser].."", transaction[talkUser]) end transaction[talkUser] = 0 transfer[talkUser] = 0 transfer_name[talkUser] = "" talkState[talkUser] = 0 else npcHandler:say("You don't have enought money.", cid) transaction[talkUser] = 0 talkState[talkUser] = 1 end end elseif(msgcontains(msg, "no")) then npcHandler:say("The customer is king! Come back anytime you want to if you wish to withdraw your money.", cid) talkState[talkUser] = 0 end -- WAGON TICKET if(msgcontains(msg, "ticket")) then if(getPlayerStorageValue(cid, 1131) < os.time()) then npcHandler:say("Do you want to purchase a weekly wagon ticket for 250 gold?", cid) talkState[talkUser] = 1 end elseif(msgcontains(msg, "yes")) then if(talkState[talkUser] == 1) then if(getPlayerMoney(cid) >= 250) then doPlayerRemoveMoney(cid, 250) setPlayerStorageValue(cid, 1131, os.time() + 7 * 24 * 60 * 60 * 1000) npcHandler:say("Thank you for purchasing a wagon ticket.", cid) else npcHandler:say("You don't have enought money.", cid) end talkState[talkUser] = 0 end elseif(talkState[talkUser] == 1) then if(msgcontains(msg, "no")) then npcHandler:say("No then.", cid) talkState[talkUser] = 0 end -- WAGON TICKET end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  14. ViitinG postou uma resposta no tópico em Suporte Tibia OTServer
    O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de Scripts" Para: "OTServ → Suporte OTServ → Suporte de Programação"
  15. Tenta :
  16. Você deve estar abrindo o .s3db errado.. Abrá seu config.lua e veja se o .s3db que você está abrindo é o mesmo que o servidor está usando.
  17. Após adicionar a database abra a aba Tables>Accounts,depois clique na opção "Data" que está na janela Accounts. Para ver qual é a account de tal character vá em Tables>Players,clique na opção "Data" da janela Players,veja o nome do character que deseja pege o account_id do character e procure o ID na janela Account.
  18. Para editar com o programa é só abrir o arquivo .s3db com o SQLite Studio. Download SQLite Studio : http://sqlitestudio.pl/?act=download
  19. Use o programa SQLite Studio para ver e editar as contas caso seu servidor for sqlite,se for mysql use o phpmyadmin !
  20. Entendi.. Tenta usar este então : local config = { broadcast = {}, 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 = "" else text = "" end text = text .. "" .. seconds .. "" doBroadcastMessage(text) end if(seconds > 0) then addEvent(executeSave, config.events * 1000, seconds - config.events) else doSaveServer(config.shallow) end end function onThink(interval) if(table.maxn(config.broadcast) == 0) then doSaveServer(config.shallow) else executeSave(config.delay) end return true end
  21. Kd meu arrozz cuidado com sub-moderação. Caso alguem faça double post reporte e algum membro da staff irá alertar o mesmo !
  22. Cara oque eu estou te passando não é globalevents é talkactions,pensei que você queria o script de /save.. Globalevents tenta esse : local shutdownAtServerSave = false local cleanMapAtServerSave = false local function serverSave() if shutdownAtServerSave then Game.setGameState(GAME_STATE_SHUTDOWN) else Game.setGameState(GAME_STATE_NORMAL) end if cleanMapAtServerSave then cleanMap() end saveServer() end local function secondServerSaveWarning() broadcastMessage("Server is saving game in one minute. Please go to a safe place.", MESSAGE_STATUS_WARNING) addEvent(serverSave, 60000) end local function firstServerSaveWarning() broadcastMessage("Server is saving game in 3 minutes. Please go to a safe place.", MESSAGE_STATUS_WARNING) addEvent(secondServerSaveWarning, 120000) end function onTime(interval) broadcastMessage("Server is saving game in 5 minutes. Please go to a safe place.", MESSAGE_STATUS_WARNING) Game.setGameState(GAME_STATE_STARTUP) addEvent(firstServerSaveWarning, 120000) return not shutdownAtServerSave end Use está tag : <globalevent name="Server Save" time="09:55:00" script="serversave.lua"/>
  23. Tente este de um servidor 10.37 : local savingEvent = 0 function onSay(cid, words, param) if getPlayerAccess(cid) ~= 0 then if isNumber(param) == TRUE then stopEvent(savingEvent) save(tonumber(param) * 60 * 1000) else saveServer() end end end function save(delay) saveServer() if delay > 0 then savingEvent = addEvent(save, delay, delay) end end
  24. Grilo cuidado com flood você reviveu um tópico de 2013 ! Leia as regras : http://www.tibiaking.com/forum/topic/1281-regras-gerais/?p=7680
  25. Tenta esse : local savingEvent = 0 function onSay(cid, words, param, channel) local tmp = tonumber(param) if(tmp ~= nil) then stopEvent(savingEvent) save(tmp * 60 * 1000) elseif(param:trim() == '') then doSaveServer(13) else local tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") else doPlayerSave(tid) end end return true end function save(delay) doSaveServer(13) if(delay > 0) then savingEvent = addEvent(save, delay, delay) end end

Informação Importante

Confirmação de Termo