Tudo que Myalitth postou
-
Problema Zombie Event
Correto, porem agora, inverteu os papeis, quem some com 1 unico hit é o zumbi...
-
Problema Zombie Event
Estou tendo um problema no meu script do zombie event... Os zumbis são sumonados, porem com um ataque eles "matam" os jogadores... O código do Zumbi <monster name="Zombie Event" nameDescription="an event zombie" race="undead" experience="480" speed="170" manacost="0"> <health now="20000" max="20000"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="1000" min="-700" max="-1350"/> </attacks> <defenses armor="0" defense="0"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> <immunity fire="1"/> <immunity energy="1"/> <immunity poison="1"/> </immunities> <voices interval="4000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <script> <event name="ZombieThink"/> <event name="ZombieDeath"/> </script> <loot> </loot> </monster> E segue o onattack.lua function loseOnZombieArena(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ixi! Voce ja era.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 6119, 2, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ganhou o evento zumbi.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) local width = (math.max(ZE_spawnFromPosition.x, ZE_spawnToPosition.x) - math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)) / 2 + 1 local height = (math.max(ZE_spawnFromPosition.y, ZE_spawnToPosition.y) - math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)) / 2 + 1 local centerPos = {x=math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)+width,y=math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)+height,z=ZE_spawnFromPosition.z} for z = math.min(ZE_spawnFromPosition.z, ZE_spawnToPosition.z), math.max(ZE_spawnFromPosition.z, ZE_spawnToPosition.z) do centerPos.z = z for i, uid in pairs(getSpectators(centerPos, width, height, false)) do if(isMonster(uid)) then doRemoveCreature(uid) end end end end end function onStatsChange(target, cid, changetype, combat, value) if((cid and isMonster(cid) and getCreatureName(cid) == "Zombie Event") or (isInRange(getThingPosition(target), ZE_spawnFromPosition, ZE_spawnToPosition) and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target))) then doCreatureAddHealth(target, getCreatureMaxHealth(target)) loseOnZombieArena(target) return false end return true end Obrigado!!!
- [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)
- [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)
-
Site não abre por causa de permissão
Forbidden You don't have permission to access / on this server. Ao criar conta no Gesior, o site não abre, sou o dono do server e uso hoster. e tambem da erro no site as vezes uso apache no Ubuntu 14~ alguém sabe como arruma isso?
- Quantos esse vps aguenta
-
Player não consegue logar depois de morrer
Verifique a posição do templo no config.lua e no seu banco de dados defina os id das towns pelo RME e verifique seu config.php
-
Erro: Warning - Protocol::RSA_decrypt] Not valid packet size
Vai em config.lua e verifica autoBanishUnknownBytes = true [se tiver false/no, altere] Entra em seu banco de dados e execute: SET max_allowed_packet GLOBAL = 16776192;
-
erro de bau da quest
É um problema no ID que foi configurado na CAIXA da quest, ou no item.
- [ERROR NPC] Não carrega no mapa
- Server não fica on
-
ATTACK AO MEU SERVIDOR
Não é ataque ao seu servidor, isto acontece quando alguém se conecta ao servidor com bot baseado em proxy (como BlackD, Elfbot), telnet. Tente substituir a função (OFC, não testada!) EM src/protocol.cpp PHP: void Protocol :: onRecvMessage ( NetworkMessage & msg ) PHP: void Protocol :: onRecvMessage ( NetworkMessage & msg ) { #ifdef __DEBUG_NET_DETAIL__ std :: cout << "Protocol::onRecvMessage" << std :: endl ; #endif if( m_encryptionEnabled ) { #ifdef __DEBUG_NET_DETAIL__ std :: cout << "Protocol::onRecvMessage - decrypt" << std :: endl ; #endif if (! XTEA_decrypt ( msg ) && g_config . getBool ( ConfigManager :: BAN_UNKNOWN_BYTES )) { int64_t banTime = - 1 ; ViolationAction_t action = ACTION_BANISHMENT ; Account tmp = IOLoginData :: getInstance ()-> loadAccount ( player -> getAccount (), true ); tmp . warnings ++; if( tmp . warnings >= g_config . getNumber ( ConfigManager :: WARNINGS_TO_DELETION )) action = ACTION_DELETION ; else if( tmp . warnings >= g_config . getNumber ( ConfigManager :: WARNINGS_TO_FINALBAN )) { banTime = time ( NULL ) + g_config . getNumber ( ConfigManager :: FINALBAN_LENGTH ); action = ACTION_BANFINAL ; } else banTime = time ( NULL ) + g_config . getNumber ( ConfigManager :: BAN_LENGTH ); if( IOBan :: getInstance ()-> addAccountBanishment ( tmp . number , banTime , 13 , action , "Sending not valid unencrypted message to the server." , 0 , player -> getGUID ())) { IOLoginData :: getInstance ()-> saveAccount ( tmp ); player -> sendTextMessage ( MSG_INFO_DESCR , "You have been banished." ); g_game . addMagicEffect ( player -> getPosition (), MAGIC_EFFECT_WRAPS_GREEN ); Scheduler :: getInstance (). addEvent ( createSchedulerTask ( 1000 , boost :: bind ( & Game :: kickPlayer , & g_game , player -> getID (), false ))); } } } parsePacket ( msg ); } E mudar no config.lua [Lua] autoBanishUnknownBytes = true [Se tiver False]
-
Ajuda com otserver global
Este é um problema nas actions, abre o seu mapa no RME e checa as ACtion ID.
-
Shop System não adiciona itens de jeito nenhum
Altere seu SHOP.LUA por este. -- ### 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 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 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 .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS 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 ..' << from OTS 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 Coloca no Globalevents.xml esta tag: <globalevent name="Shop" interval="60000" script="shop.lua" />
-
[ERRO] War system p/ 8.60
Altere por esta: -- Feary's WAR LUA -- Created: 6/13/2014 -- Last Update: 6/13/2014 -- To Do List -- -- -- includes include('include/functions.lua') -- Gear Sets function get_sets() --includes --include('include/autoexec.lua') include('include/binds.lua') -- Get WAR Gearsets include('Gearsets/'..player.name..'/WAR_Gearsets.lua') -- Define Default Values for Variables Mode = 0 PDT = 0 MDT = 0 ShadowType = 'None' GreatAxes = T{'Castigation','Sverga'} GreatSwords = T{} end function file_unload() clear_binds() end function self_command(command) -- Lock PDT if command == 'PDT' then if PDT == 1 then windower.add_to_chat(121,'PDT Unlocked') -- make sure other values are set to default PDT = 0 -- Unlock MDT set and equip Current TP set MDT = 0 -- Place Me in my previous set. if player.status == 'Engaged' then previous_set() else equip(sets.idle.Standard) end else -- Make sure other values are set to default MDT = 0 -- Set PDT set and equip it PDT = 1 equip(sets.idle.PDT) windower.add_to_chat(121,'PDT Set Locked') end -- Lock MDT elseif command == 'MDT' then if MDT == 1 then -- make sure other values are set to default PDT = 0 -- Unlock MDT set and equip Current TP set MDT = 0 windower.add_to_chat(121,'MDT Unlocked') -- Place Me in my previous set. if player.status == 'Engaged' then previous_set() else equip(sets.idle.Standard) end else -- make sure other values are set to default PDT = 0 -- lock MDT set and equip it MDT = 1 equip(sets.idle.MDT) windower.add_to_chat(121,'MDT Set Locked') end elseif command == 'TP' then if PDT == 1 or MDT == 1 then -- Reset to Default PDT = 0 MDT = 0 -- Place me in previous set if player.status == 'Engaged' then previous_set() else equip(sets.idle.Standard) end else if Mode >= 2 then -- Reset to 0 Mode = 0 else -- Increment by 1 Mode = Mode + 1 end -- Place me in previous set if player.status == 'Engaged' then previous_set() else equip(sets.idle.Standard) end end elseif command == 'twilight' then -- Twilight Helm/Mail logic if player.equipment.head == 'Twilight Helm' and player.equipment.body == 'Twilight Mail' then enable('head','body') if player.status == "Engaged" then -- equip appropriate set previous_set() else equip(sets.idle.Standard) end windower.add_to_chat(121, 'Twilight Unequipped') else equip({head="Twilight Helm",body="Twilight Mail"}) end end end -- Gain or lose buffs function buff_change(buff,g_or_l) -- Global Status include('include/status.lua') end function status_change(new,old) if T{'Idle','Resting'}:contains(new) then if areas.Town:contains(world.zone) then windower.add_to_chat(121, "Town Gear") equip(sets.misc.Town) else if PDT == 1 then if buffactive['Weakness'] or player.hpp < 30 then equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"}) else equip(sets.idle.PDT) end elseif MDT == 1 then equip(sets.idle.MDT) elseif new == "Resting" then equip(sets.Resting) else equip(sets.idle.Standard) end end elseif new == 'Engaged' then -- Automatically activate Hasso when engaging if player.sub_job["SAM"] and not buffactive['Hasso'] and not buffactive.Amnesia and not buffactive.Obliviscence and not buffactive.Paralysis and windower.ffxi.get_ability_recasts()[138] < 1 then windower.send_command('Hasso') end -- Engaged Sets if PDT == 1 then if buffactive['Weakness'] or player.hpp < 30 then equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"}) else equip(sets.idle.PDT) end elseif MDT == 1 then equip(sets.idle.MDT) else -- Equip apporiate sets previous_set() end end end function precast(spell,arg) -- Job Abilities if spell.type == 'JobAbility' then if sets.precast.JA[spell.name] then equip(sets.precast.JA[spell.name]) end -- Weaponskills elseif spell.type == 'WeaponSkill' then if player.status == 'Engaged' then if player.tp >= 100 then if spell.target.distance <= 5 then if buffactive["Mighty Strikes"] then if sets.precast.WS.MS[spell.name] then equip(sets.precast.WS.MS[spell.name]) else equip(sets.precast.WS.MS) end else if Mode == 1 then if sets.precast.WS.Acc[spell.name] then equip(sets.precast.WS.Acc[spell.name]) else if sets.precast.WS[spell.name] then equip(sets.precast.WS[spell.name]) else equip(sets.precast.WS) end end else if sets.precast.WS[spell.name] then equip(sets.precast.WS[spell.name]) else equip(sets.precast.WS) end end end else cancel_spell() windower.add_to_chat(121, 'Canceled '..spell.name..'.'..spell.target.name..' is Too Far') end else cancel_spell() windower.add_to_chat(121, ''..player.tp..'TP is not enough to WS') end else cancel_spell() windower.add_to_chat(121, 'You must be Engaged to WS') end elseif spell.type:endswith('Magic') then -- Cancel Sneak if spell.name == 'Sneak' and buffactive.Sneak and spell.target.type == 'SELF' then windower.ffxi.cancel_buff(71) cast_delay(0.3) end -- Magic spell gear handling(Precast) elseif spell.type == 'Ninjutsu' then equip(sets.precast.Fastcast) if windower.wc_match(spell.name,'Utsusemi*') then equip(sets.precast.Utsusemi) end else -- Special handling to remove Dancer sub job Sneak effect if spell.name == 'Spectral Jig' and buffactive.Sneak then windower.ffxi.cancel_buff(71) cast_delay(0.3) elseif windower.wc_match(spell.name,'Curing*') then equip(sets.misc.Waltz) elseif windower.wc_match(spell.name,'*Step') then equip(sets.misc.Steps) elseif windower.wc_match(spell.name,'*Flourish') then equip(sets.misc.flourish) end end end function midcast(spell,arg) if spell.type == 'Ninjutsu' then -- Gear change to Damage Taken set when in midcast of Utsusemi -- Special handling to remove Utsusemi, Sneak, and Stoneskin effects if they are active if windower.wc_match(spell.name,'Utsusemi*') then equip(sets.precast.Utsusemi) if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then if buffactive['Copy Image'] then windower.ffxi.cancel_buff(66) elseif buffactive['Copy Image (2)'] then windower.ffxi.cancel_buff(444) elseif buffactive['Copy Image (3)'] then windower.ffxi.cancel_buff(445) elseif buffactive['Copy Image (4+)'] then windower.ffxi.cancel_buff(446) end end elseif spell.name == 'Monomi: Ichi' or spell.name == 'Sneak' and buffactive.Sneak and spell.target.type == 'SELF' then windower.ffxi.cancel_buff(71) end end end function aftercast(spell,arg) -- Engaged if player.status == 'Engaged' then if PDT == 1 then if buffactive['Weakness'] or player.hpp < 30 then equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"}) else equip(sets.idle.PDT) end elseif MDT == 1 then equip(sets.idle.MDT) else previous_set() end else if PDT == 1 then if buffactive['Weakness'] or player.hpp < 30 then equip(sets.idle.PDT,{head="Twilight Helm",body="Twilight Mail"}) else equip(sets.idle.PDT) end elseif MDT == 1 then equip(sets.idle.MDT) else equip(sets.idle.Standard) end end -- Changes shadow type variable to allow cancel Copy Image if last cast was Utsusemi: Ni if spell and spell.name == 'Utsusemi: Ni' then ShadowType = 'Ni' elseif spell and spell.name == 'Utsusemi: Ichi' then ShadowType = 'Ichi' end end function previous_set() slot_lock() -- Great Axe if GreatAxes:contains(player.equipment.main) then if Mode == 1 then if buffactive.Ionis and areas.Adoulin:contains(world.area) then equip(sets.TP.GA.Acc.Ionis) --windower.add_to_chat(121,'Ionis buffed') else equip(sets.TP.GA.Acc) end elseif Mode == 2 then equip(sets.TP.Hybrid) else if buffactive.Ionis and areas.Adoulin:contains(world.area) then equip(sets.TP.GA.Ionis) --windower.add_to_chat(121,'Ionis buffed') else equip(sets.TP.GA) end end elseif GreatSwords:contains(player.equipment.main) then if Mode == 1 then equip(sets.TP.GS.Acc) elseif Mode == 2 then equip(sets.TP.Hybrid) else equip(sets.TP.GS) end else if Mode == 1 then equip(sets.TP.Acc) elseif Mode == 2 then equip(sets.TP.Hybrid) else equip(sets.TP) end end end function slot_lock() -- Twilight Helm/Mail logic if player.equipment.head == 'Twilight Helm' and player.equipment.body == 'Twilight Mail' then disable('head','body') else enable('head','body') end if player.equipment.left_ear == 'Reraise Earring' then disable('left_ear') windower.add_to_chat(8,'Reraise Earring equiped on left ear') elseif player.equipment.right_ear == 'Reraise Earring' then disable('right_ear') windower.add_to_chat(8,'Reraise Earring equiped on right ear') else enable('left_ear','right_ear') end end
-
[Duvida] Cidade no Site
Resolvido! Muito Obrigado
-
[Duvida] Cidade no Site
Estou com um problema, pois no meu site, aparecem as cidades do tibia global [do meu outro servidor], porém, o servidor que estou fazendo o site é um BAIAK, é lógicamente não tem venore,carlin,etc... Grato!