Ir para conteúdo

ramses82

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    ramses82 recebeu reputação de carlos420 em [pedido] Npc Cassino   
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}
     
    function onCreatureAppear(cid)                          npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid)                       npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg)          npcHandler:onCreatureSay(cid, type, msg) end
    function onThink()                                              npcHandler:onThink() end
     
    local function delayMoneyRemoval(item, pos)
            doRemoveItem(getTileItemById(pos, item).uid)
            return true
    end
     
    local function placeMoney(amount, table_middle_pos)
            local remain = amount
            local crystal_coins = 0
            local platinum_coins = 0
     
            if (math.floor(amount / 10000) >= 1) then
                    crystal_coins = math.floor(amount / 10000)
                    remain = remain - crystal_coins * 10000
            end
            if ((remain / 100) >= 1) then
                    platinum_coins = remain / 100
            end
            addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos)
            addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos)
    end
     
    local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc)
            local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797}
            local random_rollval = math.random(1,6)
            local total_g = (10000 * cc_count) + (100 * pc_count)
            local prize_percent = 0.8 -- 80%
     
            if ((total_g) <= 300000 and (total_g) >= 5000) then
                    doSendMagicEffect(table_left_pos, CONST_ME_CRAPS)
     
                    for _, itemId in pairs(dice_ids) do
                                    if(getTileItemById(table_left_pos, itemId).uid > 0) then
                                    doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval])
                            end
                    end
     
                    if (roll == 1 and random_rollval <= 3) then
                            placeMoney(total_g + (total_g * prize_percent), table_middle_pos)
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0)
                    elseif (roll == 2 and random_rollval >= 4) then
                            placeMoney(total_g + (total_g * prize_percent), table_middle_pos)
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0)
                    else
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT)
                            addEvent(doCreatureSay, 500, npc, "Better luck next time.", TALKTYPE_SAY, false, 0)
                    end
                    doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos)
            else
                    addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos)
                    addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos)
                    doCreatureSay(npc, "The minimum wager is 5K and the maximum wager is 300K.", TALKTYPE_SAY, false, 0)
            end
            return true
    end
     
    function creatureSayCallback(cid, type, msg)
            -- NPC userdata instance
            local npc = getNpcCid()
     
            -- Game table position userdata instances
            local table_left_pos = {x = 32228, y = 32190, z = 15} -- Pos da frente do Npc onde gira o dado
            local table_middle_pos = {x = 32228, y = 32191, z = 15} -- Pos do meio onde vai o dinheiro
     
            -- Search for coins on the left and middle tables and create item userdata instances
            local table_middle_cc = getTileItemById(table_middle_pos, 2160)
            local table_middle_pc = getTileItemById(table_middle_pos, 2152)
     
            -- Other variables
            local cc_count = 0
            local pc_count = 0
            local ROLL, LOW, HIGH = 0, 1, 2
            posplayer = {x=32229, y=32192, z=15} -- Pos onde o player precisa estar
                    local ppos = getPlayerPosition(cid)
            if ppos.x == posplayer.x and ppos.y == posplayer.y then
            if isInArray({"H", "HIGH", "high", "h"}, msg) then
                            ROLL = HIGH
                    elseif  isInArray({"L", "LOW", "l", "low"}, msg) then
                            ROLL = LOW             
                    else
                            return false
                    end
                    if (table_middle_cc.uid ~= 0) then
                            cc_count = table_middle_cc.type
                            doTeleportThing(table_middle_cc.uid, table_left_pos)
                            addEvent(delayMoneyRemoval, 300, 2160, table_left_pos)
                    end
                    if (table_middle_pc.uid ~= 0) then
                            pc_count = table_middle_pc.type
                            doTeleportThing(table_middle_pc.uid, table_left_pos)
                            addEvent(delayMoneyRemoval, 300, 2152, table_left_pos)
                    end
                    addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc)
            else
                    return false
            end
            return true
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())
     
    this is only h / l choose your own npc with this file vegas.lua on npc Then  on scripts
     
    o<?xml version="1.0" encoding="UTF-8"?>
    <npc name="Vegas" script="Vegas.lua" walkinterval="0" floorchange="0">
    <health now="100" max="100"/>
    <look type="132" head="114" body="0" legs="0" feet="114" addons="3"/>
        <parameters>
            <parameter key="message_greet" value="Hello, |PLAYERNAME|. You can bet speaking {H} or {L}, the minimum wager is 5K and the maximum wager is 300K." />
        </parameters>
    </npc>n this npc folder vegas
       
    from Absolute
  2. Gostei
    ramses82 recebeu reputação de ElizeuAlmeida em [pedido] Npc Cassino   
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}
     
    function onCreatureAppear(cid)                          npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid)                       npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg)          npcHandler:onCreatureSay(cid, type, msg) end
    function onThink()                                              npcHandler:onThink() end
     
    local function delayMoneyRemoval(item, pos)
            doRemoveItem(getTileItemById(pos, item).uid)
            return true
    end
     
    local function placeMoney(amount, table_middle_pos)
            local remain = amount
            local crystal_coins = 0
            local platinum_coins = 0
     
            if (math.floor(amount / 10000) >= 1) then
                    crystal_coins = math.floor(amount / 10000)
                    remain = remain - crystal_coins * 10000
            end
            if ((remain / 100) >= 1) then
                    platinum_coins = remain / 100
            end
            addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos)
            addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos)
    end
     
    local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc)
            local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797}
            local random_rollval = math.random(1,6)
            local total_g = (10000 * cc_count) + (100 * pc_count)
            local prize_percent = 0.8 -- 80%
     
            if ((total_g) <= 300000 and (total_g) >= 5000) then
                    doSendMagicEffect(table_left_pos, CONST_ME_CRAPS)
     
                    for _, itemId in pairs(dice_ids) do
                                    if(getTileItemById(table_left_pos, itemId).uid > 0) then
                                    doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval])
                            end
                    end
     
                    if (roll == 1 and random_rollval <= 3) then
                            placeMoney(total_g + (total_g * prize_percent), table_middle_pos)
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0)
                    elseif (roll == 2 and random_rollval >= 4) then
                            placeMoney(total_g + (total_g * prize_percent), table_middle_pos)
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0)
                    else
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT)
                            addEvent(doCreatureSay, 500, npc, "Better luck next time.", TALKTYPE_SAY, false, 0)
                    end
                    doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos)
            else
                    addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos)
                    addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos)
                    doCreatureSay(npc, "The minimum wager is 5K and the maximum wager is 300K.", TALKTYPE_SAY, false, 0)
            end
            return true
    end
     
    function creatureSayCallback(cid, type, msg)
            -- NPC userdata instance
            local npc = getNpcCid()
     
            -- Game table position userdata instances
            local table_left_pos = {x = 32228, y = 32190, z = 15} -- Pos da frente do Npc onde gira o dado
            local table_middle_pos = {x = 32228, y = 32191, z = 15} -- Pos do meio onde vai o dinheiro
     
            -- Search for coins on the left and middle tables and create item userdata instances
            local table_middle_cc = getTileItemById(table_middle_pos, 2160)
            local table_middle_pc = getTileItemById(table_middle_pos, 2152)
     
            -- Other variables
            local cc_count = 0
            local pc_count = 0
            local ROLL, LOW, HIGH = 0, 1, 2
            posplayer = {x=32229, y=32192, z=15} -- Pos onde o player precisa estar
                    local ppos = getPlayerPosition(cid)
            if ppos.x == posplayer.x and ppos.y == posplayer.y then
            if isInArray({"H", "HIGH", "high", "h"}, msg) then
                            ROLL = HIGH
                    elseif  isInArray({"L", "LOW", "l", "low"}, msg) then
                            ROLL = LOW             
                    else
                            return false
                    end
                    if (table_middle_cc.uid ~= 0) then
                            cc_count = table_middle_cc.type
                            doTeleportThing(table_middle_cc.uid, table_left_pos)
                            addEvent(delayMoneyRemoval, 300, 2160, table_left_pos)
                    end
                    if (table_middle_pc.uid ~= 0) then
                            pc_count = table_middle_pc.type
                            doTeleportThing(table_middle_pc.uid, table_left_pos)
                            addEvent(delayMoneyRemoval, 300, 2152, table_left_pos)
                    end
                    addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc)
            else
                    return false
            end
            return true
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())
     
    this is only h / l choose your own npc with this file vegas.lua on npc Then  on scripts
     
    o<?xml version="1.0" encoding="UTF-8"?>
    <npc name="Vegas" script="Vegas.lua" walkinterval="0" floorchange="0">
    <health now="100" max="100"/>
    <look type="132" head="114" body="0" legs="0" feet="114" addons="3"/>
        <parameters>
            <parameter key="message_greet" value="Hello, |PLAYERNAME|. You can bet speaking {H} or {L}, the minimum wager is 5K and the maximum wager is 300K." />
        </parameters>
    </npc>n this npc folder vegas
       
    from Absolute
  3. Gostei
    ramses82 recebeu reputação de dimiot em [10.93] Projeto Capernia, RL MAP   
    http://www.halfaway.net/index.php?home
  4. Gostei
    ramses82 recebeu reputação de Malblofor em [10.93] Projeto Capernia, RL MAP   
    http://www.halfaway.net/index.php?home
  5. Gostei
    execute isso no SQL pra add as colunas na database
     
    ALTER TABLE `players` ADD COLUMN `skill_critical_hit_chance` int(10) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_critical_hit_chance_tries` bigint(20) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_critical_hit_damage` int(10) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_critical_hit_damage_tries` bigint(20) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_life_leech_chance` int(10) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_life_leech_chance_tries` bigint(20) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_life_leech_amount` int(10) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_life_leech_amount_tries` bigint(20) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_mana_leech_chance` int(10) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_mana_leech_chance_tries` bigint(20) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_mana_leech_amount` int(10) unsigned NOT NULL DEFAULT 0
    ALTER TABLE `players` ADD COLUMN `skill_mana_leech_amount_tries` bigint(20) unsigned NOT NULL DEFAULT 0
  6. Gostei
    ramses82 deu reputação a gordonbays em [10.93] Projeto Capernia, RL MAP   
    Esperando atualização do TFS para 10.77+.
  7. Gostei
    ramses82 deu reputação a gordonbays em [10.93] Projeto Capernia, RL MAP   
    Capernia Datapack: making the ultimate datapack for OTS (Open Tibia Server)
    Bom dia a todos, considerando que todas as datapacks presentes nesse fórum contém bugs absurdos e estão longe de serem confiáveis para um servidor final, eu convido todos a participarem e colaborarem nesse projeto chamado Capernia. O objetivo é unificar as ações em um único projeto e permitir que as correções realizadas isoladamente se propaguem para todos em tempo real.
    Vários problemas já foram corrigidos como a replicação de cristal coins da ferumbras e queda de servidor pelo método da parcel. Novos problemas são reportados diariamente e eu farei o possível para atender a todos. Se você tem interesse em contribuir ou utilizar o projeto Capernia acesse:
     
    https://github.com/gordonbay/capernia-ots-datapack
     
    Estabilidade:
    Como todos sabem não existe projeto "Full" ou "100%" e o mesmo está longe de existir porém você pode fazer a diferença agora reportando erros encontrados ou enviando as suas atualizações, entretanto tudo é realizado utilizando o idioma inglês e sem customizações.
    A build está marcada como buggy, o que significa que você deve utilizar esse projeto assumindo o risco, não me responsabilizo por falhas encontradas ou exploradas.
     
    Compilações:
    As compilações executáveis são fornecidas com a intenção de facilitar o processo para o usuário, em nenhum momento serão fornecidos os códigos de fontes considerando que o foco desse projeto é a datapack e as mesmas podem ser acessadas pelo projeto responsável pelo seu desenvolvimento nesse link:
     
    https://github.com/otland/forgottenserver
     
    Ferramentas Compatíveis:
    Para edição do mapa:
     
    http://www.tibiaking.com/forum/topic/22469-1091-remeres-map-editor/
     
    Para edição de itens:
     
    https://github.com/ottools/ItemEditor
     
    Bugs Encontrados:
    Nenhum bug referente ao projeto será respondido nesse fórum sendo que o procedimento correto para o mesmo é através do link:
     
    https://github.com/gordonbay/capernia-ots-datapack/issues
     
    porém leia esse artigo antes de postar:
     
    https://github.com/gordonbay/capernia-ots-datapack/wiki/Issues
     
     
    Últimas atualizações:
    0.0.9 (17/05/2016)
    Bugfixes:
    fix wrong monsters corpses as requested here #17 fix missing Yalahar gates and Captain Max not checking mission status in order to teleport a character. As described here #16 fix Edron's Bog Raider's missing spaws and wrong map textures as requested here #14 0.0.8 (14/05/2016)
    Enhancements:
    added 10.92 new itens and potions 0.0.7 (13/05/2016)
    Bugfixes:
    fix a bug on Ferumbras' Ascendant Quest as requested here #13 Enhancements:
    Reward Chest has been removed from Thais due violations of Capernia rules about custom content
  8. Gostei
    Deu um trabalho mas consegui.
     
    index.php, insira essa linha $mysql...
     
    <?php //GATO PRO SHOP $mysqli = new mysqli("127.0.0.1", "USUARIO", "SENHA", "DB");  
    shopadmin.php
     
    <script> </script> <script type="text/javascript">function _delete(id){ if( confirm('Confirma a exclusão do item selecionado?') ) { location.href='?subtopic=shopadmin&action=delete&id=' + id + ''; } return false; }</script><style type="text/css"> hr{border:0;border-bottom:1px solid #D4C0A1;padding:3px;} h1.admshop{margin:0;padding:0;} label.admshop{float:left;width:100px;} div.clear{clear:both;} p.border{border-bottom:1px solid #D4C0A1;padding:3px;} form input, form select, form button, form reset{padding:3px;} input.bt{padding:3px 20px;cursor:pointer;} .success{color:green;} .error{color:red;} .bt2{padding:5px 30px;cursor:pointer;} </style> <?php /** * Systema By Dezon */ if(!defined('INITIALIZED')) exit; /* * Variável SQL */ $SQL = $GLOBALS['SQL']; /* * Funções */ function dropdown_offer_type($selected='item') { $return = null; if($selected == 'item') { $return = '<select id="selectid" onchange="michael()" name="offer_type"> <option value="item" selected="selected">Item</option> <option value="container">Container</option> <option value="mount">Mounts</option> <option value="addon">Addons</option> </select>'; } else if($selected == 'container') { $return = '<select id="selectid" onchange="michael()" name="offer_type"> <option value="item">Item</option> <option value="container" selected="selected">Container</option> <option value="mount">Mounts</option> <option value="addon">Addons</option> </select>'; } else if($selected == 'mount') { $return = '<select id="selectid" onchange="michael()" name="offer_type"> <option value="item">Item</option> <option value="container">Container</option> <option value="mount" selected="selected">Mounts</option> <option value="addon">Addons</option> </select>'; } else if($selected == 'addon') { $return = '<select id="selectid" onchange="michael()" name="offer_type"> <option value="item">Item</option> <option value="container">Container</option> <option value="mount">Mounts</option> <option value="addon" selected="selected">Addons</option> </select>'; } else { $return = '<select id="selectid" onchange="michael()" name="offer_type"> <option value="item" selected="selected">Item</option> <option value="container">Container</option> <option value="mount">Mounts</option> <option value="addon">Addons</option> </select>'; } return $return; } if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) { #################### # ATUALIZAÇÃO 2015 # #################### $items_menu = '<p><a href="?subtopic=shopadmin">Shop admin</a> | <a href="?subtopic=shopadmin&action=new">Nova oferta</a> | <a href="?subtopic=shopadmin&action=list">Listar ofertas</a> | <a href="?subtopic=shopadmin&action=points">Adicionar pontos</a></p><hr />'; switch($action) { /******************************************************************************************/ // Essa ação, vai listar todos os registros do que está // sendo vendido no seu shopping (as ofertas) /******************************************************************************************/ case 'list': $ofertas = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' ORDER BY id DESC;'); $result .= $items_menu; $result .= '<TABLE BGCOLOR="#D4C0A1" BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">'; $result .= '<tr bgcolor="#505050"><td class="white"><strong>Items cadastrados no \'Shop Offer\'</strong></td><tr>'; $result .= '<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" WIDTH="100%">'; $result .= '<TR BGCOLOR="#F1E0C6"><td><strong>ID</strong></td><td><strong>Nome da oferta</strong></td><td><strong>Imagem</strong></td><td><strong>Ações</strong></td></TR>'; while($data = $ofertas->fetch()) { $result .= '<tr BGCOLOR="#F1E0C6">'; $result .= '<td>'.$data['id'].'</td>'; $result .= '<td>'.$data['offer_name'].'</td>'; $result .= '<td align="center"><img src="./images/items/'.$data['itemid1'].$config['site']['item_images_extension'].'" /></td>'; $result .= '<td><a href="?subtopic=shopadmin&action=edit&id='.$data['id'].'">[editar]</a>&nbsp;<a href="javascript:void( _delete('.$data['id'].') );">[excluir]</a></td>'; $result .= '</tr>'; } $result .= '</table>'; $result .= '</table>'; $main_content .= $result; break; //lista as ofertas /******************************************************************************************/ // Essa ação é chamada quando abre a tela // de edição da oferta selecionada /******************************************************************************************/ case 'edit': $main_content .= $items_menu; $id = is_numeric($_GET['id']) ? $_GET['id'] : header('Location: ?subtopic=shopadmin'); // anti-inject simples by Dezon $dados = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE id='.$id)->fetch(); /* if($dados['offer_type'] == 'item') { $dropdown = '<select id="selectid" onchange="michael()" name="offer_type"><option value="item" selected="selected">Item</option><option value="container">Container</option></select>'; } else if($dados['offer_type'] == 'container') { $dropdown = '<select id="selectid" onchange="michael()" name="offer_type"><option value="item">Item</option><option value="container" selected="selected">Container</option></select>'; } */ $dropdown = dropdown_offer_type($dados['offer_type']); $main_content .= <<<EOD <h1 class="admshop"><strong>Editar/Atualizar oferta</strong></h1> <form method="post" action="?subtopic=shopadmin&action=shop_edit"> <input type="hidden" name="id_offer" value="{$dados['id']}" /> <p class="border"><strong>Nome / Descrição da oferta</strong></p> <p id="addon"><label class="admshop">Addon: </label><select onchange="changes()" id="addons" name="addon"></p> <option value="" selected="selected"></option> <option value="1">Citizen</option> <option value="2">Hunter</option> <option value="3">Mage</option> <option value="4">Knight</option> <option value="5">Noblewoman</option> <option value="6">Summoner</option> <option value="7">Warrior</option> <option value="8">Barbarian</option> <option value="9">Druid</option> <option value="10">Wizard</option> <option value="11">Oriental</option> <option value="12">Pirate</option> <option value="13">Assassin</option> <option value="14">Beggar</option> <option value="15">Shaman</option> <option value="16">Norsewoman</option> <option value="17">Nightmare</option> <option value="18">Jester</option> <option value="19">Brotherhood</option> <option value="20">Demonhunter</option> <option value="21">Yalaharian</option> <option value="22">Warmaster</option> <option value="23">Wayfarer</option> <option value="24">Afflicted</option> <option value="25">Elementalist</option> <option value="26">Deepling</option> <option value="27">Insectoid</option> <option value="28">Entrepreneur</option> <option value="29">Crystal warlord</option> <option value="30">Soil guardian</option> <option value="31">Demon</option> <option value="32">Cave explorer</option> <option value="33">Dream warden</option> <option value="34">Glooth engineer</option> <option value="35">Champion</option> <option value="36">Conjurer</option> <option value="37">Beastmaster</option> <option value="38">Chaos acolyte</option> <option value="39">Death herald</option> <option value="40">Ranger</option> <option value="41">Ceremonial garb</option> <option value="42">Puppeteer</option> <option value="43">Spirit caller</option> <option value="44">Evoker</option> <option value="45">Seaweaver</option> <option value="46">Recruiter</option> <option value="47">Sea dog</option> <option value="48">Royal pumpkin</option> <option value="49">Rift warrior</option> <option value="50">Winter warden</option> <option value="51">Philosopher</option> </select> <p id="mountdrop"><label class="admshop">Mount: </label><select onchange="changesdrop()" id="mountvalor" name="mount"></p> <option value="1">Widow Queen</option> <option value="2">Racing Bird</option> <option value="3">War Bear</option> <option value="4">Black Sheep</option> <option value="5">Midnight Panther</option> <option value="6">Draptor</option> <option value="7">Titanica</option> <option value="8">Tin Lizzard</option> <option value="9">Blazebringer</option> <option value="10">Rapid Boar</option> <option value="11">Stampor</option> <option value="12">Undead Cavebear</option> <option value="13">Donkey</option> <option value="14">Tiger Slug</option> <option value="15">Uniwheel</option> <option value="16">Crystal Wolf</option> <option value="17">War Horse</option> <option value="18">Kingly Deer</option> <option value="19">Tamed Panda</option> <option value="20">Dromedary</option> <option value="21">Scorpion King</option> <option value="22">Rented Horse</option> <option value="23">Armoured War Horse</option> <option value="24">Shadow Draptor</option> <option value="25">Rented Horse</option> <option value="26">Rented Horse</option> <option value="27">Lady Bug</option> <option value="28">Manta Ray</option> <option value="29">Ironblight</option> <option value="30">Magma Crawler</option> <option value="31">Dragonling</option> <option value="32">Gnarlhound</option> <option value="33">Crimson Ray</option> <option value="34">Steelbeak</option> <option value="35">Water Buffalo</option> <option value="36">Armoured Scorpion</option> <option value="37">Armoured Dragonling</option> <option value="38">Ursagrodon</option> <option value="39">Hellgrip</option> <option value="40">Noble Lion</option> <option value="41">Desert King</option> <option value="42">Shock Head</option> <option value="43">Walker</option> <option value="44">Azudocus</option> <option value="45">Carpacosaurus</option> <option value="46">Death Crawler</option> <option value="47">Flamesteed</option> <option value="48">Jade Lion</option> <option value="49">Jade Pincer</option> <option value="50">Nethersteed</option> <option value="51">Tempest</option> <option value="52">Winter King</option> <option value="53">Doombringer</option> <option value="54">Woodland Prince</option> <option value="55">Hailtorm Fury</option> <option value="56">Siegebreaker</option> <option value="57">Poisonbane</option> <option value="58">Blackpelt</option> <option value="59">Golden Dragonfly</option> <option value="60">Steel Bee</option> <option value="61">Copper Fly</option> <option value="62">Tundra Rambler</option> <option value="63">Highland Yak</option> <option value="64">Glacier Vagabond</option> <option value="65">Flying Divan</option> <option value="66">Magic Carpet</option> <option value="67">Floating Kashmir</option> <option value="68">Ringtail Waccoon</option> <option value="69">Night Waccoon</option> <option value="70">Emerald Waccoon</option> <option value="71">Glooth Glider</option> <option value="72">Shadow Hart</option> <option value="73">Black Stag</option> <option value="74">Emperor Deer</option> <option value="75">Flitterkatzen</option> <option value="76">Venompaw</option> <option value="77">Batcat</option> <option value="78">Sea Devil</option> <option value="79">Coralripper</option> <option value="80">Plumfish</option> <option value="81">Gorongra</option> <option value="82">Noctungra</option> <option value="83">Silverneck</option> <option value="84">Slagsnare</option> <option value="85">Nightstinger</option> <option value="86">Razorcreep</option> <option value="87">Rift Runner</option> <option value="88">Nightdweller</option> <option value="89">Frostflare</option> <option value="90">Cinderhoof</option> <option value="91">Mouldpincer</option> <option value="92">Bloodcurl</option> <option value="93">Leafscuttler</option> </select> <p><label class="admshop">Oferta: </label><input type="text" name="offer_name" size="50" maxlength="100" value="{$dados['offer_name']}" /></p> <p><label class="admshop">Descrição: </label><input type="text" name="offer_description" size="50" maxlength="1000" value="{$dados['offer_description']}" /></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="points" size="5" maxlength="9" value="{$dados['points']}" /></p> <p class="border"><strong>Tipo da oferta</strong></p> <p><label class="admshop">Tipo: </label>{$dropdown}</p> <div id="michael3" style=""> <p class="border"><strong>Configuração de item normal, armor, shield, legs, etc</strong></p> <p><label class="admshop">ID Item 1: </label><input id="id1" type="text" name="itemid1" size="20" value="{$dados['itemid1']}" /></p> <p><label class="admshop">Qtde. Item 1: </label><input id="count1" type="text" name="count1" size="10" value="{$dados['count1']}" /></p> <p class="border"><strong>Configuração de item container, BP com Runas, BP com Small Stones, etc</strong></p> <p><label class="admshop">ID Item 2: </label><input id="count2" type="text" name="itemid2" size="10" value="{$dados['itemid2']}" /></p> <p><label class="admshop">Qtde. Item 2: </label><input type="text" name="count2" size="10" value="{$dados['count2']}" /></p> </div> <p class="border"><br /></p> <input type="submit" value="Salvar edição" class="bt" /> </form> <div class="clear"></div> <script> document.getElementById("addons").selectedIndex = {$dados['itemid1']}; document.getElementById("addons").selectedIndex = {$dados['itemid1']}; if(document.getElementById('selectid').value == "mount") { document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'none'; document.getElementById('mountdrop').style.display = 'block'; } if(document.getElementById('selectid').value == "addon") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'block'; } if(document.getElementById('selectid').value != "addon" && document.getElementById('selectid').value != "mount") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'block'; document.getElementById('addon').style.display = 'none'; } function changes() { var mytextbox = document.getElementById('id1'); var mydropdown = document.getElementById('addons'); mytextbox.value = mydropdown.value; } function changesdrop() { var mytextbox = document.getElementById('id1'); var mydropdown = document.getElementById('mountvalor'); mytextbox.value = mydropdown.value; } function changes() { var mytextbox = document.getElementById('id1'); var mydropdown = document.getElementById('addons'); mytextbox.value = mydropdown.value; } function michael() { if(document.getElementById('selectid').value == "mount") { document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'none'; document.getElementById('mountdrop').style.display = 'block'; } if(document.getElementById('selectid').value == "addon") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'block'; } if(document.getElementById('selectid').value != "addon" && document.getElementById('selectid').value != "mount") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'block'; document.getElementById('addon').style.display = 'none'; } } </script> <?php EOD; break; case 'shop_edit': $id = $_POST['id_offer']; $points = trim($_POST['points']); $itemid1 = $_POST['itemid1']; $count1 = trim($_POST['count1']); $itemid2 = trim($_POST['itemid2']); $count2 = trim($_POST['count2']); $offer_type = trim($_POST['offer_type']); $offer_description = trim($_POST['offer_description']); $offer_name = trim($_POST['offer_name']); if(isset($_POST['id_offer'])) { $mysqli->query("UPDATE z_shop_offer SET points = '$points', itemid1 = '$itemid1', points = '$points', count1 = '$count1', itemid2 = '$itemid2', count2 = '$count2', offer_type = '$offer_type', offer_description = '$offer_description', offer_name = '$offer_name' WHERE id = '$id'"); echo '<strong class="success">Oferta editada com sucesso!</strong><br /><br /><a href="?subtopic=shopadmin&action=list">Voltar</a>'; } break; case 'delete': $id = is_numeric($_GET['id']) ? $_GET['id'] : header('Location: ?subtopic=shopadmin'); $SQL->query('DELETE FROM '.$SQL->tableName('z_shop_offer').' WHERE id='.$id); header('Location: ?subtopic=shopadmin&action=list'); break; //exclui items /******************************************************************************************/ // Ação que é chamada quando você salva uma nova oferta /******************************************************************************************/ case 'shop_save': $id = $_POST['id_offer']; $points = trim($_POST['points']); $itemid1 = $_POST['itemid1']; $count1 = trim($_POST['count1']); $itemid2 = trim($_POST['itemid2']); $count2 = trim($_POST['count2']); $offer_type = trim($_POST['offer_type']); $offer_description = trim($_POST['offer_description']); $offer_name = trim($_POST['offer_name']); if(isset($_POST['id_offer'])) { $mysqli->query("INSERT INTO z_shop_offer (points,itemid1,count1,itemid2,count2,offer_type,offer_description,offer_name) VALUES ('$points','$itemid1','$count1','$itemid2','$count2','$offer_type','$offer_description','$offer_name')"); echo '<strong class="success">Oferta cadastrada com sucesso!</strong><br /><br /><a href="?subtopic=shopadmin&action=list">Voltar</a>'; } break; //salva a oferta no banco de dados /******************************************************************************************/ // Essa ação é chamada na tela de nova oferta, // é nela que o formulário de cadastro é // gerado e exibido na tela /******************************************************************************************/ case 'new': $main_content .= $items_menu; $dropdown = dropdown_offer_type(null); $main_content .= <<<EOD <h1 class="admshop"><strong>Cadastrar Novo Item</strong></h1> <form method="post" action="?subtopic=shopadmin&action=shop_save"> <input type="hidden" name="id_offer" value="{$dados['id']}" /> <p class="border"><strong>Nome / Descrição da oferta</strong></p> <p id="addon"><label class="admshop">Addon: </label><select onchange="changes()" id="addons" name="addon"></p> <option value="" selected="selected"></option> <option value="1">Citizen</option> <option value="2">Hunter</option> <option value="3">Mage</option> <option value="4">Knight</option> <option value="5">Noblewoman</option> <option value="6">Summoner</option> <option value="7">Warrior</option> <option value="8">Barbarian</option> <option value="9">Druid</option> <option value="10">Wizard</option> <option value="11">Oriental</option> <option value="12">Pirate</option> <option value="13">Assassin</option> <option value="14">Beggar</option> <option value="15">Shaman</option> <option value="16">Norsewoman</option> <option value="17">Nightmare</option> <option value="18">Jester</option> <option value="19">Brotherhood</option> <option value="20">Demonhunter</option> <option value="21">Yalaharian</option> <option value="22">Warmaster</option> <option value="23">Wayfarer</option> <option value="24">Afflicted</option> <option value="25">Elementalist</option> <option value="26">Deepling</option> <option value="27">Insectoid</option> <option value="28">Entrepreneur</option> <option value="29">Crystal warlord</option> <option value="30">Soil guardian</option> <option value="31">Demon</option> <option value="32">Cave explorer</option> <option value="33">Dream warden</option> <option value="34">Glooth engineer</option> <option value="35">Champion</option> <option value="36">Conjurer</option> <option value="37">Beastmaster</option> <option value="38">Chaos acolyte</option> <option value="39">Death herald</option> <option value="40">Ranger</option> <option value="41">Ceremonial garb</option> <option value="42">Puppeteer</option> <option value="43">Spirit caller</option> <option value="44">Evoker</option> <option value="45">Seaweaver</option> <option value="46">Recruiter</option> <option value="47">Sea dog</option> <option value="48">Royal pumpkin</option> <option value="49">Rift warrior</option> <option value="50">Winter warden</option> <option value="51">Philosopher</option> </select> <p id="mountdrop"><label class="admshop">Mount: </label><select onchange="changesdrop()" id="mountvalor" name="mount"></p> <option value="1">Widow Queen</option> <option value="2">Racing Bird</option> <option value="3">War Bear</option> <option value="4">Black Sheep</option> <option value="5">Midnight Panther</option> <option value="6">Draptor</option> <option value="7">Titanica</option> <option value="8">Tin Lizzard</option> <option value="9">Blazebringer</option> <option value="10">Rapid Boar</option> <option value="11">Stampor</option> <option value="12">Undead Cavebear</option> <option value="13">Donkey</option> <option value="14">Tiger Slug</option> <option value="15">Uniwheel</option> <option value="16">Crystal Wolf</option> <option value="17">War Horse</option> <option value="18">Kingly Deer</option> <option value="19">Tamed Panda</option> <option value="20">Dromedary</option> <option value="21">Scorpion King</option> <option value="22">Rented Horse</option> <option value="23">Armoured War Horse</option> <option value="24">Shadow Draptor</option> <option value="25">Rented Horse</option> <option value="26">Rented Horse</option> <option value="27">Lady Bug</option> <option value="28">Manta Ray</option> <option value="29">Ironblight</option> <option value="30">Magma Crawler</option> <option value="31">Dragonling</option> <option value="32">Gnarlhound</option> <option value="33">Crimson Ray</option> <option value="34">Steelbeak</option> <option value="35">Water Buffalo</option> <option value="36">Armoured Scorpion</option> <option value="37">Armoured Dragonling</option> <option value="38">Ursagrodon</option> <option value="39">Hellgrip</option> <option value="40">Noble Lion</option> <option value="41">Desert King</option> <option value="42">Shock Head</option> <option value="43">Walker</option> <option value="44">Azudocus</option> <option value="45">Carpacosaurus</option> <option value="46">Death Crawler</option> <option value="47">Flamesteed</option> <option value="48">Jade Lion</option> <option value="49">Jade Pincer</option> <option value="50">Nethersteed</option> <option value="51">Tempest</option> <option value="52">Winter King</option> <option value="53">Doombringer</option> <option value="54">Woodland Prince</option> <option value="55">Hailtorm Fury</option> <option value="56">Siegebreaker</option> <option value="57">Poisonbane</option> <option value="58">Blackpelt</option> <option value="59">Golden Dragonfly</option> <option value="60">Steel Bee</option> <option value="61">Copper Fly</option> <option value="62">Tundra Rambler</option> <option value="63">Highland Yak</option> <option value="64">Glacier Vagabond</option> <option value="65">Flying Divan</option> <option value="66">Magic Carpet</option> <option value="67">Floating Kashmir</option> <option value="68">Ringtail Waccoon</option> <option value="69">Night Waccoon</option> <option value="70">Emerald Waccoon</option> <option value="71">Glooth Glider</option> <option value="72">Shadow Hart</option> <option value="73">Black Stag</option> <option value="74">Emperor Deer</option> <option value="75">Flitterkatzen</option> <option value="76">Venompaw</option> <option value="77">Batcat</option> <option value="78">Sea Devil</option> <option value="79">Coralripper</option> <option value="80">Plumfish</option> <option value="81">Gorongra</option> <option value="82">Noctungra</option> <option value="83">Silverneck</option> <option value="84">Slagsnare</option> <option value="85">Nightstinger</option> <option value="86">Razorcreep</option> <option value="87">Rift Runner</option> <option value="88">Nightdweller</option> <option value="89">Frostflare</option> <option value="90">Cinderhoof</option> <option value="91">Mouldpincer</option> <option value="92">Bloodcurl</option> <option value="93">Leafscuttler</option> </select> <p><label class="admshop">Oferta: </label><input type="text" name="offer_name" size="50" maxlength="100" value="{$dados['offer_name']}" /></p> <p><label class="admshop">Descrição: </label><input type="text" name="offer_description" size="50" maxlength="1000" value="{$dados['offer_description']}" /></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="points" size="5" maxlength="9" value="{$dados['points']}" /></p> <p class="border"><strong>Tipo da oferta</strong></p> <p><label class="admshop">Tipo: </label>{$dropdown}</p> <div id="michael3" style=""> <p class="border"><strong>Configuração de item normal, armor, shield, legs, etc</strong></p> <p><label class="admshop">ID Item 1: </label><input id="id1" type="text" name="itemid1" size="20" value="{$dados['itemid1']}" /></p> <p><label class="admshop">Qtde. Item 1: </label><input id="count1" type="text" name="count1" size="10" value="{$dados['count1']}" /></p> <p class="border"><strong>Configuração de item container, BP com Runas, BP com Small Stones, etc</strong></p> <p><label class="admshop">ID Item 2: </label><input id="count2" type="text" name="itemid2" size="10" value="{$dados['itemid2']}" /></p> <p><label class="admshop">Qtde. Item 2: </label><input type="text" name="count2" size="10" value="{$dados['count2']}" /></p> </div> <p class="border"><br /></p> <input type="submit" value="Salvar" class="bt" /> </form> <div class="clear"></div> <script> if(document.getElementById('selectid').value == "mount") { document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'none'; document.getElementById('mountdrop').style.display = 'block'; } if(document.getElementById('selectid').value == "addon") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'block'; } if(document.getElementById('selectid').value != "addon" && document.getElementById('selectid').value != "mount") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'block'; document.getElementById('addon').style.display = 'none'; } function changes() { var mytextbox = document.getElementById('id1'); var mydropdown = document.getElementById('addons'); mytextbox.value = mydropdown.value; } function changesdrop() { var mytextbox = document.getElementById('id1'); var mydropdown = document.getElementById('mountvalor'); mytextbox.value = mydropdown.value; } function changes() { var mytextbox = document.getElementById('id1'); var mydropdown = document.getElementById('addons'); mytextbox.value = mydropdown.value; } function michael() { if(document.getElementById('selectid').value == "mount") { document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'none'; document.getElementById('mountdrop').style.display = 'block'; } if(document.getElementById('selectid').value == "addon") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'none'; document.getElementById('addon').style.display = 'block'; } if(document.getElementById('selectid').value != "addon" && document.getElementById('selectid').value != "mount") { document.getElementById('mountdrop').style.display = 'none'; document.getElementById('michael3').style.display = 'block'; document.getElementById('addon').style.display = 'none'; } } </script> EOD; #/\ Deixe assim !!! break; //form de cadastro para nova oferta /******************************************************************************************/ // Ação responsável por abrir a tela de pontos /******************************************************************************************/ case 'points': $main_content .= $items_menu; $main_content .= <<<EOD <h1 class="admshop"><strong>Adicionar pontos à um Character <small><i>(Char)</i></small></strong></h1> <form method="post" action="?subtopic=shopadmin&action=points_add"> <p class="border"><strong>Entre com o nome do Char</strong></p> <p><label class="admshop">Character <small><i>(Char)</i></small>: </label><input type="text" name="char_name" size="30" maxlength="50" /></p> <p class="border"><strong>Entre a quantidade de pontos</strong></p> <p><label class="admshop">Qtde. pontos: </label><input type="text" name="char_points" size="5" maxlength="9" /></p> <p class="border"><br /></p> <input type="submit" value="Salvar" class="bt" /> </form> <div class="clear"></div> EOD; #/\ Deixe assim !!! break; case 'points_add': $player = stripslashes(ucwords(strtolower(trim($_POST['char_name'])))); $points = is_numeric($_POST['char_points']) ? $_POST['char_points'] : 0; if(strlen($player) > 0){ $data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch(); if($data['account_id']){ $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$data['account_id']."'"); $main_content .= '<strong class="success">Pontos adicionados com sucesso à: <i>'.$player.'</i></strong><br /><br /><a href="?subtopic=shopadmin">Voltar</a>'; }else{ $main_content .= '<strong class="error">O character indicado não existe.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>'; } }else{ $main_content .= '<strong class="error">Preencha o nome do Character.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>'; } break; /******************************************************************************************/ // Por padrão, essa ação é chamada e exibe somente // os botões para cada ação do sistema /******************************************************************************************/ default: $main_content .= <<<EOD <h1 class="admshop" align="center"><strong>Bem vindo ao Administrador do Shop!</strong></h1> <hr /> <center> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=new'">Nova oferta</button> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=list'">Listar ofertas</button> <button type="button" class="bt2" onclick="location.href='?subtopic=shopadmin&action=points'">Adicionar pontos</button> <p>&nbsp;</p> <small><i>Sistema desenvolvido por Dezon e Mitsuig<br />© 2016</i></small> </center> EOD; #/\ Deixe assim !!! break; } //Fim do sistema } else { // Caso o usuário tente usar o administrador e esse, // não tiver acesso, será exibido na tela essa mensagem: $main_content .= 'Sorry, you have not the rights to access this page.'; } ?>  
     
    shopsystem.php completo:
     
    <?php if(!defined('INITIALIZED')) exit; if($config['site']['shop_system']) { if($logged) { $user_premium_points = $account_logged->getCustomField('premium_points'); } else { $user_premium_points = 'Login first'; } function getItemByID($id) { $id = (int) $id; $SQL = $GLOBALS['SQL']; $data = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_offer').' WHERE '.$SQL->fieldName('id').' = '.$SQL->quote($id).';')->fetch(); if($data['offer_type'] == 'item') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'knight') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'mount') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'addon') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } elseif($data['offer_type'] == 'premmium') { $offer['id'] = $data['id']; $offer['type'] = $data['offer_type']; $offer['item_id'] = $data['itemid1']; $offer['item_count'] = $data['count1']; $offer['points'] = $data['points']; $offer['description'] = $data['offer_description']; $offer['name'] = $data['offer_name']; } return $offer; } function getOfferArray() { $offer_list = $GLOBALS['SQL']->query('SELECT * FROM '.$GLOBALS['SQL']->tableName('z_shop_offer').';'); $i_item = 0; $i_knight = 0; $i_mount = 0; $i_addon = 0; $i_container = 0; while($data = $offer_list->fetch()) { if($data['offer_type'] == 'item') { $offer_array['item'][$i_item]['id'] = $data['id']; $offer_array['item'][$i_item]['item_id'] = $data['itemid1']; $offer_array['item'][$i_item]['item_count'] = $data['count1']; $offer_array['item'][$i_item]['points'] = $data['points']; $offer_array['item'][$i_item]['description'] = $data['offer_description']; $offer_array['item'][$i_item]['name'] = $data['offer_name']; $i_item++; } if($data['offer_type'] == 'knight') { $offer_array['knight'][$i_item]['id'] = $data['id']; $offer_array['knight'][$i_item]['item_id'] = $data['itemid1']; $offer_array['knight'][$i_item]['item_count'] = $data['count1']; $offer_array['knight'][$i_item]['points'] = $data['points']; $offer_array['knight'][$i_item]['description'] = $data['offer_description']; $offer_array['knight'][$i_item]['name'] = $data['offer_name']; $i_knight++; } elseif($data['offer_type'] == 'mount') { $offer_array['mount'][$i_mount]['id'] = $data['id']; $offer_array['mount'][$i_mount]['container_id'] = $data['itemid1']; $offer_array['mount'][$i_mount]['container_count'] = $data['count1']; $offer_array['mount'][$i_mount]['item_id'] = $data['itemid1']; $offer_array['mount'][$i_mount]['item_count'] = $data['count2']; $offer_array['mount'][$i_mount]['points'] = $data['points']; $offer_array['mount'][$i_mount]['description'] = $data['offer_description']; $offer_array['mount'][$i_mount]['name'] = $data['offer_name']; $i_mount++; } elseif($data['offer_type'] == 'addon') { $offer_array['addon'][$i_addon]['id'] = $data['id']; $offer_array['addon'][$i_addon]['container_id'] = $data['itemid1']; $offer_array['addon'][$i_addon]['container_count'] = $data['count1']; $offer_array['addon'][$i_addon]['item_id'] = $data['itemid1']; $offer_array['addon'][$i_addon]['item_count'] = $data['count2']; $offer_array['addon'][$i_addon]['points'] = $data['points']; $offer_array['addon'][$i_addon]['description'] = $data['offer_description']; $offer_array['addon'][$i_addon]['name'] = $data['offer_name']; $i_addon++; } elseif($data['offer_type'] == 'container') { $offer_array['container'][$i_container]['id'] = $data['id']; $offer_array['container'][$i_container]['container_id'] = $data['itemid1']; $offer_array['container'][$i_container]['container_count'] = $data['count1']; $offer_array['container'][$i_container]['item_id'] = $data['itemid2']; $offer_array['container'][$i_container]['item_count'] = $data['count2']; $offer_array['container'][$i_container]['points'] = $data['points']; $offer_array['container'][$i_container]['description'] = $data['offer_description']; $offer_array['container'][$i_container]['name'] = $data['offer_name']; $i_container++; } } return $offer_array; } if(($action == '') or ($action == 'item') or ($action == 'knight') or ($action == 'mount') or ($action == 'addon') or ($action == 'container')) { unset($_SESSION['viewed_confirmation_page']); $offer_list = getOfferArray(); if(empty($action)) { if(count($offer_list['item']) > 0) $action = 'item'; if(count($offer_list['knight']) > 0) $action = 'knight'; elseif(count($offer_list['mount']) > 0) $action = 'mount'; elseif(count($offer_list['addon']) > 0) $action = 'addon'; elseif(count($offer_list['container']) > 0) $action = 'container'; } function selectcolor($value) { if($GLOBALS['action'] == $value) return '#505050; color: #FFFFFF'; else return '#303030; color: #aaaaaa'; } if((count($offer_list['item']) > 0) or (count($offer_list['mount']) > 0) or (count($offer_list['addon']) > 0) or (count($offer_list['container']) > 0) or (count($offer_list['knight']) > 0)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white colspan="2"><B>Choose a categorie: </B>'; if(count($offer_list['container']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=container" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('container').';">Premium Account<img src="images/items/7.gif"/></a>'; if(count($offer_list['item']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=item" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('item').';">Items<img src="images/items/2160.gif"/></a>'; if(count($offer_list['knight']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=knight" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('knight').';">Knight<img src="images/items/knight13.gif"/></a>'; if(count($offer_list['mount']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=mount" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('mount').';">Mounts<img src="images/mount.gif"/></a>'; if(count($offer_list['addon']) > 0) $main_content .= '<a href="?subtopic=shopsystem&action=addon" style="padding: 5px 5px 7px 5px; margin: 5px 1px 0px 1px; background-color: '.selectcolor('addon').';">Addons<img src="images/addon.gif"/></a>'; $main_content .= '</TD></TR></TD></TR></table><table BORDER=0 CELLPaDDING="4" CELLSPaCING="1" style="width:100%;font-weight:bold;text-align:center;"><tr style="background:#505050;"><td colspan="3" style="height:px;"></td></tr></table>'; } //show list of items offers if((count($offer_list['item']) > 0) and ($action == 'item')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['item'] as $item) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$item['points'].'</b></td><td align="center"><img src="' . $config['site']['item_images_url'] . $item['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($item['name']).'</b> ('.$item['points'].' points)<br />'.htmlspecialchars($item['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$item['id'].'"><input type="hidden" name="buy_id" value="'.$item['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$item['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of knight offers if((count($offer_list['knight']) > 0) and ($action == 'knight')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['knight'] as $knight) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$knight['points'].'</b></td><td align="center"><img src="' . $config['site']['knight_images_url'] . $knight['knight_id'] . $config['site']['knight_images_extension'] . '"></td><td><b>'.htmlspecialchars($knight['name']).'</b> ('.$knight['points'].' points)<br />'.htmlspecialchars($knight['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="knightform_'.$knight['id'].'"><input type="hidden" name="buy_id" value="'.$knight['id'].'"><div class="navibutton"><a href="" onClick="knightform_'.$knight['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of mount offers if((count($offer_list['mount']) > 0) and ($action == 'mount')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['mount'] as $mount) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$mount['points'].'</b></td><td align="center"><img src="' . $config['site']['mounts_images_url'] . $mount['id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($mount['name']).'</b> ('.$mount['points'].' points)<br />'.htmlspecialchars($mount['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$mount['id'].'"><input type="hidden" name="buy_id" value="'.$mount['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$mount['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of addon offers if((count($offer_list['addon']) > 0) and ($action == 'addon')) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['addon'] as $addon) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$addon['points'].'</b></td><td align="center"><img src="' . $config['site']['addons_images_url'] . $addon['id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($addon['name']).'</b> ('.$addon['points'].' points)<br />'.htmlspecialchars($addon['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="itemform_'.$addon['id'].'"><input type="hidden" name="buy_id" value="'.$addon['id'].'"><div class="navibutton"><a href="" onClick="itemform_'.$addon['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //show list of containers offers if((count($offer_list['container']) > 0) and ($action == 'container')) { if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"><tr bgcolor="'.$config['site']['vdarkborder'].'"><td width="8%" align="center" class="white"><b>Points</b></td><td width="9%" align="center" class="white"><b>Picture</b></td><td width="350" align="left" class="white"><b>Description</b></td><td width="250" align="center" class="white"><b>Select product</b></td></tr>'; foreach($offer_list['container'] as $container) { $main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center"><b>'.$container['points'].'</b></td><td align="center"><img src="' . $config['site']['item_images_url'] . $container['item_id'] . $config['site']['item_images_extension'] . '"></td><td><b>'.htmlspecialchars($container['name']).'</b> ('.$container['points'].' points)<br />'.htmlspecialchars($container['description']).'</td><td align="center">'; if(!$logged) { $main_content .= '<b>Login to buy</b>'; } else { $main_content .= '<form action="?subtopic=shopsystem&action=select_player" method="POST" name="contform_'.$container['id'].'"><input type="hidden" name="buy_id" value="'.$container['id'].'"><div class="navibutton"><a href="" onClick="contform_'.$container['id'].'.submit();return false;">BUY</a></div></form>'; } $main_content .= '</td></tr>'; } $main_content .= '</table>'; } //Finish container if((count($offer_list['item']) > 0) or (count($offer_list['mount']) > 0) or (count($offer_list['addon']) > 0) or (count($offer_list['container']) > 0) or (count($offer_list['knight']) > 0)) { $main_content .= '<table BORDER=0 CELLPaDDING="4" CELLSPaCING="1" style="width:100%;font-weight:bold;text-align:center;"> <tr style="background:#505050;"> <td colspan="3" style="height:px;"></td> </tr> </table>'; } } if($action == 'select_player') { unset($_SESSION['viewed_confirmation_page']); if(!$logged) { $errormessage .= 'Please login first.'; } else { $buy_id = (int) $_REQUEST['buy_id']; if(empty($buy_id)) { $errormessage .= 'Please <a href="?subtopic=shopsystem">select item</a> first.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) //item exist in database { if($user_premium_points >= $buy_offer['points']) { $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class="white"><b>Selected Offer</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>Name:</b></td><td width="550">'.htmlspecialchars($buy_offer['name']).'</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>Description:</b></td><td width="550">'.htmlspecialchars($buy_offer['description']).'</td></tr> </table><br /> <form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class="white"><b>Give item to player from your account</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="110"><b>Name:</b></td><td width="550"><select name="buy_name">'; $players_from_logged_acc = $account_logged->getPlayersList(); if(count($players_from_logged_acc) > 0) { foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.htmlspecialchars($player->getName()).'</option>'; } } else { $main_content .= 'You don\'t have any character on your account.'; } $main_content .= '</select>&nbsp;<input type="submit" value="Give"></td></tr> </table> </form><br /><form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_id" value="'.$buy_id.'"> <table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="2" class="white"><b>Give item to other player</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="110"><b>To player:</b></td><td width="550"><input type="text" name="buy_name"> - name of player</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="110"><b>From:</b></td><td width="550"><input type="text" name="buy_from">&nbsp;<input type="submit" value="Give"> - your nick, \'empty\' = Anonymous</td></tr> </table><br /> </form>'; } else { $errormessage .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $errormessage .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem">select item</a> again.'; } } } if(!empty($errormessage)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR> </table>'; } } elseif($action == 'confirm_transaction') { if(!$logged) { $errormessage .= 'Please login first.'; } else { $buy_id = (int) $_POST['buy_id']; $buy_name = trim($_POST['buy_name']); $buy_from = trim($_POST['buy_from']); if(empty($buy_from)) { $buy_from = 'Anonymous'; } if(empty($buy_id)) { $errormessage .= 'Please <a href="?subtopic=shopsystem">select item</a> first.'; } else { if(!check_name($buy_from)) { $errormessage .= 'Invalid nick ("from player") format. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } else { $buy_offer = getItemByID($buy_id); if(isset($buy_offer['id'])) //item exist in database { if($user_premium_points >= $buy_offer['points']) { if(check_name($buy_name)) { $buy_player = new Player(); $buy_player->find($buy_name); if($buy_player->isLoaded()) { $buy_player_account = $buy_player->getAccount(); if($_SESSION['viewed_confirmation_page'] == 'yes' && $_POST['buy_confirmed'] == 'yes') { if($buy_offer['type'] == 'item') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote('').', '.$SQL->quote('').', '.$SQL->quote('item').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Item added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } if($buy_offer['type'] == 'knight') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote('').', '.$SQL->quote('').', '.$SQL->quote('item').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Item added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } elseif($buy_offer['type'] == 'mount') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote('').', '.$SQL->quote('').', '.$SQL->quote('mount').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Item added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } elseif($buy_offer['type'] == 'addon') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote('').', '.$SQL->quote('').', '.$SQL->quote('addons').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Item added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } elseif($buy_offer['type'] == 'container') { $sql = 'INSERT INTO '.$SQL->tableName('z_ots_comunication').' ('.$SQL->fieldName('id').','.$SQL->fieldName('name').','.$SQL->fieldName('type').','.$SQL->fieldName('action').','.$SQL->fieldName('param1').','.$SQL->fieldName('param2').','.$SQL->fieldName('param3').','.$SQL->fieldName('param4').','.$SQL->fieldName('param5').','.$SQL->fieldName('param6').','.$SQL->fieldName('param7').','.$SQL->fieldName('delete_it').') VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote('login').', '.$SQL->quote('give_item').', '.$SQL->quote($buy_offer['item_id']).', '.$SQL->quote($buy_offer['item_count']).', '.$SQL->quote($buy_offer['container_id']).', '.$SQL->quote($buy_offer['container_count']).', '.$SQL->quote('container').', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote($buy_offer['id']).', '.$SQL->quote(1).');'; $SQL->query($sql); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_item').' ('.$SQL->fieldName('id').','.$SQL->fieldName('to_name').','.$SQL->fieldName('to_account').','.$SQL->fieldName('from_nick').','.$SQL->fieldName('from_account').','.$SQL->fieldName('price').','.$SQL->fieldName('offer_id').','.$SQL->fieldName('trans_state').','.$SQL->fieldName('trans_start').','.$SQL->fieldName('trans_real').') VALUES ('.$SQL->lastInsertId().', '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['name']).', '.$SQL->quote('wait').', '.$SQL->quote(time()).', '.$SQL->quote(0).');'; $SQL->query($save_transaction); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Container of items added!</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.htmlspecialchars($buy_offer['name']).'</b> added to player <b>'.htmlspecialchars($buy_player->getName()).'</b> items (he will get this container with items after relog) for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="?subtopic=shopsystem">GO TO MAIN SHOP SITE</a></TD></TR> </table>'; } } else { $set_session = TRUE; $_SESSION['viewed_confirmation_page'] = 'yes'; $main_content .= '<table border="0" cellpadding="4" cellspacing="1" width="100%"> <tr bgcolor="'.$config['site']['vdarkborder'].'"><td colspan="3" class="white"><b>Confirm Transaction</b></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>Name:</b></td><td width="550" colspan="2">'. htmlspecialchars($buy_offer['name']).'</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>Description:</b></td><td width="550" colspan="2">'. htmlspecialchars($buy_offer['description']).'</td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>Cost:</b></td><td width="550" colspan="2"><b>'. htmlspecialchars($buy_offer['points']).' premium points</b> from your account</td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>For Player:</b></td><td width="550" colspan="2"><font color="red">'.htmlspecialchars($buy_player->getName()).'</font></td></tr> <tr bgcolor="'.$config['site']['lightborder'].'"><td width="100"><b>From:</b></td><td width="550" colspan="2"><font color="red">'.htmlspecialchars($buy_from).'</font></td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td colspan="3"></td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td width="100"><b>Transaction?</b></td><td width="275" align="left"> <form action="?subtopic=shopsystem&action=confirm_transaction" method="POST"><input type="hidden" name="buy_confirmed" value="yes"><input type="hidden" name="buy_id" value="'.$buy_id.'"><input type="hidden" name="buy_from" value="'.htmlspecialchars($buy_from).'"><input type="hidden" name="buy_name" value="'.htmlspecialchars($buy_name).'"><input type="submit" value="Accept"></form></td> <td align="right"><form action="?subtopic=shopsystem" method="POST"><input type="submit" value="Cancel"></form></td></tr> <tr bgcolor="'.$config['site']['darkborder'].'"><td colspan="3"></td></tr> </table> '; } } else { $errormessage .= 'Player with name <b>'.htmlspecialchars($buy_name).'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a>.'; } } else { $errormessage .= 'Invalid name format. Please <a href="?subtopic=shopsystem&action=select_player&buy_id='.$buy_id.'">select other name</a> or contact with administrator.'; } } else { $errormessage .= 'For this item you need <b>'.$buy_offer['points'].'</b> points. You have only <b>'.$user_premium_points.'</b> premium points. Please <a href="?subtopic=shopsystem">select other item</a> or buy premium points.'; } } else { $errormessage .= 'Offer with ID <b>'.$buy_id.'</b> doesn\'t exist. Please <a href="?subtopic=shopsystem">select item</a> again.'; } } } } if(!empty($errormessage)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR> </table>'; } if(!$set_session) { unset($_SESSION['viewed_confirmation_page']); } } elseif($action == 'show_history') { if(!$logged) { $errormessage .= 'Please login first.'; } else { $items_history_received = $SQL->query('SELECT * FROM '.$SQL->tableName('z_shop_history_item').' WHERE '.$SQL->fieldName('to_account').' = '.$SQL->quote($account_logged->getId()).' OR '.$SQL->fieldName('from_account').' = '.$SQL->quote($account_logged->getId()).';'); if(is_object($items_history_received)) { foreach($items_history_received as $item_received) { if($account_logged->getId() == $item_received['to_account']) $char_color = 'green'; else $char_color = 'red'; $items_received_text .= '<tr bgcolor="'.$config['site']['lightborder'].'"><td><font color="'.$char_color.'">'.htmlspecialchars($item_received['to_name']).'</font></td><td>'; if($account_logged->getId() == $item_received['from_account']) $items_received_text .= '<i>Your account</i>'; else $items_received_text .= htmlspecialchars($item_received['from_nick']); $items_received_text .= '</td><td>'.htmlspecialchars($item_received['offer_id']).'</td><td>'.date("j F Y, H:i:s", $item_received['trans_start']).'</td>'; if($item_received['trans_real'] > 0) $items_received_text .= '<td>'.date("j F Y, H:i:s", $item_received['trans_real']).'</td>'; else $items_received_text .= '<td><b><font color="red">Not realized yet.</font></b></td>'; $items_received_text .= '</tr>'; } } $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><center><B>Transactions History</B></center></TD></TR> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'"></TD></TR> </table><br>'; if(!empty($items_received_text)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white colspan="5"><B>Item Transactions</B></TD></TR> <tr bgcolor="'.$config['site']['darkborder'].'"><td><b>To:</b></td><td><b>From:</b></td><td><b>Offer name</b></td><td><b>Bought on page</b></td><td><b>Received on OTS</b></td></tr> '.$items_received_text.' </table><br />'; } if(empty($items_received_text)) $errormessage .= 'You did not buy/receive any item.'; } if(!empty($errormessage)) { $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Informations</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b>'.$errormessage.'</b></TD></TR> </table>'; } } $main_content .= '<br><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=left CLASS=white><B>Premium Points</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['lightborder'].'" ALIGN=left><b><font color="green">You have premium points: </font></b>'.$user_premium_points.'</TD></TR> </table>'; } else $main_content .= '<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4> <TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" ALIGN=center CLASS=white ><B>Shop Information</B></TD></TR> <TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><center>Shop is currently closed. [to admin: edit it in \'config/config.php\']</TD></TR> </table>';  
     
    shop.lua
    -- ### 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 adddonn = tostring(result.getDataString(result_plr, "param7")) local received_item = 0 local full_weight = 0 -- Script para addons e montaria full pelo Gesior -- if(add_item_type == 'mount') then local player = Player(cid) if (getPlayerStorageValue(cid,1) == -1) then player:addMount(itemtogive_id) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE) doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from the 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,25,"You Already have this Mount.") end return TRUE end -- fim do script -- -- Script para addons e montaria full pelo Gesior -- if(add_item_type == 'addons') then local player = Player(cid) if (getPlayerStorageValue(cid,adddonn) == -1) then local outfits = { --[outfit] = {id_female, id_male} ["1"] = {136, 128}, ["2"] = {137, 129}, ["3"] = {138, 130}, ["4"] = {139, 131}, ["5"] = {140, 132}, ["6"] = {141, 133}, ["7"] = {142, 134}, ["8"] = {147, 143}, ["9"] = {148, 144}, ["10"] = {149, 145}, ["11"] = {150, 146}, ["12"] = {155, 151}, ["13"] = {156, 152}, ["14"] = {157, 153}, ["15"] = {158, 154}, ["16"] = {252, 251}, ["17"] = {269, 268}, ["18"] = {270, 273}, ["19"] = {279, 278}, ["20"] = {288, 289}, ["21"] = {324, 325}, ["22"] = {336, 335}, ["23"] = {366, 367}, ["24"] = {431, 430}, ["25"] = {433, 432}, ["26"] = {464, 463}, ["27"] = {466, 465}, ["28"] = {471, 472}, ["29"] = {513, 512}, ["30"] = {514, 516}, ["31"] = {542, 541}, ["32"] = {575, 574}, ["33"] = {578, 577}, ["34"] = {618, 610}, ["35"] = {632, 633}, ["36"] = {635, 634}, ["37"] = {637, 636}, ["38"] = {664, 665}, ["39"] = {667, 666}, ["40"] = {683, 684}, ["41"] = {694, 695}, ["42"] = {696, 697}, ["43"] = {698, 699}, ["44"] = {724, 725}, ["45"] = {732, 733}, ["46"] = {745, 746}, ["47"] = {749, 750}, ["48"] = {759, 760}, ["49"] = {845, 846}, ["50"] = {852, 853}, ["51"] = {874, 873} } local param = string.lower(itemtogive_id) if (not player:hasOutfit(outfits[param][1], 3) or not player:hasOutfit(outfits[param][1], 2)) then player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) player:removeItem(addondoll_id, 1) player:addOutfitAddon(outfits[param][1], 3) player:addOutfitAddon(outfits[param][2], 3) player:sendTextMessage(MESSAGE_INFO_DESCR, "Seu Addon full foi adicionado!") else player:sendTextMessage(MESSAGE_INFO_DESCR, "ja tem esse addon!") end doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from The fullprojectibia 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,25,"You Already have this Outfit.") end return TRUE end -- fim do script -- 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 The fullprojectibia 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 Th3 Insanity 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 ..' Th3 Insanity 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  
     
    outfits.xml
     
    <?xml version="1.0" encoding="UTF-8"?> <outfits> <!-- Female outfits --> <outfit type="0" looktype="136" name="Citizen" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="137" name="Hunter" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="138" name="Mage" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="139" name="Knight" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="140" name="Noblewoman" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="141" name="Summoner" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="142" name="Warrior" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="147" name="Barbarian" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="148" name="Druid" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="149" name="Wizard" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="150" name="Oriental" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="155" name="Pirate" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="156" name="Assassin" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="157" name="Beggar" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="158" name="Shaman" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="252" name="Norsewoman" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="269" name="Nightmare" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="270" name="Jester" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="279" name="Brotherhood" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="288" name="Demonhunter" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="324" name="Yalaharian" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="329" name="Wife" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="336" name="Warmaster" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="366" name="Wayfarer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="431" name="Afflicted" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="433" name="Elementalist" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="464" name="Deepling" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="466" name="Insectoid" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="471" name="Entrepreneur" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="513" name="Crystal Warlord" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="514" name="Soil Guardian" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="542" name="Demon" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="575" name="Cave Explorer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="578" name="Dream Warden" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="618" name="Glooth Engineer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="620" name="Jersey" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="632" name="Champion" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="635" name="Conjurer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="636" name="Beastmaster" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="664" name="Chaos Acolyte" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="666" name="Death Herald" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="683" name="Ranger" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="694" name="Ceremonial Garb" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="696" name="Puppeteer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="698" name="Spirit Caller" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="724" name="Evoker" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="732" name="Seaweaver" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="745" name="Recruiter" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="749" name="Sea Dog" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="759" name="Royal Pumpkin" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="845" name="Rift Warrior" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="852" name="Winter Warden" premium="no" unlocked="yes" enabled="yes" /> <outfit type="0" looktype="874" name="Philosopher" premium="no" unlocked="yes" enabled="yes" /> <!-- Male outfits --> <outfit type="1" looktype="128" name="Citizen" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="129" name="Hunter" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="130" name="Mage" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="131" name="Knight" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="132" name="Nobleman" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="133" name="Summoner" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="134" name="Warrior" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="143" name="Barbarian" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="144" name="Druid" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="145" name="Wizard" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="146" name="Oriental" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="151" name="Pirate" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="152" name="Assassin" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="153" name="Beggar" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="154" name="Shaman" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="251" name="Norseman" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="268" name="Nightmare" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="273" name="Jester" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="278" name="Brotherhood" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="289" name="Demonhunter" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="325" name="Yalaharian" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="328" name="Husband" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="335" name="Warmaster" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="367" name="Wayfarer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="430" name="Afflicted" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="432" name="Elementalist" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="463" name="Deepling" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="465" name="Insectoid" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="472" name="Entrepreneur" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="512" name="Crystal Warlord" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="516" name="Soil Guardian" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="541" name="Demon" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="574" name="Cave Explorer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="577" name="Dream Warden" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="610" name="Glooth Engineer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="619" name="Jersey" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="633" name="Champion" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="634" name="Conjurer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="637" name="Beastmaster" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="665" name="Chaos Acolyte" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="667" name="Death Herald" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="684" name="Ranger" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="695" name="Ceremonial Garb" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="697" name="Puppeteer" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="699" name="Spirit Caller" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="725" name="Evoker" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="733" name="Seaweaver" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="746" name="Recruiter" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="750" name="Sea Dog" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="760" name="Royal Pumpkin" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="846" name="Rift Warrior" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="853" name="Winter Warden" premium="no" unlocked="yes" enabled="yes" /> <outfit type="1" looktype="873" name="Philosopher" premium="no" unlocked="yes" enabled="yes" /> </outfits>  
     
    Observações: O código ta feio mesmo, uma conexão a mais no mysql n vai matar ninguém, aqui funcionou perfeitamente. Você terá q renomear os gifs dos outfits e addons para 1,2,3... seguindo a ordem que está ai. O código tem limitações, não verifica se o jogador já tem uma addon ou mount, outro dia irei concluir isso. Futuramente é interessante chamar a função de salvar o jogador pois se o ot cair sem ter salvo a pessoa perde o que comprou.
  9. Gostei
    Bom dia, Boa tarde, Boa noite a todos, Hoje eu gravei um video ensinando ao pessoal que não sabe ou que na hora de compilar o theforgottenserve acontece algum erro, hoje vou ensinar a como fazer do jeito simples e certo, porem apenas gravei, não deu tempo de editar não deu tempo de fazer muita coisa, apenas gravei e postei no youtube ! desculpas pela falta de qualidade no video, quis apenas ajudar as pessoas que estão perdidas nesse processo !
     
  10. Gostei
    Upload them anyway and quote your changed theres few people waiting on the update but apparently  "Fin de Semana" in portuguese means more than 1 month haha not sure yet anyways I'll be looking for your link if you upload it I have several fixes and additions to this/absolute datapack that im also willing to share with the public let me know!
  11. Gostei
    Todas Hunt são na posição do tibia  global !
     
    DOWNLOAD
    scan
     








  12. Gostei
    ramses82 deu reputação a G3 Yuri em Hunter Camp   
    Posição da hunt port hope {x = 32878, y = 32791, z = 7}
     
    Link 
    Scan  
     


  13. Gostei
    ramses82 deu reputação a dupipsa em Pack Scripts   
    Compartilhe seus scripts
    https://www.dropbox.com/s/p1hmm6zt11r3pdv/windbot%20scripts.rar?dl=0
  14. Gostei
    atualização no fim de semana, tudo que foi reportado foram arrumados.
  15. Gostei
    ramses82 deu reputação a Bruxo Ots em Monstros e Items 10.94 10.98 10.99   
    Atualização de Monstros e Items. 
     
     
      Estarei atualizando essa lista conforme eu for mudando  meus items, e monstros.(a antiga estava bem cagada).
       Estou usando como fonte o tibiawiki, e o wikia, porém algumas criaturas não tem os detalhes certos, como ataque, loot. 
        E outras usam script, a parte de level(movements), de quem ou oque vai usar o item, não irei postar pois cada pessoa acha                melhor como vai usar esse items, deixarei um download e sua respectiva scan no final do tópico, se encontrarem algo errado           e só dizer que arrumo, e claro se quiserem contribuir com algo que ainda não tenha...
     
     
      A principio roshamuul esta linda agora, consegui adicionar todos os items que faltavam.
              " see an item of type "   não tem mais essa coisa la.
     
     Otherworld a mesma coisa, so tem uma parte que não mexi ainda, mais na próxima atualização eu trago.
     
     Todos os itens nostalgia que veio no aniver da cip, consegui add todos desde a 10.94 até 11.01.
              sim ainda faltavam alguns items 10.94, e acredito que ainda falte, mudei o nome de muita coisa que estava igual.
    So um lembrete, alguns itens estão com o nome unknow, esses tenho que descobrir ainda.
     
    items.rar
     
     
     
     
     
     
     
     
     
     
     
     
     
  16. Gostei
    ramses82 deu reputação a G3 Yuri em [Link Quebrado] Nightmare Isles   
    Espero que goste !!
    Entrada {x = 33217, y = 32273, z = 7}   Hunt !  {x = 33497, y = 32615, z = 8}       Falta Ajusta os tps !    att #Yurao
     
    Link
     
    SCAN
     


  17. Gostei
    ramses82 deu reputação a DavyziinC em [pedido] Npc Cassino   
    @edited. 
    Obrigado funcionou Rep+
  18. Gostei
    ramses82 recebeu reputação de DavyziinC em [pedido] Npc Cassino   
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}
     
    function onCreatureAppear(cid)                          npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid)                       npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg)          npcHandler:onCreatureSay(cid, type, msg) end
    function onThink()                                              npcHandler:onThink() end
     
    local function delayMoneyRemoval(item, pos)
            doRemoveItem(getTileItemById(pos, item).uid)
            return true
    end
     
    local function placeMoney(amount, table_middle_pos)
            local remain = amount
            local crystal_coins = 0
            local platinum_coins = 0
     
            if (math.floor(amount / 10000) >= 1) then
                    crystal_coins = math.floor(amount / 10000)
                    remain = remain - crystal_coins * 10000
            end
            if ((remain / 100) >= 1) then
                    platinum_coins = remain / 100
            end
            addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos)
            addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos)
    end
     
    local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc)
            local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797}
            local random_rollval = math.random(1,6)
            local total_g = (10000 * cc_count) + (100 * pc_count)
            local prize_percent = 0.8 -- 80%
     
            if ((total_g) <= 300000 and (total_g) >= 5000) then
                    doSendMagicEffect(table_left_pos, CONST_ME_CRAPS)
     
                    for _, itemId in pairs(dice_ids) do
                                    if(getTileItemById(table_left_pos, itemId).uid > 0) then
                                    doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval])
                            end
                    end
     
                    if (roll == 1 and random_rollval <= 3) then
                            placeMoney(total_g + (total_g * prize_percent), table_middle_pos)
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0)
                    elseif (roll == 2 and random_rollval >= 4) then
                            placeMoney(total_g + (total_g * prize_percent), table_middle_pos)
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN)
                            addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0)
                    else
                            addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT)
                            addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT)
                            addEvent(doCreatureSay, 500, npc, "Better luck next time.", TALKTYPE_SAY, false, 0)
                    end
                    doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos)
            else
                    addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos)
                    addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos)
                    doCreatureSay(npc, "The minimum wager is 5K and the maximum wager is 300K.", TALKTYPE_SAY, false, 0)
            end
            return true
    end
     
    function creatureSayCallback(cid, type, msg)
            -- NPC userdata instance
            local npc = getNpcCid()
     
            -- Game table position userdata instances
            local table_left_pos = {x = 32228, y = 32190, z = 15} -- Pos da frente do Npc onde gira o dado
            local table_middle_pos = {x = 32228, y = 32191, z = 15} -- Pos do meio onde vai o dinheiro
     
            -- Search for coins on the left and middle tables and create item userdata instances
            local table_middle_cc = getTileItemById(table_middle_pos, 2160)
            local table_middle_pc = getTileItemById(table_middle_pos, 2152)
     
            -- Other variables
            local cc_count = 0
            local pc_count = 0
            local ROLL, LOW, HIGH = 0, 1, 2
            posplayer = {x=32229, y=32192, z=15} -- Pos onde o player precisa estar
                    local ppos = getPlayerPosition(cid)
            if ppos.x == posplayer.x and ppos.y == posplayer.y then
            if isInArray({"H", "HIGH", "high", "h"}, msg) then
                            ROLL = HIGH
                    elseif  isInArray({"L", "LOW", "l", "low"}, msg) then
                            ROLL = LOW             
                    else
                            return false
                    end
                    if (table_middle_cc.uid ~= 0) then
                            cc_count = table_middle_cc.type
                            doTeleportThing(table_middle_cc.uid, table_left_pos)
                            addEvent(delayMoneyRemoval, 300, 2160, table_left_pos)
                    end
                    if (table_middle_pc.uid ~= 0) then
                            pc_count = table_middle_pc.type
                            doTeleportThing(table_middle_pc.uid, table_left_pos)
                            addEvent(delayMoneyRemoval, 300, 2152, table_left_pos)
                    end
                    addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc)
            else
                    return false
            end
            return true
    end
     
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())
     
    this is only h / l choose your own npc with this file vegas.lua on npc Then  on scripts
     
    o<?xml version="1.0" encoding="UTF-8"?>
    <npc name="Vegas" script="Vegas.lua" walkinterval="0" floorchange="0">
    <health now="100" max="100"/>
    <look type="132" head="114" body="0" legs="0" feet="114" addons="3"/>
        <parameters>
            <parameter key="message_greet" value="Hello, |PLAYERNAME|. You can bet speaking {H} or {L}, the minimum wager is 5K and the maximum wager is 300K." />
        </parameters>
    </npc>n this npc folder vegas
       
    from Absolute
  19. Gostei
    ramses82 deu reputação a Reeke em [action] Unlock ALL Quest DOLL or ITEM   
    Hello everyone here's some actions I used to unblock quest/access in some of the available data packs around.
    You can try using different items to unblock each quest or you can use one to unblock all of them at once (I think, I haven't try it that way but it should hahaha)
    Anyways let me tell how is done, and I hope it will help someone ;D..
     
    1. Think the name of the Item you want to use to unblock the quest, in this case I will be using the Draken Doll (ID:20625)(It may vary on your items.obt make sure you have the right ID.)
    2. make a file in actions/other/zao_doll.lua. with the fallowing code.
    function onUse(player, cid, item, fromPosition, target, toPosition, isHotkey) if player:getStorageValue(Storage.TheNewFrontier.Questline) <=27 then player:removeItem(20625, 1) doSendMagicEffect(getCreaturePosition(cid), 28) player:setStorageValue(Storage.TheNewFrontier.Questline, 28) player:setStorageValue(Storage.TheNewFrontier.Mission01, 3) player:setStorageValue(Storage.TheNewFrontier.Mission02, 6) player:setStorageValue(Storage.TheNewFrontier.Mission03, 3) player:setStorageValue(Storage.TheNewFrontier.Mission04, 2) player:setStorageValue(Storage.TheNewFrontier.Mission05, 7) player:setStorageValue(Storage.TheNewFrontier.Mission06, 3) player:setStorageValue(Storage.TheNewFrontier.Mission07, 3) player:setStorageValue(Storage.TheNewFrontier.Mission08, 2) player:setStorageValue(Storage.TheNewFrontier.Mission09, 3) player:setStorageValue(Storage.TheNewFrontier.Mission10, 1) player:setStorageValue(Storage.TheNewFrontier.TomeofKnowledge, 12) player:setStorageValue(Storage.TheNewFrontier.Beaver1, 1) player:setStorageValue(Storage.TheNewFrontier.Beaver2, 1) player:setStorageValue(Storage.TheNewFrontier.Beaver3, 1) player:setStorageValue(Storage.TheNewFrontier.BribeKing, 1) player:setStorageValue(Storage.TheNewFrontier.BribeLeeland, 1) player:setStorageValue(Storage.TheNewFrontier.BribeExplorerSociety, 1) player:setStorageValue(Storage.TheNewFrontier.BribeWydrin, 1) player:setStorageValue(Storage.TheNewFrontier.BribeTelas, 1) player:setStorageValue(Storage.TheNewFrontier.BribeHumgolf, 1) player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 21) player:setStorageValue(Storage.ChildrenoftheRevolution.Mission00, 2) player:setStorageValue(Storage.ChildrenoftheRevolution.Mission01, 3) player:setStorageValue(Storage.ChildrenoftheRevolution.Mission02, 5) player:setStorageValue(Storage.ChildrenoftheRevolution.Mission03, 3) player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 6) player:setStorageValue(Storage.ChildrenoftheRevolution.Mission05, 3) player:setStorageValue(Storage.ChildrenoftheRevolution.SpyBuilding01, 1) player:setStorageValue(Storage.ChildrenoftheRevolution.SpyBuilding02, 1) player:setStorageValue(Storage.ChildrenoftheRevolution.SpyBuilding03, 1) player:setStorageValue(Storage.ChildrenoftheRevolution.StrangeSymbols, 1) player:setStorageValue(Storage.WrathoftheEmperor.Questline, 34) player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3) player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 3) player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 3) player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 3) player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 3) player:setStorageValue(Storage.WrathoftheEmperor.Mission06, 4) player:setStorageValue(Storage.WrathoftheEmperor.Mission07, 6) player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 2) player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 2) player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 6) player:setStorageValue(Storage.WrathoftheEmperor.Mission11, 2) player:setStorageValue(Storage.WrathoftheEmperor.Mission12, 0) player:setStorageValue(Storage.WrathoftheEmperor.CrateStatus, 1) player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, 1) player:setStorageValue(Storage.WrathoftheEmperor.ZumtahStatus, 1) player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 1) player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest01, 1) player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest02, 1) player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest03, 1) player:setStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion, 1) player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 1) player:setStorageValue(Storage.WrathoftheEmperor.platinumReward, 0) player:setStorageValue(Storage.WrathoftheEmperor.backpackReward, 0) player:setStorageValue(Storage.WrathoftheEmperor.mainReward, 0) player:setStorageValue(Storage.WrathoftheEmperor.TeleportAcess, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) -- Quest Addons player:addOutfit(335, 2) player:addOutfit(336, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Quest Unlocked...") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already unlocked this quest.") end return true end 3. Edit file scripts/scripts.xml and add this: (make sure you use the ID of the Item you choose).
    <action itemid="20625" script="other/zao_doll.lua" /> 4. Reload actions and that's it it should work. You can make as many as you want for different quest or what not.
     
     
     
     
    Here's a list of some quest I have tested just copy the values and add them or exchange them for your convenience just change the value of the quest line -1  from the value of each quest
     
    Inquisition Quest Values:
    player:setStorageValue(Storage.TheInquisition.Questline, 25) player:setStorageValue(Storage.TheInquisition.Mission01, 7) player:setStorageValue(Storage.TheInquisition.Mission02, 3) player:setStorageValue(Storage.TheInquisition.Mission03, 6) player:setStorageValue(Storage.TheInquisition.Mission04, 3) player:setStorageValue(Storage.TheInquisition.Mission05, 3) player:setStorageValue(Storage.TheInquisition.Mission06, 3) player:setStorageValue(Storage.TheInquisition.Mission07, 4) player:setStorageValue(Storage.TheInquisition.GrofGuard, 1) player:setStorageValue(Storage.TheInquisition.KulagGuard, 1) player:setStorageValue(Storage.TheInquisition.TimGuard, 1) player:setStorageValue(Storage.TheInquisition.WalterGuard, 1) player:setStorageValue(Storage.TheInquisition.StorkusVampiredust, 1) player:setStorageValue(Storage.TheInquisition.EnterTeleport, 1) player:addOutfitAddon(288, 3) player:addOutfitAddon(289, 3) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:addAchievement('Demonbane') Shattered Islands Values:
    player:setStorageValue(Storage.TheShatteredIsles.DefaultStart, 1) player:setStorageValue(Storage.TheShatteredIsles.TheGovernorDaughter, 3) player:setStorageValue(Storage.TheShatteredIsles.TheErrand, 2) player:setStorageValue(Storage.TheShatteredIsles.AccessToMeriana, 1) player:setStorageValue(Storage.TheShatteredIsles.APoemForTheMermaid, 3) player:setStorageValue(Storage.TheShatteredIsles.ADjinnInLove, 5) player:setStorageValue(Storage.TheShatteredIsles.AccessToLagunaIsland, 1) player:setStorageValue(Storage.TheShatteredIsles.AccessToGoroma, 1) player:setStorageValue(Storage.TheShatteredIsles.Shipwrecked, 2) player:setStorageValue(Storage.TheShatteredIsles.DragahsSpellbook, 1) player:setStorageValue(Storage.TheShatteredIsles.TheCounterspell, 4) Yalahar Quest:
    player:setStorageValue(Storage.InServiceofYalahar.Questline, 53) player:setStorageValue(Storage.InServiceofYalahar.Mission01, 6) player:setStorageValue(Storage.InServiceofYalahar.Mission02, 8) player:setStorageValue(Storage.InServiceofYalahar.Mission03, 6) player:setStorageValue(Storage.InServiceofYalahar.Mission04, 6) player:setStorageValue(Storage.InServiceofYalahar.Mission05, 8) player:setStorageValue(Storage.InServiceofYalahar.Mission06, 5) player:setStorageValue(Storage.InServiceofYalahar.Mission07, 5) player:setStorageValue(Storage.InServiceofYalahar.Mission08, 4) player:setStorageValue(Storage.InServiceofYalahar.Mission09, 2) player:setStorageValue(Storage.InServiceofYalahar.Mission10, 5) player:setStorageValue(Storage.InServiceofYalahar.SewerPipe01, 1) player:setStorageValue(Storage.InServiceofYalahar.SewerPipe02, 1) player:setStorageValue(Storage.InServiceofYalahar.SewerPipe03, 1) player:setStorageValue(Storage.InServiceofYalahar.SewerPipe04, 1) player:setStorageValue(Storage.InServiceofYalahar.DiseasedDan, 1) player:setStorageValue(Storage.InServiceofYalahar.DiseasedBill, 1) player:setStorageValue(Storage.InServiceofYalahar.DiseasedFred, 1) player:setStorageValue(Storage.InServiceofYalahar.AlchemistFormula, 1) player:setStorageValue(Storage.InServiceofYalahar.BadSide, 1) player:setStorageValue(Storage.InServiceofYalahar.GoodSide , 1) player:setStorageValue(Storage.InServiceofYalahar.MrWestDoor, 1) player:setStorageValue(Storage.InServiceofYalahar.MrWestStatus, 1) player:setStorageValue(Storage.InServiceofYalahar.TamerinStatus, 1) player:setStorageValue(Storage.InServiceofYalahar.MorikSummon, 1) player:setStorageValue(Storage.InServiceofYalahar.QuaraState, 1) player:setStorageValue(Storage.InServiceofYalahar.QuaraSplasher, 1) player:setStorageValue(Storage.InServiceofYalahar.QuaraSharptooth, 1) player:setStorageValue(Storage.InServiceofYalahar.QuaraInky, 1) player:setStorageValue(Storage.InServiceofYalahar.MatrixState, 1) player:setStorageValue(Storage.InServiceofYalahar.NotesPalimuth, 1) player:setStorageValue(Storage.InServiceofYalahar.NotesAzerus, 1) player:setStorageValue(Storage.InServiceofYalahar.DoorToAzerus, 1) player:setStorageValue(Storage.InServiceofYalahar.DoorToBog, 1) player:setStorageValue(Storage.InServiceofYalahar.DoorToLastFight, 1) player:setStorageValue(Storage.InServiceofYalahar.DoorToMatrix, 1) player:setStorageValue(Storage.InServiceofYalahar.DoorToQuara, 1) player:setStorageValue(Storage.InServiceofYalahar.DoorToReward, 1)  
     
    I will be posting some others as soon as I finish them.. 
    any questions I'll be glad to help:)
    I'm sorry for writing in English but I can't speak Portuguese:(
  20. Gostei
    you can see you commands in \data\talkactions\talkactions.XML
  21. Gostei
    ramses82 recebeu reputação de Reeke em [action] Unlock ALL Quest DOLL or ITEM   
    NIIICEE
  22. Gostei
    Nah Its pretty much the samething as Absolute same bugs same everything, he edited yalahar city remove the fenses but no teleports ROLF, had some errors  with some NPCs, lua files easy to fix, and im still trying to figure whatelse is changed, Krailos or whatever loooks less buggy but the Ogree  monsters when trying to open the corpse to check loot it debugs, whats the point of using the right ID of the corpse if is not in the items.xml
     If you are struggling with the teleports I wrote this about some dolls for some "important" quest haha 
    check ii out right here;)
     
  23. Gostei
    Amigo ele podia ter vindo pedir para entrar no projeto e colaborar e ter seus devidos créditos ou participado la no tópico oficial normalmente,agora pegar uma base pronta que foi levado meses de outras pessoas encima e dizer que é sua isso é injusto e vai contra as regras do fórum, ainda mais que pela fama dele, sabe se la os bugs que ele colocou de proposito no pack para os prejudicar os outros, sem contar que deve ter se aproveitado dos reports do topico do meu servidor para corrigir meia duzia de coisas sendo que ja estamos fazendo uma v2 com várias correções, agora postar aqui exatamente o mesmo servidor e dizer que é dele totalmente desonesto mas vindo do ó grandioso mitsuig não me surpreende.
  24. Gostei
    Orra jovi vieram me notificar tive de baixar junto com o @Absolute e ver... você pegou nosso servidor editou simples coisas, editou o items.xml adicionando mal e porcamente alguns items novos e fez o re-up?
    Se você não quer atualizar essa porcaria desse datapack 1.0 você pega e avisa os membros ou deixa do jeito que estava! Agora copiar algo mudar tal coisa e colocar no fórum é feio em? Mas é de se esperar vindo de sua pessoa.
    Estou entrando em contato com a administração do fórum para realizar a exclusão do tópico e manda-lo pra onde já era pra ter ido banitera.
    Beijos do seu ídolo.
    OBS: Não quero causar intriga apenas alertar a todos perante este ladrãozinho,era de dinheiro... agora de packs/projetos kakakakaka
  25. Gostei
    Global 11/12x [v32]
     

     
     
    - New Falcons
    - New Asuras
    - Warzone 4,5,6
    - Exercise Training
    - Raids 100%
    - Monstros 100%
    - Trainer Offline 100%
    - Trainer Online 100%
    - Taming system funcionando 100%;
    - Database completa
    - War System 100%
    - Global MAP Full
    - Store 100%
    - Imbuement
    - Prey System
    - Entre outros sistemas.
     
    Projeto no: GITHUB

    Scan Vírus Total
     
    IMAGES
     
    Créditos:
     
     











Informação Importante

Confirmação de Termo