Ir para conteúdo

thiaguinho

Membro
  • Registro em

  • Última visita

Tudo que thiaguinho postou

  1. thiaguinho postou uma resposta no tópico em Websites
    Funcioando perfeitamente! para quem nao conseguiu, siga esta etapa: adicione database SQL: Crie um arquivo shop.Lua em talkaction e adicione isso: function onSay(cid, words, param) local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks. local cooldown = 15 -- in seconds. local player = Player(cid) if player:getStorageValue(storage) <= os.time() then player:setStorageValue(storage, os.time() + cooldown) -- Create the query local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `shop_orders` WHERE `account_id` = " .. player:getAccountId() .. " LIMIT 1;") -- Detect if we got any results if orderQuery ~= false then -- Fetch order values local q_id = result.getDataInt(orderQuery, "id") local q_type = result.getDataInt(orderQuery, "type") local q_itemid = result.getDataInt(orderQuery, "itemid") local q_count = result.getDataInt(orderQuery, "count") result.free(orderQuery) -- ORDER TYPE 1 (Regular item shop products) if q_type == 1 then -- Get wheight if player:getFreeCapacity() >= ItemType(q_itemid):getWeight(q_count) then db.query("DELETE FROM `shop_orders` WHERE `id` = " .. q_id .. ";") player:addItem(q_itemid, q_count) player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. q_count .. " x " .. ItemType(q_itemid):getName() .. "!") else player:sendTextMessage(MESSAGE_STATUS_WARNING, "Need more CAP!") end end -- Add custom order types here -- Type 2 is reserved for premium days and is handled on website, not needed here. -- Type 3 is reserved for character gender(sex) change and is handled on website as well. -- So use type 4+ for custom stuff, like etc packages. -- if q_type == 4 then -- end else player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have no orders.") end else player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. player:getStorageValue(storage) - os.time()) end return false end e adicione a tag em talkactions.xml <talkaction words="!shop" script="shop.lua"/>
  2. Tente tirar o count, ficando assim: <img id="PedestalAndOnline" src="<?PHP echo "$layout_name"; ?>/images/header/pedestal-artwork-top.gif" alt="Monster Pedestal and Players Online Box"/> <?PHP if(($config['site']['worlds']) > 1) $whoisonlineworld = 'index.php?subtopic=whoisonline'; else $whoisonlineworld = 'index.php?subtopic=whoisonline&world=0'; ?> <div id="PlayersOnline" onClick="window.location='<?PHP echo "$whoisonlineworld"; ?>'"> <?PHP if($config['status']['serverStatus_online'] == 0) echo ''.$number_of_players_online.'<br />Players Online'; else echo '<font color="red"><b>Server<br />OFFLINE</b></font>'; ?></div> </div> <div id="Themeboxes"> <?php $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND account_id != 1 ORDER BY level DESC LIMIT 5'); ?>
  3. gostei, mais eu testei aqui com 2 character na mesma acc, n esta dando certo, os dois characters ficam com o mesmo nome , um sai certo, o outro so reloga e não aparece o V na frente, pode me ajudar?

Informação Importante

Confirmação de Termo