Ir para conteúdo

leandroskt8

Campones
  • Total de itens

    53
  • Registro em

  • Última visita

  • Dias Ganhos

    1

Tudo que leandroskt8 postou

  1. bom, mais podia ser mais especifico pq tem cara que não sabe algumas tags de atributos mais ta ótimo parabéns vai ajuda bastante gente ;D
  2. vai config.luar procure por newPlayerLevel mude para newPlayerLevel = 120 as askill ja começa 0 da rep ai
  3. Tenta essa vocations.xlm aqui troce pela sua. <?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Master Sorcerer" description="a master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="150" gainmanaticks="2" gainmanaamount="400" manamultiplier="1.1" attackspeed="400" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="2" name="Elder Druid" description="a elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="150" gainmanaticks="2" gainmanaamount="400" manamultiplier="1.1" attackspeed="400" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="3" name="Royal Paladin" description="a royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="400" gainmanaticks="3" gainmanaamount="250" manamultiplier="1.4" attackspeed="400" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="4" name="Elite Knight" description="a elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="420" gainmanaticks="3" gainmanaamount="200" manamultiplier="3.0" attackspeed="400" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="5" name="Vip Baiak Sorcerer" description="a vip baiak sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="200" gainmanaticks="2" gainmanaamount="450" manamultiplier="1.1" attackspeed="300" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="6" name="Vip Baiak Druid" description="an vip baiak druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="200" gainmanaticks="2" gainmanaamount="450" manamultiplier="1.1" attackspeed="300" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="7" name="Vip Baiak Paladin" description="a vip baiak paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="420" gainmanaticks="2" gainmanaamount="260" manamultiplier="1.4" attackspeed="350" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Vip Baiak Knight" description="an vip baiak knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="460" gainmanaticks="3" gainmanaamount="245" manamultiplier="3.0" attackspeed="350" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> </vocations>
  4. e cara só adicionar la em talkaction essas duas tags depois usar comando normal !createguild nome da guild !joinguild nome da guild <talkaction words="!createguild" event="function" value="guildCreate"/> <talkaction words="!joinguild" event="function" value="guildJoin"/>
  5. leandroskt8

    Castle War

    De uma olhada nesse forum talvez te ajude.. http://www.xtibia.com/forum/topic/138001-castle-war-20/
  6. vai no config. lua procure por stairhopDelay coloque stairhopDelay = 0 * 1000 Que eu tiver ajudado da rep+ ai
  7. Irei postar 2 Scripts Uteis para vc ! Esse e para vc criar guild coloca ele la em data/talkaction <!-- Guilds --> <talkaction words="!createguild" event="function" value="guildCreate"/> <talkaction words="!joinguild" event="function" value="guildJoin"/> essa e para ver Membros da guild criada pelo nosso amigo Vodkart O comando checa: - O total de membros que sua guild possui - Quantos Players Tem online - Mostra o nome e o Rank dos jogadores Online Em lib/050-function adicione: function CountGuildMembers(GuildName) -- function by vodkart local count = 0 local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. getGuildId(GuildName) .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() return count end end Em talkactions/script guildinformation.lua function onSay(cid, words, param, channel) local players,str,GuildName = {},'',getPlayerGuildName(cid) if getPlayerGuildId(cid) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa estar em uma Guild.") return true end for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildName(cid) == GuildName then table.insert(players, cid) end end str = str .. "Membros total da guild: "..CountGuildMembers(GuildName).." Players.\n\nExiste "..#players.." Players online na sua guild:\n\n" for i = 1, #players do str = str.."\n["..getPlayerName(players[i]).."]["..getPlayerGuildRank(players[i]).."]" end return doShowTextDialog(cid, 2533, str) end <talkaction words="!guild" event="script" value="guildinformation.lua"/> Que eu tiver ajudado da rep ai
  8. http://www.xtibia.com/forum/topic/167671-tfs-by-lokeras910global-full-old-yourts-editado/ que tiver ajudado da rep ai
  9. Ot cliente fumfa ate ultima versão recente do tibia
  10. quero quando player upar x level ganhar x iten conforme esta no script só que n sei que ta de errado nele alguem me ajuda ai pf valendo rep+ local configuracao = { efeito = {27,28, 29,79}, -- Efeito que vai mandar ao avançar de level. } function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerStorageValue(cid, 25686) >= 1 or getPlayerStorageValue(cid, 25687) >= 1 then return true end if (getPlayerLevel(cid) == 150) then doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25686, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 4, 8, 12 then -- vocações doPlayerAddItem(cid, 115, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 3, 7, 11 then -- vocações doPlayerAddItem(cid, 2352, 1) doPlayerAddItem(cid, 7438, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 2, 10, 6 then -- vocações doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 1, 5, 9 then -- vocações doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) end return true end preciso para essas vocações e esses itens . Obg
  11. esse escript ta sem strorage, quando cara more e volta level ele consege iten novamente quero que alguem me ajude com esse script aqui! local configuracao = { efeito = {27,28, 29,79}, -- Efeito que vai mandar ao avançar de level. } function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerStorageValue(cid, 25686) >= 1 or getPlayerStorageValue(cid, 25687) >= 1 then return true end if (getPlayerLevel(cid) == 150) then doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25686, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 4, 8, 12 then -- vocações doPlayerAddItem(cid, 115, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 3, 7, 11 then -- vocações doPlayerAddItem(cid, 2352, 1) doPlayerAddItem(cid, 7438, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 2, 10, 6 then -- vocações doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 1, 5, 9 then -- vocações doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) end return true end preciso para essas vocações e esses itens . Obg
  12. quero um script quando player pegar x level ganhar x iten para cada vocação o x iten diferente Obg! valendo rep Tenho esse script só que ta dando erro alguem me ajuda ai pf. local configuracao = { efeito = {27,28, 29,79}, -- Efeito que vai mandar ao avançar de level. } function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerStorageValue(cid, 25686) >= 1 or getPlayerStorageValue(cid, 25687) >= 1 then return true end if (getPlayerLevel(cid) == 150) then doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25686, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 4, 8, 12 then -- vocações doPlayerAddItem(cid, 115, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 3, 7, 11 then -- vocações doPlayerAddItem(cid, 2352, 1) doPlayerAddItem(cid, 7438, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 2, 10, 6 then -- vocações doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) elseif (getPlayerLevel(cid) == 150) and getPlayerVocation(cid) == 1, 5, 9 then -- vocações doPlayerAddItem(cid, 7424, 1) doSendMagicEffect(getThingPos(cid), configuracao.efeito[math.random(#configuracao.efeito)]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, ) setPlayerStorageValue(cid, 25687, 1) end return true end
  13. local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", "This item can only be used by the player ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerSellItem(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop 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 ..' << from OTS shop 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 if not(result_plr:next()) then break end end result_plr:free() end return true end
  14. [1:36:52.207] [Error - GlobalEvent Interface] [1:36:52.207] data/globalevents/scripts/shop.lua:onThink [1:36:52.207] Description: [1:36:52.207] data/globalevents/scripts/shop.lua:37: attempt to compare boolean with number [1:36:52.207] stack traceback: [1:36:52.207] data/globalevents/scripts/shop.lua:37: in function <data/globalevents/scripts/shop.lua:3> valendo rep +
  15. Quero um script quem apenas quem comprou iten no shop possa usa-lo ja vi um tópico, disso aqui só que não achei alguem puder me ajuda fico grato dez de já valendo rep+.
  16. local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGE local SQL_interval = 30 function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", "This item can only be used by the player ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop 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 ..' << from OTS shop 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 if not(result_plr:next()) then break end end result_plr:free() end return true end
  17. bom tenho um ring em meu server de exp ring quando pessoa compra ele e ele cai diretamente no deto do player ot cai queria saber que tem alguma forma do player receber x iten dentro de uma bp ou dentro do dp brigado valendo rep++
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...