Elfen 0 Postado Dezembro 9, 2011 Share Postado Dezembro 9, 2011 Alguem ae Ajuda Como colcar Player N Pode Atk Player Da Guild Ja Vi alguns topicos mas nehum deles funfo e os cometarios tambe dizem q n so o unico a axar isso intao please ajuda Rep++ Link para o comentário Compartilhar em outros sites More sharing options...
jhon992 371 Postado Dezembro 9, 2011 Share Postado Dezembro 9, 2011 Vai em data/creaturescripts/scripts, duplica um arquivo e renomeia para "hitguild" sem as aspas, nele cole: function onCombat(cid, target) if getPlayerGuildName(cid) == getPlayerGuildName(target) then doPlayerSendTextMessage(cid, 27, "Voce nao pode atacar player da mesma guild.") return FALSE end return TRUE end Agora, data/creaturescripts/creaturescripts.xml, abra-o e cole a tag: <event type="combat" name="HitGuild" event="script" value="hitguild.lua"/> Por último vai em data/creaturescripts/scripts e abra o arquivo login.lua, e cole a tag: registerCreatureEvent(cid, "HitGuild") Link para o comentário Compartilhar em outros sites More sharing options...
Elfen 0 Postado Dezembro 9, 2011 Autor Share Postado Dezembro 9, 2011 Em qaul parte man eu colo o tag registerCreatureEvent(cid, "HitGuild") ------- KONFIGURACJA ---------- local antyMagebombEnabled = 1 -- czy wlaczyc AntyMagebomb? / 0 by zablokowac local maxClientsFromIp = 0 -- maksymalna liczba graczy z jednego ip / wpisz 0, by zablokowac local loginPeriodSeconds = 1 -- po co najmniej ilu sekundach dozwolone zalogowanie z tego samego ip local banAutoMagebombAccount = 1 -- automatyczna banicja KONTA Magebomb? / 0 by zablokowac local banAutoMagebombIp = 1 -- automatyczna banicja IP Magebomb? / 0 by zablokowac local banAccountPeriod = 2 * 60 * 60 -- w sekundach czas bana, domyslnie 2H local banIpPeriod = 2 * 60 * 60 -- w sekundach czas bana, domyslnie 2H ------- / KONFIGURACJA -------- local last_login = os.time(t) local last_ipaddr = 0 local magebomb_count = 0 local last_guid = 0 local last_account = 0 function onLogin(cid) if antyMagebombEnabled == 1 then local now = os.time(t) local ip = getPlayerIp(cid) local guid = getPlayerGUID(cid) local gracz = getCreatureName(cid) local playeracc = getAccountIdByName(gracz) if(ip==last_ipaddr and last_guid ~= guid and last_account ~= playeracc) then if(last_login+loginPeriodSeconds > now) then magebomb_count = magebomb_count + 1 if magebomb_count > 1 then if banAutoMagebombAccount == 1 then doAddBanishment(playeracc, banAccountPeriod, 11, 2, 'Banished by AntyMagebomb System by Infinity', 0) end if banAutoMagebombIp == 1 then doAddIpBanishment(ip, 4294967295, banIpPeriod, "Detected by AntyMagebomb System by Infinity") end end return FALSE -- wyrzuca z gry else magebomb_count = 0 end else magebomb_count = 0 end if maxClientsFromIp > 0 then local list = {} local ips = {} local players = getPlayersOnline() local i = 0 for i, pid in ipairs(players) do local ip = getPlayerIp(pid) local name = getCreatureName(pid) local tmp = table.find(ips, ip) if(tmp ~= nil) then if(table.countElements(list, ip) == 0) then list[players[tmp]] = ip end list[pid] = ip end table.insert(ips, ip) end if(table.maxn(list) > 0) then for pid, ip in pairs(list) do if getPlayerIp(cid) == ip then i=i+1 end end end if i > maxClientsFromIp and maxClientsFromIp > 0 then -- sprawdzanie ilosci graczy z tym samym IP doPlayerPopupFYI(cid,'Sorry, only 3 multi-clients allowed (from one IP), not more!') return FALSE end end end last_ipaddr = getPlayerIp(cid) last_login = os.time(t) last_guid = getPlayerGUID(cid) last_account = playeracc registerCreatureEvent(cid, "PlayerKill") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena registerCreatureEvent(cid, "repKill") registerCreatureEvent(cid, "Frags") registerCreatureEvent(cid, "Look") registerCreatureEvent(cid, "LevelBroadcast") registerCreatureEvent(cid, "BountyHunter") registerCreatureEvent(cid, "pvparena") registerCreatureEvent(cid, "castelo1") registerCreatureEvent(cid, "castelo2") registerCreatureEvent(cid, "castelo3") registerCreatureEvent(cid, "castelo4") registerCreatureEvent(cid, "pxparena") registerCreatureEvent(cid, "repLook") registerCreatureEvent(cid, "repDeath") registerCreatureEvent(cid, "Reward") registerCreatureEvent(cid, "PlayerDeath") registerCreatureEvent(cid, "onPrepareDeath") --registerCreatureEvent(cid, "MEDALS") This is God's Medal System for killing someone, Dont add this unless you use it.-- registerCreatureEvent(cid, "KilledMonstersCounter") registerCreatureEvent(cid, "logout") registerCreatureEvent(cid, "playeradvance") registerCreatureEvent(cid, "ArenaKill") -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena registerCreatureEvent(cid, "AttributePoints") if getPlayerStorageValue(cid, 47061) < 0 then setPlayerStorageValue(cid,47061,0) end local auction = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(auction:getDataInt("auction_balance") > 0) then doPlayerAddMoney(cid, auction:getDataInt("auction_balance")) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You sold item on auction, you get " .. auction:getDataInt("auction_balance") .. " gps.") db.executeQuery("UPDATE `players` SET `auction_balance` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";") auction:free() end return TRUE end Link para o comentário Compartilhar em outros sites More sharing options...
jhon992 371 Postado Dezembro 9, 2011 Share Postado Dezembro 9, 2011 pode ser junto com esses aqui: registerCreatureEvent(cid, "repKill") registerCreatureEvent(cid, "Frags") registerCreatureEvent(cid, "Look") registerCreatureEvent(cid, "LevelBroadcast") registerCreatureEvent(cid, "BountyHunter") registerCreatureEvent(cid, "pvparena") registerCreatureEvent(cid, "castelo1") registerCreatureEvent(cid, "castelo2") registerCreatureEvent(cid, "castelo3") registerCreatureEvent(cid, "castelo4") registerCreatureEvent(cid, "pxparena") registerCreatureEvent(cid, "repLook") registerCreatureEvent(cid, "repDeath") registerCreatureEvent(cid, "Reward") Link para o comentário Compartilhar em outros sites More sharing options...
Elfen 0 Postado Dezembro 9, 2011 Autor Share Postado Dezembro 9, 2011 (editado) Finalmente Um q Funfa ma tipo man o leader da guild consegue te atk se souber como colar todos mesmo da guild pra n atk agradeço Re´++ Editado Dezembro 9, 2011 por Elfen Link para o comentário Compartilhar em outros sites More sharing options...
jhon992 371 Postado Dezembro 9, 2011 Share Postado Dezembro 9, 2011 Era pra funcionar para o lider tbm, n sei pq nao esta funcionando mais tenta isso, troca essa parte do código: if getPlayerGuildName(cid) == getPlayerGuildName(target) then por essa: if getPlayerGuildId(cid) == getPlayerGuildId(target) then Link para o comentário Compartilhar em outros sites More sharing options...
Elfen 0 Postado Dezembro 9, 2011 Autor Share Postado Dezembro 9, 2011 Ae man agora funfo Te agradeço mas tarde pq limite xego vlws ;D a Proveitar me ajuda a fazer uma runa q sumona monster team se souber agradeço vlws Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados