Ir para conteúdo

Fir3element

Héroi
  • Registro em

  • Última visita

Tudo que Fir3element postou

  1. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 talkState, talkUser = {}, NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, "promot") then npcHandler:say("Do you want to be promoted in your vocation for 20000 gold?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if(getPlayerStorageValue(cid, 30018) == 1) then npcHandler:say('You are already promoted.', cid) elseif(getPlayerLevel(cid) < 20) then npcHandler:say('You need to be at least level 20 in order to be promoted.', cid) elseif getPlayerMoney(cid) < 20000 then npcHandler:say('You do not have enough money.', cid) elseif getConfigInfo("freePremium") == "yes" or isPremium(cid) == TRUE then npcHandler:say("Congratulations! You are now promoted. You have learned new spells.", cid) local promotedVoc = getPromotedVocation(getPlayerVocation(cid)) doPlayerSetVocation(cid, promotedVoc) doPlayerRemoveMoney(cid, 20000) else npcHandler:say("You need a premium account in order to promote.", cid) end talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  2. roubando wifi danado mesmo q desbloqueasse no roteador, teria q fazer o mesmo no modem
  3. corrige essa parte ae: registerMethod("Player", "getLevel", LuaScriptInterface::luaPlayerGetResets); registerMethod("Player", "getLevel", LuaScriptInterface::luaPlayerSetResets); acho q o certo é isso: registerMethod("Player", "getResets", LuaScriptInterface::luaPlayerGetResets); registerMethod("Player", "setResets", LuaScriptInterface::luaPlayerSetResets);
  4. não sei como funciona o padrão dos bytes, sou leigo nessa parte :s otclient é bom e open source, acho q tem link aqui no fórum
  5. http://sourceforge.net/projects/boost/files/boost-binaries/1.59.0/boost_1_59_0-msvc-14.0-64.exe/download
  6. tem abre o projeto no vs 2015, dps vai nas propriedades e muda essa parte aq
  7. qual grupo? provavelmente n sobre os bugs, tenho todos fixados nessa source aq: https://github.com/fir3element/forgottenserver036/archive/master.zip
  8. normal, nd demais
  9. na pasta do sdk 2.0, remove a mpir e coloca a q te mandei no lugar
  10. fui tentar aqui e deu a msm coisa, atualizei a lib mpir e deu certo tenta ai: http://www.mediafire.com/download/m3mx2uq24hnf3nt/mpir.rar
  11. declarou o arquivo errado no xml
  12. source do otserv, tem tutoriais na área de programação
  13. usa a busca q vc vai encontrar
  14. ta usando as libs certas? verifica os diretórios tbm
  15. 1. byte errado 2. source do client
  16. cara faz mt tempo q n mexo com isso mas acho q era na função Game::shutdown() no arquivo game.cpp é só por uma função pra salvar nela
  17. seu dev cpp não tem as libs pra compilar otserv
  18. sem modificar a source n tem jeito e n precisa usar GUI para salvar ao fechar, dá pra mudar isso no console
  19. ficou bom os detalhes.. continue assim haha
  20. -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 18 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.storeQuery("SELECT * FROM z_ots_comunication") if(result_plr ~= false) then repeat local id = tonumber(result.getDataInt(result_plr, "id")) local action = tostring(result.getDataString(result_plr, "action")) local delete = tonumber(result.getDataInt(result_plr, "delete_it")) local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name"))) if(cid) then local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1")) local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2")) local container_id = tonumber(result.getDataInt(result_plr, "param3")) local container_count = tonumber(result.getDataInt(result_plr, "param4")) local add_item_type = tostring(result.getDataString(result_plr, "param5")) local add_item_name = tostring(result.getDataString(result_plr, "param6")) local storage = tostring(result.getDataString(result_plr, "param7")) local received_item = 0 local full_weight = 0 if(add_item_type == 'container') then container_weight = getItemWeight(container_id, 1) if(isItemRune(itemtogive_id)) then items_weight = container_count * getItemWeight(itemtogive_id, 1) else items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeight(itemtogive_id, itemtogive_count) if(isItemRune(itemtogive_id)) then full_weight = getItemWeight(itemtogive_id, 1) else full_weight = getItemWeight(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if(full_weight <= free_cap) then if(add_item_type == 'container') then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while(iter ~= container_count) do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from ArenaTibia Shop.') setPlayerStorageValue(cid,storage+555884621212,1) db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, ' '.. add_item_name ..' from ArenaTibia Shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, ' '.. add_item_name ..' ArenaTibia Shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end until not result.next(result_plr) result.free(result_plr) end return true end, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") doPlayerSave(cid) else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> The item '.. add_item_name ..' << that you just bought on the website couldnt be added. Han error has ocurred, please wait '.. SQL_interval ..' seconds.. Shop ID: '.. id ..'') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
  21. Fir3element postou uma resposta no tópico em Suporte Tibia OTServer
    acho q ele esqueceu de fazer o step 3 e a outra img parece ser bug no css do layout
  22. database ta td ok?

Informação Importante

Confirmação de Termo