-
Total de itens
91 -
Registro em
-
Última visita
-
Dias Ganhos
11
Tudo que walefxavier postou
-
Vá em xammp/htdocs e crie um arquivo chamado auctionsystem.php dentro adicione isso: <?PHP $auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll(); $players = 0; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instructions<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Comandos</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />'; if(empty($auctions)) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://dynamic-world.servegame.com">WSF</a>.</small></p>'; } else { foreach($auctions as $auction) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $cost = round($auction['cost']/1000, 2); $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="images/items/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>'; } $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>'; $main_content .= ''; } ?> Agora vá em index.php e add isso: case "auctionsystem"; $topic = "Trade Offline"; $subtopic = "auctionsystem"; include("auctionsystem.php"); break; Em Htdocs/layout/tibiacom/layout.php add isto: <a href='?subtopic=auctionsystem'> <div id='submenu_auctionsystem' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'> <div class='LeftChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div> <div id='ActiveSubmenuItemIcon_auctionsystem' class='ActiveSubmenuItemIcon' style='background-image:url(layouts/tibiacom/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><blink><font color=yellow>Trade Offline</font></blink></div> <div class='RightChain' style='background-image:url(layouts/tibiacom/images/general/chain.gif);'></div> </div> </a> E adicione isso no phpmyadmin (database do seu gesior) CREATE TABLE IF NOT EXISTS `auction_system` ( `id` int(11) NOT NULL auto_increment, `player` int(11) default NULL, `item_id` int(11) default NULL, `item_name` varchar(255) default NULL, `count` int(11) default NULL, `cost` int(11) default NULL, `date` int(11) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; Agora basta acessar www.SEUSITE.com/?subtopic=auctionsystem ....
-
Tenta Esse : local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, 53) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) --setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1.2, -30, 1.6, 0) function onGetFormulaValues(cid, level, maglevel) min = (level * 2 + maglevel * 3) * 2.2 - 25 max = (level * 2 + maglevel * 3) * 2.5 if min < 250 then min = 250 end return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Me fala se deu !
-
Claro !! Vamos pegar como exemplo o Ring Of The Sky (ID 2123) Vá em Data/Items/items.xml e procure por : <item id="2123" article="a" name="ring of the sky"> <attribute key="weight" value="40" /> <attribute key="slotType" value="ring" /> </item> Basta substituir por : <item id="2123" article="a" name="ring of the sky"> <attribute key="weight" value="40" /> <attribute key="containerSize" value="24" /> <attribute key="slotType" value="ring" /> </item> Obs: Azul é o quanto de items que caberão dentro do Ring Backpack !
-
Pegue o mesmo script da sua Sudden Death e ponho na runa de Id 2264 (Uma runa que seu ot não utiliza). Script da Suden Death Rune: Crie um arquivo chamado ssdeath.lua em DAta/spells/scripts local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -100, -1, -100, 6, 6, 7, 8) local condition = createConditionObject(CONDITION_CURSED) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 5, 2000, -60) setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end Agora em Data/Spells/spells.xml add a seguinte TAG: <rune name="Sudden Death SS" id="2264" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="700" needtarget="1" blocktype="solid" script="ssdeath.lua"/> è isso ae !
-
Crie um arquivo ride.lua em talkaction/scripts , e cole isso dentro: function onSay(cid, words, param, channel) local pokes = { ['Tauros'] = {128, 200}, ['Ninetales'] = {129, 300}, ['Rapidash'] = {130, 350}, } local old_speed = getCreatureBaseSpeed(cid) local summons = getCreatureSummons(cid) if getPlayerStorageValue(cid, 20000) == 10 then local nome = getItemName(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid) local poke_name = nome:match('(.-) Pokeball') local action_id = getItemAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "aid") doChangeSpeed(cid, -(getCreatureSpeed(cid) - getCreatureBaseSpeed(cid))) doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, 20000, 7) setPlayerStorageValue(cid, 26000, 6) local monster = doCreateMonster(poke_name, getCreaturePosition(cid)) doConvinceCreature(cid, monster) doPlayerSay(cid, poke_name .. ", Stop Ride!", TALKTYPE_SAY) return true end if #getCreatureSummons(cid) < 1 then return doPlayerSendCancel(cid, "You dont have pokemon") end local pokemon = pokes[getCreatureName(getCreatureSummons(cid)[1])] local name = getCreatureName(getCreatureSummons(cid)[1]) if not pokes[name] then return doPlayerSendCancel(cid, "Pokemon not allowed.") end doChangeSpeed(cid, pokemon[2]) setPlayerStorageValue(cid, 20000, 10) setPlayerStorageValue(cid, 26000, 5) doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "aid", getCreatureHealth(getCreatureSummons(cid)[1])) function getPokemonId(summons) for _, pid in ipairs(summons) do return pid end end doRemoveCreature(getPokemonId(summons)) doPlayerSay(cid, name .. ", Let's go Ride!", TALKTYPE_SAY) end Vá em Data/talkactions/talkactions.xml e add a TAG: <talkaction words="/ride" hide="yes" event="script" value="ride.lua"/> OBs: ['Tauros'] = {128, 200}, Taurus >> Nome do poke do raid 128 >> Outfit da montaria 200 >> Velocidade que ganhará ao montar
-
Para deixar sua lista de membros da Staff mais estilizada basta vc ir em C:\xampp\htdocs/team.php e apagar tudo que está lá dentro e add isso : <style type="text/css"> tr.over:hover { background-color: lightgrey; } </style> <?php if($groups = simplexml_load_file($config['site']['server_path'].'/data/XML/groups.xml') or die('<b>Could not load groups!</b>')) foreach($groups->group as $g) $groupList[(int)$g['id']] = $g['name']; $list = $SQL->query("SELECT `name`, `online`, `group_id`, `world_id` FROM `players` WHERE `group_id` > 1 ORDER BY `group_id` DESC"); $showed_players = 0; $main_content .= '<center><h2>Support in game</h2></center><br>'; $headline = '<table border="0" cellspacing="1" cellpadding="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"> <td width="20%"><font class=white><b>Group</b></font></td> <td width="45%"><font class=white><b>Name</b></font></td> <td width="15%"><font class=white><b>Status</b></font></td> <td width="20%"><font class=white><b>World</b></font></td>'; $group_id = 0; foreach($list as $gm) { if($group_id != (int)$gm['group_id']) { if($group_id != 0) $main_content .= '</table><br />'; $main_content .= $headline; $group_id = (int)$gm['group_id']; } $main_content .= '<tr bgcolor="'.(is_int($showed_players++ / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']).'" class="over"><td>'.$groupList[(int)$gm['group_id']].'</td><td><a href="?subtopic=characters&name='.urlencode($gm['name']).'">'.$gm['name'].'</a></td><td><font color="'.($gm['online'] == 0 ? 'red">Offline' : 'green">Online').'</font></td><td>'.$config['site']['worlds'][$gm['world_id']].'</td></tr>'; } $main_content .= '</table><table border="0" cellspacing="1" cellpadding="4" width="100%"><tbody><tr><td><div style="text-align: right; margin: 20px auto; font-size: 10px;"</div></td></tr></tbody></table>'; ?> Pronto agora tem mais estilo ! rsrs
-
Vá em C:\xampp\htdocs e cria um arquivo php chamado : viplist.php,dentro add isso : <?PHP $zapytanie = $SQL->query('SELECT `player_storage`.`player_id`, `player_storage`.`key`, `player_storage`.`value`, `players`.`id`, `players`.`name`, `players`.`level`, `players`.`online` FROM `player_storage`, `players` WHERE `key` = 13540 AND `player_storage`.`player_id` = `players`.`id` ORDER BY `players`.`level` DESC;')->fetchall(); foreach($zapytanie as $zap) { $kolor++; if(is_int($kolor / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; if($zap['online'] == 0) $player_list_status = '<font color="red"><b>Offline</b></font>'; else $player_list_status = '<font color="green"><b>Online</b></font>'; $tresc .= '<TR BGCOLOR='.$bgcolor.'><TD><center><a href="?subtopic=characters&name='.urlencode($zap['name']).'">'.$zap['name'].'</a></TD><TD><center>'.$zap['level'].'</TD><TD><center>'.$player_list_status.'</center></TD></TR>'; } $main_content .= '<center><hr/><b>Jogadores Vip Do '.$config['server']['serverName'].'.</b><hr/><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white WIDTH=32%><b><center>Name</center></b></TD><TD class="white" WIDTH=32%><b><center>Level</center></b></TD><TD class="white" WIDTH=32%><b><center>Status</center></b></TD></TR>'.$tresc.'</TABLE>'; $main_content .= '<div align="right"><small><b></small></div><br />'; ?> Agora vá em C:\xampp\htdocs/index.php e depois de : case "latestnews": $topic = "Novidades"; $subtopic = "latestnews"; include("latestnews.php"); break; ADICIONE ISSO : case "viplist"; $subtopic = "viplist"; $topic = "Jogadores Vip"; include("viplist.php"); break; Agora vá em C:\xampp\htdocs\layouts\tibiacom/layout.php e add o seguinte: <a href='?subtopic=viplist'> <div id='submenu_viplist' 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_experiencetable' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div> <div class='SubmenuitemLabel'><blink><font color=grey>Jogadores VIP</font></blink></div> <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div> </div> </a> Simples !
-
Vá em Data/actions/script e crie um arquivo chamado wormsystem.lua,dentro dele adicione isso : function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == 103 then doTransformItem(itemEx.uid, 804) local rand = math.random(1, 10) doCreateItem(3976, rand, toPosition) doDecayItem(itemEx.uid) return TRUE end return destroyItem(cid, itemEx, toPosition) end Agora vá em Data/actions/actions.xml e add a TAG : <action itemid="ITEM" script="wormsystem.lua"/> Simples assim !
-
Vá em Data/actions/scripts e crie um arquivo chamado smonster.lua,dentro adicione isso : function onUse(cid, item, frompos, item2, topos) doSummonCreature("Demon",topos) doSendMagicEffect(topos,36) end Agora vá em Data/actions/actions.xml e adicione a Tag: <action itemid="8306" script="smonster.lua"/> Agora vá em seu ot e faça o teste ! Obs: Demon >> é o bixo que irá sumonar 36 >> é o efeito que irá sair ao sumonar o monstro topos >> é o onde o monstro saíra
-
Vá em Data/spells/scripts e crie um arquivo chamado icecombo.lua e dentro adicione: Agora vá em Data/spells/spells.xml e add a seguinte Tag : Prontinho !
-
[Globalevents] Lottery System
tópico respondeu ao walefxavier de walefxavier em Globalevents e Spells
Claro ! -
[Globalevents] Entregando Itens Do Site Automaticamente
um tópico no fórum postou walefxavier Globalevents e Spells
Vá em data\globalevents\scripts e crie um arquivo chamado : shop.lua Dentro dele add : -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- 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.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(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 received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("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 ..' << Seu item esta esperando por voce. Por favor faça o local para este item em sua mochila e aguarde '.. SQL_interval ..' segundos para obte-lo.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. O peso do item e '.. full_weight ..' oz., Vc tem no momento '.. free_cap ..' oz. de capacidade livre. Coloque alguns itens no deposito e espere cerca de '.. SQL_interval ..' segundos para obte-lo.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Agora vá em data\globalevents\globalevents.xml e add a tag: <globalevent name="shop" interval="30" script="shop.lua"/> Agora vá na Database do seu Ot server,acessando com o phpmyadmin,clique na sua database,em SQL e cole isto: CREATE TABLE IF NOT EXISTS `z_ots_comunication` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL default '1', PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `z_shop_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `z_shop_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `z_shop_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ); Agora aperte EXECUTAR e pronto !! Agora compre um item em seu site e faça o teste,o item chega em 30 segundos ! -
Vá em Data/GlobalEvents/scripts e crie um arquivo chamado lottery.lua E add isso : local config = { lottery_hora = "60 Minutos", reward_count = 20, website = 0 } function onThink(interval, lastExecution) local players = getPlayersOnline() local list = {} for i, tid in ipairs(players) do list[i] = tid end local winner = list[math.random(1, #list)] if(config.website == 1) then db.executeQuery("INSERT INTO `lottery` (`name`) VALUES ('".. getCreatureName(winner) .."');") end doBroadcastMessage('[Loteria Mineira] Ganhador: '.. getCreatureName(winner) ..', Recompensa: '.. config.reward_count ..'moedas! - Parabens ! (Proxima em: '.. config.lottery_hora ..')') doPlayerAddItem(winner, 2160,config.reward_count) return TRUE end Agora vá em Data/GlobalEvents/globalevents.xml e add a Tag: <globalevent name="lottery" interval="7200" event="script" value="lottery.lua"/> Obs: O "interval" são os segundos,nesse caso correspondem a 60 min. Att WSX
-
Sistema De Refinamento Em Português
tópico respondeu ao nono182 de walefxavier em Actions e Talkactions
Excelente !!! pq o do mock nao funfou aqui e com as suas modificações funcionou perfeitamente ! Parabéns ! ++REP -
Retirar [Vip] Do Nome Do Char E Adicionar [Vip] Com Item
um tópico no fórum postou walefxavier Lixeira Pública
Olá,alguem poderia me ajudar com o script que ADICIONA e RETIRA [Vip] do nome do char. Já tentei esse aki e nun deu : Tirar [Vip] Do Nome Do Player Automatico Apos Fim Da Vip Meu sistema de vip é esse aqui : -- Script SYtem vip 1.0 -- -- By Vodkart -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 5000000 if doPlayerRemoveMoney(cid, price) == TRUE then local days = 30 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13540) local timenow = os.time() if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13540, time) local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13540, time) local name = getCreatureName(cid) db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") doRemoveCreature(cid) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.") end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local name = getCreatureName(player) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13540) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) if string.find(tostring(getCreatureName(pid)),"[[Vip]]") then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13540, time) local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") else setPlayerStorageValue(player, 13540, time) db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(player)..";") doRemoveCreature(player) end end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. if(getPlayerStorageValue(C.uid,13540) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end Quem souber como retirar posta o topico por favor,to precisan urgentemente. Alguem sabe como colocar [Vip] no nome quando o player usa um item ? -
Quem tem Pet system 8.60,por favor me passa,To precisando ! Pode ser um bem simples !
-
Alguem pode me passar o script de quando o cara morre aparece no bradcast ! Tipo: Orshabaal matou Douglas
-
preciso do script Morte no BroadCast 8.60,ja usei varios,nenhum deu !
-
onde eu colo isso??
-
Oi gente ! ajuda awe ! Como eu faço pra colocar newtype em players ???? Entrem nesse ot.. Skapulot.no-ip.org É incrívelll ! rsrsrsrsrs Ninguem vai respondeR???
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.