Jump to content

juniorsilva

Members
  • Posts

    212
  • Joined

  • Last visited

  • Days Won

    5

juniorsilva last won the day on May 15 2022

juniorsilva had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

juniorsilva's Achievements

Newbie

Newbie (1/14)

805

Reputation

  1. Está em modo DHCP o ip é configurado automático .... basta ir em # ifconfig .......
  2. Definição de hostname é invalido, basta alterar para thor.servegame.com ....
  3. Hmmm..... A função d.new_jump_party() cria um salto do grupo porém não funciona se o mapa entre um e outro estiver em núcleos diferente...... Adicione ambos no mesmo núcleo (65,66) ch1.....
  4. verifique se o cliente contém esse item 30190 em item_proto e se as definições de itens estão correta.....
  5. Possivelmente você adicionou em um local incorreto faz o teste com essa e se continuar execute a quest com o npc dentro da torre, porém aqui funciona normalmente, não precisei por o npc dentro da torre.... deviltower_zone.lua
  6. Vá em common/tables.h (typedef struct SPlayerTable) e altere: short hp; short sp; short sRandomHP; short sRandomSP; Por int hp; int sp; int sRandomHP; int sRandomSP; short = -32,768 / 32,767 int = -2,147,483,648 / 2,147,483,647 Obs: não testei ....
  7. Simples .... Vamos lá, primeiro você precisa ir na quest deviltower_zone e adicionar essa nova função e a nova opção no Guarda da Torre: -- Nova ação na torre function party_member_count() local pids = {party.get_member_pids()} local count = 0 for i = 1, table.getn(pids) do count = i end return count end when deviltower_man.chat."Quero subir" with party.is_leader() and deviltower_zone.party_member_count() >= 4 begin say_title(mob_name(npc.get_race())) say("") say("Olá "..pc.get_name()..", quer subir torre ?") say("") local s=select("Sim","Não") if s==2 then return end notice_all("O grupo de "..pc.get_name().." está subindo torre agora.") timer("devil_is_party1_1", 3) end when devil_is_party1_1.timer begin d.new_jump_party(66, special.devil_tower[1][1], special.devil_tower[1][2]) d.regen_file("data/dungeon/deviltower2_regen.txt") d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt") end -- Fim da nova ação na torre Depois é só instalar a quest novamente e dar /reload q ou reiniciar o servidor .... Bem, isso é tudo qualquer dúvida ou bug é só comentar ......
  8. necessário update de varbinary para varchar ... ALTER TABLE player.item_proto MODIFY name varchar(24) NOT NULL DEFAULT 'Noname' COLLATE latin1_swedish_ci; ALTER TABLE player.item_proto MODIFY locale_name varchar(24) NOT NULL DEFAULT 'Noname' COLLATE latin1_swedish_ci; ALTER TABLE player.mob_proto MODIFY name varchar(24) NOT NULL DEFAULT 'Noname' COLLATE latin1_swedish_ci; ALTER TABLE player.mob_proto MODIFY locale_name varchar(24) NOT NULL DEFAULT 'Noname' COLLATE latin1_swedish_ci; Obs: faça backup antes de usar a query.....
  9. add nessa condição o tipo de item.... if ((item2->GetType() == ITEM_WEAPON) || (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY)) exemplo ... if ((item2->GetType() == ITEM_WEAPON) || (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY) || (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_HEAD)) Caso você queira em todos os itens do nível 40-, altere a condição de um modo a trabalhar com todos, exemplo... if (item->GetVnum() == 71151 || item->GetVnum() == 76023) { //if ((item2->GetType() == ITEM_WEAPON) //|| (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY)) //{ bool bCanUse = true; for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { if (item2->GetLimitType(i) == LIMIT_LEVEL && item2->GetLimitValue(i) > 40) { bCanUse = false; break; } } if (false == bCanUse) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Àû¿ë ·¹º§º¸´Ù ³ô¾Æ »ç¿ëÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù.")); break; } } //else //{ //ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¹«±â¿Í °©¿Ê¿¡¸¸ »ç¿ë °¡´ÉÇÕ´Ï´Ù.")); //break; //} Boa sorte....
  10. Diz que falta o arquivo na pasta XTrap/Xtrap_C_Interface.h ......
  11. Não seria mais fácil assim? Vá em questlua_npc.cpp e adicione abaixo da função: int npc_set_vid_damage_mul(lua_State* L) int npc_get_max_hp(lua_State* L) { LPCHARACTER npc = CQuestManager::instance().GetCurrentNPCCharacterPtr(); lua_pushnumber(L, npc ? npc->GetMobTable().dwMaxHP : 0); return 1; } depois vá em void RegisterNPCFunctionTable() e adicione isso : { "get_max_hp", npc_get_max_hp }, abaixo da definição: {"set_vid_damage_mul", npc_set_vid_damage_mul}, Mini quest com a nova função npc.get_max_hp() : quest mob_max_hp begin state start begin when kill with not npc.is_pc() begin syschat("HP: "..npc.get_max_hp()) end end end
  12. Interessante, vejo que você está a aprender bem continue assim.
  13. Tá ai a nova função counter_monster_in_map(mapindex) ...... Vá em questlua_global.cpp e adicione isso acima da função: int _regen_in_map( lua_State * L ) int _counter_monster_in_map(lua_State * L) { DWORD iMapIndex = (DWORD)lua_tonumber(L, 1); LPSECTREE_MAP pMap = SECTREE_MANAGER::instance().GetMap(iMapIndex); if (pMap != NULL) { lua_pushnumber(L, SECTREE_MANAGER::instance().GetMonsterCountInMap(iMapIndex)); return 1; } return 0; } Depois vá em void RegisterGlobalFunctionTable(lua_State* L) e adicione abaixo da definição : "get_special_item_group", _get_special_item_group }, { "counter_monster_in_map", _counter_monster_in_map }, Mini quest com a nova função counter_monster_in_map(mapindex): quest counter_monster begin state start begin when 20095.chat."Verificar o counter_monster" with pc.is_gm() begin say("Verificar se existem monstros?") say("") local s = select("Sim","Não") if s == 2 then return end notice(string.format("Total de Mobs: %d.", counter_monster_in_map(200))) end when 20095.chat."Evento counter_monster" with pc.is_gm() begin say("Iniciar Evento PVM?") say("Status: "..game.get_event_flag("event_pvm")) say("") local s = select("Iniciar","Finalizar", "Cancelar") if s == 2 then game.set_event_flag("event_pvm", 0) clear_server_timer("check_monster") notice_all("O Evento PVM foi finalizado!") return end if s == 3 then return end game.set_event_flag("event_pvm", 1) notice_all("O Evento PVM foi iniciado!") mob.spawn_group(104, pc.get_local_x(), pc.get_local_y(), 1, 1, 1) mob.spawn(1093, pc.get_local_x(), pc.get_local_y(), 1) server_loop_timer("check_monster", 10) end when kill with not npc.is_pc() begin notice(string.format("O jogador %s matou: %s.", pc.get_name(), mob_name(npc.get_race()))) end when check_monster.server_timer begin if game.get_event_flag("event_pvm") == 1 then if counter_monster_in_map(200) == 0 then game.set_event_flag("event_pvm", 0) clear_server_timer("check_monster") notice_all("O Evento PVM foi finalizado!") end end end end end Isso é tudo boa sorte, qualquer dúvida é só comentar .....
  14. A função pc.getqf() tem um pequeno bug se você não clica em nenhum npc ao fazer o login no servidor, a função não consegue puxa os valores existente na variável, recomendo o uso da função io.open() ou mysql_query para você obter uma melhor resposta no sistema.....
×
×
  • Create New...