Ir para conteúdo

AgaSsI

Membro
  • Registro em

  • Última visita

Tudo que AgaSsI postou

  1. Eu tenhoo talvez disponibilizo para download
  2. P Points System Nome do script : P Points system v1 Versão testada : TFS 0.4 (8.70 Funciona em versões anteriores) Creditos : LsM Como funciona : O sistema funciona como uma recompensa ao player por ficar online por um certo tempo. O player, ao ficar online por um certo intervalo de tempo programado no código, receberá uma quantidade de pontos "P" a qual também se pode alterar. O objetivo foi fazer com que os players se sintam incentivados a ficar online por um maior período de tempo para que recebam tais moedas. Essa é, definitivamente, uma forma fácil de se alcançar um número maior de players online, já que a ideia foi retirada de um MMORPG online de grande sucesso. Como utilizar : C omo o sistema tem como foco dar uma recompensa ao player, no caso pontos P , estes, podem ser utilizados no comercio, em npcs, ou até mesmo na entrada de locais. Sua sintaxe é muito maleável e se encaixa em quaquer requisito desejado. Instalação : Primeiramente, execute a seguinte QUERY em seu banco de dados : Código: ALTER TABLE `accounts` ADD `p_points` INTEGER NOT NULL DEFAULT 0 Em seguida, crie um arquivo com a extensão .lua chamado " points.lua " em " data/creaturescripts/scripts " e adicione o código abaixo : Código: --[[ P Points System by LsM. OTServ Brasil &#169; 2011 Version : v1.0 ]]-- function onLogin(cid) doCreatureSetStorage(cid, 1219, os.time()) return true end function onLogout(cid) doCreatureSetStorage(cid, 1219, 0) return true end Ainda em creaturescripts, abra o arquivo " creaturescripts.xml " e adicione a seguinte TAG : Código: <event type="login" name="PlayerAddPointsTimer" event="script" value="points.lua"/> <event type="logout" name="PlayerResetPointsTimer" event="script" value="points.lua"/> Agora, em " data/globalevents/script " crie um arquivo com a extensão .lua também chamado " points.lua " e cole o seguinte código : Código: --[[ P Points System by LsM. OTServ Brasil &#169; 2011 Version : v1.0 ]]-- local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- Quantidade de pontos recebida a cada "p_time" }local function givePoints(cid, quant) if os.time() - getCreatureStorage(cid, 1219) >= config.p_time then doPlayerSendTextMessage(cid, 19, "Congratulations, you recieved ".. config.p_points .." p points. Now you have ".. config.p_points + getPoints(cid) .." p points in your account. Your timer was reseted.") doPlayerAddPoints(cid, quant) doCreatureSetStorage(cid, 1219, 0) doCreatureSetStorage(cid, 1219, os.time()) end return true end function onThink(interval) for i, v in pairs(getPlayersOnline()) do givePoints(v, config.p_points) end return true end E em " globalevents.xml " cole a seguinte TAG : Código: <globalevent name="points" interval="60" event="script" value="points.lua"/> Em seguida vá em " data/talkactions/scripts ", crie um arquivo com extensão .lua chamado " points.lua " e adicione o seguinte código : Código: function onSay(cid, words, param, channel) local getP = getPoints(cid) doPlayerPopupFYI(cid, "You have ".. getP .." P points.") return true end E em " talkactions.xml " adicione a TAG : Código: <talkaction words="!ppoints;/ppoints" event="script" value="points.lua"/> Para finalizar, vá em " data/lib/050-function.lua " e na última linha, adicione as funções abaixo : Código: function getPoints(cid) local res = db.getResult('select `p_points` from accounts where name = \''..getPlayerAccount(cid)..'\'') if(res:getID() == -1) then return false end local ret = res:getDataInt("p_points") res:free() return tonumber(ret) end function doPlayerAddPoints(cid, quant) return db.executeQuery("UPDATE `accounts` SET `p_points` = '".. getPoints(cid) + quant .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end function doPlayerRemovePoints(cid, quant) return db.executeQuery("UPDATE `accounts` SET `p_points` = '".. getPoints(cid) - quant .."' WHERE `name` ='"..getPlayerAccount(cid).."'") end Fim, o sistema está instalado. Como configurar : A parte da configuração é a mais fácil, apenas edite : Código: [/size] [/font] local config = { p_time = 3600, -- Tempo em segundos para receber os pontos( 3600 = 1hora ) p_points = 1 -- Quantidade de pontos recebida a cada "p_time" } Quer utilizar o sistema em um npc, ou action, ou algum outro sistema e não sabe como? Simples, apenas use as seguintes funções : getPoints(cid) A função retorna a quantidade de pontos do player. doPlayerAddPoints(cid, quant) A função adiciona a quantidade(quant) de pontos ao player. doPlayerRemovePoints(cid, quant) A função remove a quantidade(quant) de pontos do player. Ilustração : Funcionamento do script Ilustração de !ppoints Creditos: LsM A í está galera, espero que gostem, e, para os preguiçosos, disponibilizei o download do sistema completo: http://www.4shared.c...nts_System.html
  3. SAHUUHASSUH deliciosos não ?
  4. Nome do Script: Stamina Doll Autor: Não sei o autor, pois foi um amigo meu que me passou! Testado em: Styller 8.6 É um script simples e util, bom para servidores com mapa Global com site. Instalando: Vá em ...data/actions/scripts, e crie um arquivo chamado stamina-refuel.lua e cole isto dentro: Código: function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") elseif(not isPremium(cid)) then doPlayerSendCancel(cid, "You must have a premium account.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") doRemoveItem(item.uid) end return true end Em actions cole a seguinte tag: Código: <action itemid="ID DO SEU DOLL AQUI" script="stamina-refuel.lua"/> Onde está "ID DO SEU DOLL AQUI", coloque o número do doll que você deseja. Geralmente utilizam Santa Doll ou Nightmare Doll. *6512 *11138 Grato!
  5. Em coloque: Código: <action itemid="7588-7591;8472-8473;7618;7620;8704" event="script" value="potions.lua"/> Em apague o que tem dentro e cole: local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "yes", range = -1, realAnimation = "no" -- make text effect visible only for players in range 1x1 } local min, max = 0, 0 local POTIONS = { [8704] = {empty = 7636, splash = 42, health = {1.0, 1.25}, min = 50, max = 100}, -- small health potion [7618] = {empty = 7636, splash = 42, health = {1.25, 1.75}, min = 50, max = 150}, -- health potion [7588] = {empty = 7634, splash = 42, health = {1.75, 2.25}, min = 0, max = 350, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 42, health = {2.25, 2.5}, min = 0, max = 500, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 42, health = {2.5, 3.0}, min = 0, max = 800, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 47, mana = {1.0, 1.5}, min = 50, max = 150}, -- mana potion [7589] = {empty = 7634, splash = 47, mana = {1.5, 2.0}, min = 0, max = 250, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 47, mana = {2.0, 2.5}, min = 0, max = 350, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 43, health = {1.25, 2.25}, mana = {1.25, 2.25}, min = 0, max = 320, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } for index, potion in pairs(POTIONS) do if(type(index) == "number")then for k, v in pairs(config) do if(not potion[k]) then potion[k] = v end end if(potion.removeOnUse) then potion.removeOnUse = getBooleanFromString(potion.removeOnUse) end if(potion.usableOnTarget) then potion.usableOnTarget = getBooleanFromString(potion.usableOnTarget) end if(potion.splashable) then potion.splashable = getBooleanFromString(potion.splashable) end if(potion.realAnimation) then potion.realAnimation = getBooleanFromString(potion.realAnimation) end POTIONS[index] = potion end end function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not potion.usableOnTarget and cid ~= itemEx.uid)) then if(not potion.splashable or not potion.splash) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPosition(item.uid) end doDecayItem(doCreateItem(POOL, potion.splash, toPosition)) doRemoveItem(item.uid, 1) if(not potion.empty or potion.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end if(((potion.level and getPlayerLevel(itemEx.uid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(itemEx.uid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end if(potion.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getThingPosition(cid), getThingPosition(itemEx.uid)) > potion.range) then return false end local x = getPlayerLevel(cid) local min_, max_ = potion.min, potion.max local health = potion.health if health then local hp = math.ceil(math.random(health[1] * x, health[2] * x)) if hp < min_ then hp = math.random(min_, max_) elseif hp > max_ then hp = math.random(max_, max_ + 100) end doCreatureAddHealth(itemEx.uid, hp) end local mana = potion.mana if mana then local mp = math.ceil(math.random(mana[1] * x, mana[2] * x)) if mp < min_ then mp = math.random(min_, max_) elseif mp > max_ then mp = math.random(max_, max_ + 100) end doPlayerAddMana(itemEx.uid, mp) end doSendMagicEffect(getThingPosition(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not potion.realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doRemoveItem(item.uid, 1) if(not potion.empty or potion.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end Ps:Antes de substituir o seu potions.lua faça 1 backup =] Creditos: J.Dre
  6. Não tem muito oque explicar pelo nome, vocês já sabem. Vá na pasta talkactions/script e crie um arquivo com nome de sexy.lua e cole o seguinte script: -- Sexy System(Funny) by Cobraa. function prepareToSexy(ela, ele) doCreatureSetLookDir(ela, 3) pos = getThingPos(ela) doTeleportThing(ele, {x=pos.x+3, y=pos.y, z=pos.z}) doCreatureSetLookDir(ele, 3) mayNotMove(ele, true) mayNotMove(ela, true) end function Sexy(ela, ele, rounds) if rounds < 1 then mayNotMove(ele, false) mayNotMove(ela, false) setPlayerStorageValue(ele, 8958, -1) setPlayerStorageValue(ela, 8958, -1) return true end msg = {"OOHH!", "OMG", "FAST", "FUCK ME"} pos = getThingPos(ela) doTeleportThing(ele, {x=pos.x+1, y=pos.y, z=pos.z}) addEvent(doTeleportThing, 500, ele, {x=pos.x+3, y=pos.y, z=pos.z}) doSendAnimatedText(pos, msg[math.random(#msg)], math.random(255)) setPlayerStorageValue(ele, 8958, 1) setPlayerStorageValue(ela, 8958, 1) addEvent(Sexy, 1000, ela, ele, rounds-1) end function onSay(cid, words, param) if words == "!sex" then x = getPlayerByName(param) if x then if getPlayerSex(cid) == 0 then return doPlayerSendTextMessage(cid, 27, "Uma garota tem que ser convidada.") end if param == getCreatureName(cid) then return doPlayerSendTextMessage(cid, 27, "Isto n&#227;o &#233; possivel") end if getDistanceBetween(getThingPos(cid), getThingPos(x)) > 4 then return doPlayerSendTextMessage(cid, 27, "Este player est&#225; muito longe para tranzar.") end if getPlayerStorageValue(x, 8958) == 1 or getPlayerStorageValue(cid, 8958) == 1 then return doPlayerSendTextMessage(cid, 27, "Voc&#234; ou a pessoa que convidou est&#225; tranzando neste momento.") end setPlayerStorageValue(x, 8956, cid) setPlayerStorageValue(x, 8957, 1) doPlayerSendTextMessage(x, 19, getCreatureName(cid)..", te convidou para tranzar, diga !aceitar ou !recusar") doPlayerSendTextMessage(cid, 19, getCreatureName(x)..", foi convidado(a) para tranzar aguarde sua resposta.") else doPlayerSendTextMessage(x, 27, "Player Not Found.") end elseif words == "!aceitar" then if getPlayerStorageValue(cid, 8957) == 1 then if getDistanceBetween(getThingPos(cid), getThingPos(getPlayerStorageValue(cid, 8956))) > 4 then return doPlayerSendTextMessage(cid, 27, "Este player est&#225; muito longe para dar uma resposta.") end doPlayerSendTextMessage(cid, 19, "Voc&#234; aceitou o convite de "..getCreatureName(getPlayerStorageValue(cid, 8956))..".") doPlayerSendTextMessage(getPlayerStorageValue(cid, 8956), 19, "Seu convite foi aceito.") setPlayerStorageValue(cid, 8957, -1) prepareToSexy(cid, getPlayerStorageValue(cid, 8956)) addEvent(Sexy, 800, cid, getPlayerStorageValue(cid, 8956), 20) else doPlayerSendTextMessage(cid, 27, "Voc&#234; n&#227;o tem nenhum convite de tranza para aceitar.") end elseif words == "!recusar" then if getPlayerStorageValue(cid, 8957) == 1 then if getDistanceBetween(getThingPos(cid), getThingPos(getPlayerStorageValue(cid, 8956))) > 4 then return doPlayerSendTextMessage(cid, 27, "Este player est&#225; muito longe para dar uma resposta.") end doPlayerSendTextMessage(cid, 19, "Voc&#234; recusou o convite de "..getCreatureName(getPlayerStorageValue(cid, 8956))..".") doPlayerSendTextMessage(getPlayerStorageValue(cid, 8956), 19, "Seu convite foi recusado.") setPlayerStorageValue(cid, 8957, -1) else doPlayerSendTextMessage(cid, 27, "Voc&#234; n&#227;o tem nenhum convite de tranza para recusar.") end end return true end Depois na pasta talkactions procure o arquivo talkactions.xml e adicione a seguinte tag: <talkaction words="!sex;!aceitar;!recusar" event="script" value="sexy.lua"/> Para convidar alguem para fazer sexo , use o comando: !sex Nome do Player Para responder use !aceitar ou !recusar CREDITOS: Cobraa Obrigado a todos.
  7. tava procurando ele em outro forum e resolvi trazar p/ vocês. espero que serve para mais alguem já estou colocando os devido credito.
  8. Bolacha ou Biscoito ainda bem que eu não como isso Coitado do mlk, não resistiu a tentação e olha no que deu "/
  9. Itens mais vendidos no seu site Preview: Tutorial: 1° Passo: Abra seu shopsystem.php e procure elseif($buy_offer['type'] == 'item') { e abaixo disso $SQL->query($save_transaction); Cole isso: $bought = 'UPDATE `z_shop_offer` SET `bought` = bought + 1 WHERE `id` ='.$buy_offer['id'].';'; $SQL->query($bought); 2° Passo: Abra seu latestnews.php e procure <?PHP $time = time(); e abaixo disso cole: $query = $SQL->query("SELECT * FROM `z_shop_offer`WHERE `offer_type` NOT LIKE 'container' AND `offer_type` NOT LIKE 'changename' AND `offer_type` NOT LIKE 'vipdays' AND `offer_type` NOT LIKE 'redskull' AND `offer_type` NOT LIKE 'unban' ORDER BY `bought` DESC LIMIT 5"); foreach($query as $rows) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $result .= ' <td bgcolor='.$bgcolor.'> <center> <img src="item_images/'.$rows['itemid1'].'.gif"> <br /><br /> Item:</br> <b>'.$rows['offer_name'].'</b><br /> Points: <b>'.$rows['points'].'</b> </center> </td>'; } $main_content .= "<table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\"><tr bgcolor=".$config['site']['vdarkborder']."><td class=\"white\" colspan=\"5\"><center><strong>&#218;ltimos itens vendidos no Shopping</strong></center></td></tr><tr bgcolor=".$config['site']['vdarkborder']."><td class=\"white\" width=\"20%\"><b><center>#1</center></b></td><td class=\"white\" width=\"20%\"><b><center>#2</center></b></td> <td class=\"white\" width=\"20%\"><b><center>#3</center></b></td> <td class=\"white\" width=\"20%\"><b><center>#4</center></b></td> <td class=\"white\" width=\"20%\"><b><center>#5</center></b></td> </tr>".$result."</table> <br />"; 2° Passo: Para finalizar execute essa query em seu phpMyAdmin ALTER TABLE `z_shop_offer` ADD `bought` INT( 11 ) NOT NULL DEFAULT '0'; Prontinho, script irá funcionar 100% se seguir passa-a-passo corretamente. Script original by: Aleh Obrigado, REP ++!
  10. Vou postar o tão famoso Guild War System Com Escudos. Vou começar pelo site : Vá em Xampp/Htdocs e crie e um arquivo chamado wars.php,dentro add isto: <?php $main_content = "<h1 align=\"center\">Guild Wars</h1> <script type=\"text/javascript\"><!-- function show_hide(flip) { var tmp = document.getElementById(flip); if(tmp) tmp.style.display = tmp.style.display == 'none' ? '' : 'none'; } --></script> <a onclick=\"show_hide('information'); return false;\" style=\"cursor: pointer;\"><h1><center>&#187; Click to se the commands &#171;<center></h1></a> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" id=\"information\" style=\"display: none;\";> <tr align=\"center\"><b>You must send this commands in GUILD CHAT.</tr> <tr style=\"background: #512e0b;\"><td align=\"center\" class=\"white\"><b>Command</b></td><td colspan=\"2\" align=\"center\" class=\"white\"><b>Description</b></td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/war invite, guild name, fraglimit</b></td><td>Sends an invitation to start the war. Example: <font color=red><BR>/war invite, Chickens, 150<BR></font><B>(Invite a guild to war with 150 frags count.)</B></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/war invite, guild name, fraglimit, money</b></td><td>Send the invitation to start the war. Example: <font color=red><BR>/war invite, Chickens, 150, 10000</font><br><B> (Invite a guild to war with 150 frags count and payment of 10000 gold coins <- you need donate to guild to use it.)<B></td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/war accept, guild name</b></td><td>Accepts the invitation to start a war. Example: <font color=red><BR>/war accept, Chickens</font><BR><B>(Accept the war against guild \"Chickens\".)</b></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/war reject, guild name</b></td><td>Rejects the invitation to start a war. Example: <font color=red><BR>/war reject, Chickens</font><BR><B>(Reject a invitation to war from Chickens.)</B></td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/war cancel, guild name</b></td><td>Cancels the invitation. Example: <font color=red><BR>/war cancel, Chickens</font><br><b>(Cancel my guild invitation to war with Chickens.)</b></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/balance</b></td><td>See the guild balance - balance of money.</td></tr> <tr style=\"background: #F1E0C6;\"><td><b>/balance donate value</b></td><td>Deposits money on the guild's bank account. All players can donate. Example: <font color=red><BR>/balance donate 100000 </font><BR><B>(You will donate 100k to your guild balance.)</B></td></tr> <tr style=\"background: #D4C0A1;\"><td><b>/balance pick value</b></td><td>Withdraws money from the guild's bank account. Can be used only by the guild leader. Example: <font color=red><BR>/balance pick 100000 </font><BR><B>(You will withdraw 100k from your guild balance.)</B></td></tr> </table> <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\"> <tr> <td style=\"background: #512e0b\" class=\"white\" width=\"150\"><b>Aggressor</b></td> <td style=\"background: #512e0b\" class=\"white\"><b>Information</b></td> <td style=\"background: #512e0b\" class=\"white\" width=\"150\"><b>Enemy</b></td> </tr><tr style=\"background: #F1E0C6;\">"; $count = 0; foreach($SQL->query('SELECT * FROM `guild_wars` WHERE `status` IN (1,4) OR ((`end` >= (UNIX_TIMESTAMP() - 604800) OR `end` = 0) AND `status` IN (0,5));') as $war) { $a = $ots->createObject('Guild'); $a->load($war['guild_id']); if(!$a->isLoaded()) continue; $e = $ots->createObject('Guild'); $e->load($war['enemy_id']); if(!$e->isLoaded()) continue; $alogo = $a->getCustomField('logo_gfx_name'); if(empty($alogo) || !file_exists('guilds/' . $alogo)) $alogo = 'default_logo.gif'; $elogo = $e->getCustomField('logo_gfx_name'); if(empty($elogo) || !file_exists('guilds/' . $elogo)) $elogo = 'default_logo.gif'; $count++; $main_content .= "<tr style=\"background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\"> <td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$a->getId()."\"><img src=\"guilds/".$alogo."\" width=\"64\" height=\"64\" border=\"0\"/><br />".$a->getName()."</a></td> <td align=\"center\">"; switch($war['status']) { case 0: { $main_content .= "<b>Pending acceptation</b><br />Invited on " . date("M d Y, H:i:s", $war['begin']) . " for " . ($war['end'] > 0 ? (($war['end'] - $war['begin']) / 86400) : "unspecified") . " days. The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " bronze coins." : "without any payment.")."<br />Will expire in three days."; break; } case 3: { $main_content .= "<s>Canceled invitation</s><br />Sent invite on " . date("M d Y, H:i:s", $war['begin']) . ", canceled on " . date("M d Y, H:i:s", $war['end']) . "."; break; } case 2: { $main_content .= "Rejected invitation<br />Invited on " . date("M d Y, H:i:s", $war['begin']) . ", rejected on " . date("M d Y, H:i:s", $war['end']) . "."; break; } case 1: { $main_content .= "<font size=\"6\"><span style=\"color: red;\">" . $war['guild_kills'] . "</span> : <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span></font><br /><br /><span style=\"color: darkred; font-weight: bold;\">On a brutal war</span><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ($war['end'] > 0 ? ", will end up at " . date("M d Y, H:i:s", $war['end']) : "") . ".<br />The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " bronze coins." : "without any payment."); break; } case 4: { $main_content .= "<font size=\"6\"><span style=\"color: red;\">" . $war['guild_kills'] . "</span> : <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span></font><br /><br /><span style=\"color: darkred;\">Pending end</span><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ", signed armstice on " . date("M d Y, H:i:s", $war['end']) . ".<br />Will expire after reaching " . $war['frags'] . " frags. ".($war['payment'] > 0 ? "The payment is set to " . $war['payment'] . " bronze coins." : "There's no payment set."); break; } case 5: { $main_content .= "<i>Ended</i><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ", ended on " . date("M d Y, H:i:s", $war['end']) . ". Frag statistics: <span style=\"color: red;\">" . $war['guild_kills'] . "</span> to <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span>."; break; } default: { $main_content .= "Unknown, please contact with gamemaster."; break; } } $main_content .= "<br /><br /><a onclick=\"show_hide('war-details:" . $war['id'] . "'); return false;\" style=\"cursor: pointer;\">&#187; Details &#171;</a></td> <td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$e->getId()."\"><img src=\"guilds/".$elogo."\" width=\"64\" height=\"64\" border=\"0\"/><br />".$e->getName()."</a></td> </tr> <tr id=\"war-details:" . $war['id'] . "\" style=\"display: none; background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\"> <td colspan=\"3\">"; if(in_array($war['status'], array(1,4,5))) { $deaths = $SQL->query('SELECT `pd`.`id`, `pd`.`date`, `gk`.`guild_id` AS `enemy`, `p`.`name`, `pd`.`level` FROM `guild_kills` gk LEFT JOIN `player_deaths` pd ON `gk`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `gk`.`war_id` = ' . $war['id'] . ' AND `p`.`deleted` = 0 ORDER BY `pd`.`date` DESC')->fetchAll(); if(!empty($deaths)) { foreach($deaths as $death) { $killers = $SQL->query('SELECT `p`.`name` AS `player_name`, `p`.`deleted` AS `player_exists`, `k`.`war` AS `is_war` FROM `killers` k LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id` LEFT JOIN `players` p ON `p`.`id` = `pk`.`player_id` WHERE `k`.`death_id` = ' . $death['id'] . ' ORDER BY `k`.`final_hit` DESC, `k`.`id` ASC')->fetchAll(); $count = count($killers); $i = 0; $others = false; $main_content .= date("j M Y, H:i", $death['date']) . " <span style=\"font-weight: bold; color: " . ($death['enemy'] == $war['guild_id'] ? "red" : "lime") . ";\">+</span> <a href=\"index.php?subtopic=characters&name=" . urlencode($death['name']) . "\"><b>".$death['name']."</b></a> "; foreach($killers as $killer) { $i++; if($killer['is_war'] != 0) { if($i == 1) $main_content .= "killed at level <b>".$death['level']."</b> by "; else if($i == $count && $others == false) $main_content .= " and by "; else $main_content .= ", "; if($killer['player_exists'] == 0) $main_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">"; $main_content .= $killer['player_name']; if($killer['player_exists'] == 0) $main_content .= "</a>"; } else $others = true; if($i == $count) { if($others == true) $main_content .= " and few others"; $main_content .= ".<br />"; } } } } else $main_content .= "<center>There were no frags on this war so far.</center>"; } else $main_content .= "<center>This war did not began yet.</center>"; $main_content .= "</td> </tr>"; } if($count == 0) $main_content .= "<tr style=\"background: ".$config['site']['darkborder'].";\"> <td colspan=\"3\">Currently there are no active wars.</td> </tr>"; $main_content .= "</table>"; $main_content .= '<div align="right"><small><b>Customized by: <a href="http://www.tibiaking.com/forum/user/240289-walef-xavier">Walef Xavier</a></b></small></div><br />'; ?> Agora vá em Xampp/Htdocs/index.php e add o seguinte: case "wars"; $subtopic = "wars"; $topic = "Guild Wars"; include("wars.php"); break; Agora para finalizar a parte do site vá em Xampp/Htdocs/Layout/Tibiacom/layout.php e add o seguinte: <a href='?subtopic=wars'> <div id='submenu_wars' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_polls' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><font color=red>Guild Wars</font></div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> </a> Agora vamos para seu Ot: Va em GlobalEvents/scripts/start.lua e add o seguinte: executeQuery("DELETE FROM `guild_wars` WHERE `status` = 0 AND `begin` < " .. (os.time() - 2 * 86400) .. ";") db.executeQuery("UPDATE `guild_wars` SET `status` = 5, `end` = " .. os.time() .. " WHERE `status` = 1 AND `end` > 0 AND `end` < " .. os.time() .. ";") Agora vá em Lib e crie um arquivo .lua chamado 101-war,dentro add o seguinte: WAR_GUILD = 0 WAR_ENEMY = 1 Agora para finalizar vamos colocar os comandos em Talkactions ! Vá em Talkactions/scripts e crie dois arquivos chamados war.lua e balance.lua,dentro add o seguinte: War.lua function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true balance.lua local function isValidMoney(value) if(value == nil) then return false end return (value > 0 and value <= 99999999999999) end function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(guild == 0) then return false end local t = string.explode(param, ' ', 1) if(getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER and isInArray({ 'pick' }, t[1])) then if(t[1] == 'pick') then local money = { tonumber(t[2]) } if(not isValidMoney(money[1])) then doPlayerSendChannelMessage(cid, '', 'Invalid amount of money specified.', TALKTYPE_CHANNEL_W, 0) return true end local result = db.getResult('SELECT `balance` FROM `guilds` WHERE `id` = ' .. guild) if(result:getID() == -1) then return false end money[2] = result:getDataLong('balance') result:free() if(money[1] > money[2]) then doPlayerSendChannelMessage(cid, '', 'The balance is too low for such amount.', TALKTYPE_CHANNEL_W, 0) return true end if(not db.query('UPDATE `guilds` SET `balance` = `balance` - ' .. money[1] .. ' WHERE `id` = ' .. guild .. ' LIMIT 1;')) then return false end doPlayerAddMoney(cid, money[1]) doPlayerSendChannelMessage(cid, '', 'You have just picked ' .. money[1] .. ' money from your guild balance.', TALKTYPE_CHANNEL_W, 0) else doPlayerSendChannelMessage(cid, '', 'Invalid sub-command.', TALKTYPE_CHANNEL_W, 0) end elseif(t[1] == 'donate') then local money = tonumber(t[2]) if(not isValidMoney(money)) then doPlayerSendChannelMessage(cid, '', 'Invalid amount of money specified.', TALKTYPE_CHANNEL_W, 0) return true end if(getPlayerMoney(cid) < money) then doPlayerSendChannelMessage(cid, '', 'You don\'t have enough money.', TALKTYPE_CHANNEL_W, 0) return true end if(not doPlayerRemoveMoney(cid, money)) then return false end db.query('UPDATE `guilds` SET `balance` = `balance` + ' .. money .. ' WHERE `id` = ' .. guild .. ' LIMIT 1;') doPlayerSendChannelMessage(cid, '', 'You have transfered ' .. money .. ' money to your guild balance.', TALKTYPE_CHANNEL_W, 0) else local result = db.getResult('SELECT `name`, `balance` FROM `guilds` WHERE `id` = ' .. guild) if(result:getID() == -1) then return false end doPlayerSendChannelMessage(cid, '', 'Current balance of guild ' .. result:getDataString('name') .. ' is: ' .. result:getDataLong('balance') .. ' bronze coins.', TALKTYPE_CHANNEL_W, 0) result:free() end return true end Agora vá em Talkactions/talkactions.xml e add as duas tags: <talkaction words="/war" channel="0" event="script" value="war.lua" desc="(Guild channel command) War management."/> <talkaction words="/balance" channel="0" event="script" value="balance.lua" desc="(Guild channel command) Balance management."/> Pronto,seu Guild War Systema está instalado...mas para funcionar necessitará das tabelas na sua database e do Tfs 0.4 .Vou posta-los abaixo,respectivamente. .:: Tabelas ::. Para quem ainda não sabe add tabelas a sua database,vou ensinar: Acesse seu phpmyadmin,digite sua senha (caso tenha),clique no nome da sua database a esquerda,assim que carregar a sua database clique em SQL lá em cima...Aparecerá um espaço em branco lá voce irá add as seguintes tabelas...e depois clicar em Executar. CREATE TABLE IF NOT EXISTS `guild_wars` ( `id` INT NOT NULL AUTO_INCREMENT, `guild_id` INT NOT NULL, `enemy_id` INT NOT NULL, `begin` BIGINT NOT NULL DEFAULT '0', `end` BIGINT NOT NULL DEFAULT '0', `frags` INT UNSIGNED NOT NULL DEFAULT '0', `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0', `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0', `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0', `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `status` (`status`), KEY `guild_id` (`guild_id`), KEY `enemy_id` (`enemy_id`) ) ENGINE=InnoDB; ALTER TABLE `guild_wars` ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE; ALTER TABLE `guilds` ADD `balance` BIGINT UNSIGNED NOT NULL AFTER `motd`; CREATE TABLE IF NOT EXISTS `guild_kills` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `guild_id` INT NOT NULL, `war_id` INT NOT NULL, `death_id` INT NOT NULL ) ENGINE = InnoDB; ALTER TABLE `guild_kills` ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE; ALTER TABLE `killers` ADD `war` INT NOT NULL DEFAULT 0; Pronto o Guild Wars System está totalmente instalado! Creditos: Walef Xavier sei que o topico ta ruim maiis ta aii o war system
  11. creaturescripts.xml <event type="login" name="aloot_reg" event="script" value="aloot.lua"/> <event type="kill" name="aloot_kill" event="script" value="aloot.lua"/> creaturescripts/scritps aloot.lua function onLogin(cid) registerCreatureEvent(cid, "aloot_kill") return true end local stor = 7575 function autoloot(cid, target, pos) local function doStack(cid, itemid, new) local count = getPlayerItemCount(cid, itemid) if (count > 100) then count = count - math.floor(count / 100) * 100 end local newCount = count + new if (count ~= 0) then local find = getPlayerItemById(cid, true, itemid, count).uid if (find > 0) then doRemoveItem(find) else newCount = new end end local item = doCreateItemEx(itemid, newCount) doPlayerAddItemEx(cid, item, true) end local function scanContainer(cid, uid, list) for k = (getContainerSize(uid) - 1), 0, -1 do local tmp = getContainerItem(uid, k) if (isInArray(list, tmp.itemid)) then if isItemStackable(tmp.itemid) and (getPlayerItemCount(cid, tmp.itemid) > 0) then doStack(cid, tmp.itemid, tmp.type) else local item = doCreateItemEx(tmp.itemid, tmp.type) doPlayerAddItemEx(cid, item, true) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Looted ' .. tmp.type .. ' ' .. getItemNameById(tmp.itemid) .. '.') doRemoveItem(tmp.uid) elseif isContainer(tmp.uid) then scanContainer(cid, tmp.uid, list) end end end local items = {} for i = getTileInfo(pos).items, 1, -1 do pos.stackpos = i table.insert(items, getThingFromPos(pos)) end if (#items == 0) then return end local corpse = -1 for _, item in ipairs(items) do local name = getItemName(item.uid):lower() if name:find(target:lower()) then corpse = item.uid break end end if (corpse ~= -1) and isContainer(corpse) then scanContainer(cid, corpse, tostring(getPlayerStorageValue(cid, stor)):gsub('_', ''):explode(',')) end end function onKill(cid, target, lastHit) if not isPlayer(target) then local infos = getPlayerStorageValue(cid, stor) if (infos == -1) then return true end local list = tostring(infos):explode(',') if (#list == 0) then return true end addEvent(autoloot, 150, cid, getCreatureName(target), getCreaturePosition(target)) end return true end talkactios.xml <talkaction words="/aloot" hide="yes" event="script" value="aloot.lua"/> Talkaction/scrips local stor, limit = 7575, 5 --storage, limit to add. local allow_container = false --empty! not looted with items, atleast for now. function onSay(cid, words, param) local expl = param:explode(':') local action, rst = expl[1], expl[2] if (action:lower() == 'check') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):explode(',') end local txt = 'Autoloot List:\n' if (#list > 0) then for k, id in ipairs(list) do id = id:gsub('_', '') if tonumber(id) then txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '') end end else txt = 'Empty' end doPlayerPopupFYI(cid, txt) elseif (action:lower() == 'add') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not allow_container and isItemContainer(item) then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end local attrs = getItemInfo(item) if not attrs then return doPlayerSendCancel(cid, 'not valid item.') elseif not attrs.movable or not attrs.pickupable then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end if isInArray(list, item) then return doPlayerSendCancel(cid, 'already added.') end table.insert(list, tostring(item)) local new = '' for v, id in ipairs(list) do new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.') elseif (action:lower() == 'remove') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list == 0) then return doPlayerSendCancel(cid, 'You dont have any item added.') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not isInArray(list, item) then return doPlayerSendCancel(cid, 'This item is not in the list.') end local new = '' for v, id in ipairs(list) do if (tonumber(id) ~= item) then new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.') end return true end Usando /aloot check Cheka a Lista dos Loots /aloot add:itemid ou nome do item Exemplo /aloot add:worm /aloot add:2170 16:42 Item >>worm<< has been added to the autoloot list. Para remover /aloot remove:worm /aloot remove:2170 Exemplo Testado: 16:41 Looted 2 gold coin. 16:41 Looted 1 cheese. CREDITOS: eduardobean é isso pessoal gosto da + Rep
  12. Esse script é basicamente o seguinte, você ta cansado dakele Varkhal que qualquer noob level 8 vai la e compra a full addon, então que tal um sistema que, apenas os merecedores podem ter as addons? Que tal uma fonte que, ao clicar o player ganha uma full addon???? Gostou? Ai vai: Abra a pasta do seu OT>Data>Actions>Actions.xml Coloque isso em qualquer lugar entre o <actions> e o </actions>: <action uniqueid="8913" script="addons.lua"> <action uniqueid="8914" script="addons.lua"> <action uniqueid="8915" script="addons.lua"> <action uniqueid="8916" script="addons.lua"> Salve, feche, e abra a pasta Scripts; Copie e cole qualquer arquivo LUA; Renomeie para addons; Abra, apague tudo e cole isso: if item.uid == 8913 then queststatus = getPlayerStorageValue(cid,1500) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the citizen addon full.") doPlayerAddOutfit(cid, 128, 3) doPlayerAddOutfit(cid, 136, 3) setPlayerStorageValue(cid,1500,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8914 then queststatus = getPlayerStorageValue(cid,1600) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the hunter addon full.") doPlayerAddOutfit(cid, 129, 3) doPlayerAddOutfit(cid, 137, 3) setPlayerStorageValue(cid,1600,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8915 then queststatus = getPlayerStorageValue(cid,1700) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the mage addon full.") doPlayerAddOutfit(cid, 138, 3) doPlayerAddOutfit(cid, 130, 3) setPlayerStorageValue(cid,1700,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 8916 then queststatus = getPlayerStorageValue(cid,1800) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found the knight addon full.") doPlayerAddOutfit(cid, 139, 3) doPlayerAddOutfit(cid, 131, 3) setPlayerStorageValue(cid,1800,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end else return 0 end return 1 end Ai vocês editam, mudam ali o "doPlayerAddOutfit(cid, 131, 3)" pro addon que vocês querem Citizen: 136/128 - 3 Hunter: 137/129 - 3 Mage: 138/130 - 3 Knight: 139/131 - 3 Nobleman: 140/132 - 3 Summoner: 141/133 - 3 Warrior: 142/134 - 3 Barbarian: 147/143 - 3 Druid: 148/144 - 3 Wizard: 149/145 - 3 Oriental: 150/146 - 3 Pirate: 155/151 - 3 Assassin: 156/152 - 3 Beggar: 157/153 - 3 Shaman: 158/154 - 3 Norseman: 252/151 - 3 Nightmare: 269/268 - 3 Jester: 270/273 - 3 Brotherhood: 279/278 - 3 Demonhunter: 288/289 - 3 Yalaharian: 342/325 - 3 Creditos: Danitero

Informação Importante

Confirmação de Termo