MatheusGlad
Conde-
Total de itens
528 -
Registro em
-
Última visita
-
Dias Ganhos
30
Tudo que MatheusGlad postou
-
Hmm tenta isso entao: function onSay(cid, words, param) local coisas = db.storeQuery("SELECT `level` FROM `global`.`players` WHERE `name` = 'Master Pig';") player_level = result.getDataInt(coisas, "level") cid:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Name: " .. player_level) end Bem o porque do erro eh bem simples: "attempt to call field 'getResult' (a nil value)" ou seja db.getResult = nil entao nao existe essa funçao, provavelmente mudaram no TFS 1.0. Nunca usei query em TFS 1.0, usei o google soh pra ver se achava e vi um cara falando que a funçao tinha mudado. Edit: Não é que mudaram no tfs 1.0 soh que tiraram o 004-database.lua, se adicionar ele direito denovo deve funcionar.
-
Troca db.getResult por db.storeQuery. E troca o player por cid mesmo. function onSay(cid, words, param) local coisas = db.storeQuery("SELECT `level` FROM `global`.`players` WHERE `name` = 'Master Pig';") player_level = coisas:getDataInt("level") cid:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Name: " .. player_level) end
-
local EFFECTS = { --[OutfitID] = {Effect} ["Magmar"] = 35, ["Magmortar"] = 35, ["Magby"] = 35, ["Smoochum"] = 17, ["Jynx"] = 17, ["Shiny Jynx"] = 17, } function onUse(cid, item, frompos, item2, topos) if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end --alterado v1.6 sistema de firstpoke retirado if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then return true end ------------------------------------------------------- ballName = getItemAttribute(item.uid, "poke") btype = getPokeballType(item.itemid) usando = pokeballs[btype].use local effect = pokeballs[btype].effect if not effect then effect = 21 end ---------------------------------------------------------- if item.itemid == usando then if getPlayerStorageValue(cid, 990) == 1 then -- GYM doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.") return true end --------------------------------------------------------------------------------------- if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6 if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then BackTeam(cid) end end --------------------------------------------------------------------------------------- if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then doPlayerSendCancel(cid, "You can't do that while is controling a mind") return true --alterado v1.5 end --------------------------------------------------------------------------------------- if #getCreatureSummons(cid) <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "This pokemon is fainted.") return true end end local cd = getCD(item.uid, "blink", 30) if cd > 0 then setCD(item.uid, "blink", 0) end local z = getCreatureSummons(cid)[1] if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then return true end doReturnPokemon(cid, z, item, effect) elseif item.itemid == pokeballs[btype].on then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "You must put your pokeball in the correct place!") return TRUE end local thishp = getItemAttribute(item.uid, "hp") if thishp <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "This pokemon is fainted.") return true end end local pokemon = getItemAttribute(item.uid, "poke") if not pokes[pokemon] then return true end if isLegendaryPokemon(pokemon) and not isInArray({5, 6}, getPlayerGroupId(cid)) then doPlayerSendTextMessage(cid, 27, "You can't use a legendary pokemon.") doRemoveItem(item.uid) return true end ----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto --------------------------------- if not isInArray({5, 6}, getPlayerGroupId(cid)) then local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"} local low = {} local lw = 1 for e, f in pairs(pokeballs) do for times = 1, 3 do local items = getItemsInContainerById(bp.uid, pokeballs[e].all[times]) if #items >= 1 then --alterado v1.6 for _, uid in pairs(items) do local nome1 = getItemAttribute(uid, "poke") if pokes[pokemon].level > 10 and nome1 == pokemon then return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!") elseif pokes[pokemon].level <= 10 then if nome1 == pokemon then table.insert(low, lw, nome1) lw = lw +1 end end end end end end if #low >= 3 then return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!") end end --------------------------------------------------------------------------------------------------------------------------------------------------- local x = pokes[pokemon] local boost = getItemAttribute(item.uid, "boost") or 0 if getPlayerLevel(cid) < (x.level+boost) then doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.") return true end -------------------------------------------------------------------------------------- shinysClan = { ["Shiny Flareon"] = {1, "Volcanic"}, ["Shiny Vaporeon"] = {2, "Seavel"}, ["Shiny Golem"] = {3, "Orebound"}, ["Shiny Fearow"] = {4, "Wingeon"}, ["Shiny Nidoking"] = {5, "Malefic"}, ["Shiny Hitmontop"] = {6, "Gardestrike"}, --alterado v1.4 ["Shiny Hypno"] = {7, "Psycraft"}, ["Shiny Vileplume"] = {8, "Naturia"}, ["Shiny Jolteon"] = {9, "Raibolt"}, } if shinysClan[pokemon] and (getPlayerGroupId(cid) < 3 or getPlayerGroupId(cid) > 6) then if getPlayerStorageValue(cid, 86228) ~= shinysClan[pokemon][1] then doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!") return true elseif getPlayerStorageValue(cid, 862281) ~= 5 then doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!") return true end end -------------------------------------------------------------------------------------- doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end ------------------------passiva hitmonchan------------------------------ if isSummon(pk) then local nameHIT = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke") local hands = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands") if nameHIT == "Shiny Hitmonchan" or nameHIT == "Hitmonchan" then if getItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands") then doSetCreatureOutfit(pk, {lookType = hitmonchans[nameHIT][hands].out}, -1) else doPlayerSendTextMessage(cid, 27, "Contact a GameMaster! Error in passive system! Attribute \"hands\" missing") doSetItemAttribute(getPlayerSlotItem(cid, 8).uid, "hands", 0) end end end ------------------------------------------------------------------------- ---------movement magmar, jynx------------- if EFFECTS[getCreatureName(pk)] then --edited efeito magmar/jynx markPosEff(pk, getThingPos(pk)) sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) --alterado v1.5 end -------------------------------------------------------------------------- if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited local left = getItemAttribute(item.uid, "transLeft") local name = getItemAttribute(item.uid, "transName") if left and left > 0 then setPlayerStorageValue(pk, 1010, name) doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1) addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn")) doItemSetAttribute(item.uid, "transBegin", os.clock()) else setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited end if name == "Smeargle" then doPlayerSendCancel(cid, "Your ditto can't copy a smeargle.") return true end if isLegendaryPokemon(name) or name == "Smeargle" or isInArray(dittoShinyCopy, name) then deTransform(pk, getItemAttribute(item.uid, "transTurn")) markPos(pk, {x = 1, y = 1, z = 1}) doPlayerSay(cid, ""..getPokeName(pk)..", stop transformation!", 1) return true end end if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end doCreatureSetLookDir(pk, 2) adjustStatus(pk, item.uid, true, true, true) doAddPokemonInOwnList(cid, pokemon) doTransformItem(item.uid, item.itemid+1) local pokename = getPokeName(pk) --alterado v1.7 local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename) doCreatureSay(cid, mgo, TALKTYPE_MONSTER) doSendMagicEffect(getCreaturePosition(pk), effect) if haveFirstTM(item) then if tmChange[getFirstTMName(item)] then doItemSetAttribute(item.uid, "tm1", tmChange[getFirstTMName(item)].new) end end if haveSecondTM(item) then if tmChange[getSecondTMName(item)] then doItemSetAttribute(item.uid, "tm2", tmChange[getSecondTMName(item)].new) end end if haveThirdTM(item) then if tmChange[getThirdTMName(item)] then doItemSetAttribute(item.uid, "tm3", tmChange[getThirdTMName(item)].new) end end if useOTClient then doPlayerSendCancel(cid, '12//,show') --alterado v1.7 end local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) elseif look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end else doPlayerSendCancel(cid, "This pokemon is fainted.") end if useKpdoDlls then doUpdateMoves(cid) end return true end Tenta isso.
-
tfs 1.2 Pequeno erro ao compilar alguem pode me ajudar?
pergunta respondeu ao boyfrempss de MatheusGlad em Programação
Voce executou o "register_tfssdk_env.bat" como admin dentro da pasta do tfs sdk e o "register_boost_env.bat" como admin dentro da pasta do boost? -
Os prints eu pedi pra voce botar pra saber onde tava faltando, voce pode tirar eles, eles que estao fazendo aparecer isso. faz assim procura essas linhas: if youAre[getPlayerGroupId(thing)] then table.insert(str, (ocup).." and "..rank.." from ".. getTownName(getPlayerTown(thing))..".") else table.insert(str, (rank).." from ".. getTownName(getPlayerTown(thing))..".") end Troca por: if youAre[getPlayerGroupId(thing)] then table.insert(str, (ocup).." and "..rank..".") else table.insert(str, (rank)..".") end
-
Bem, fazer soh quem ta invitado poder jogar item dentro da casa somente editando as source, porem voce pode impedir que qualquer um jogue item pela porta editando o id da porta aberta e botando: <attribute key="blockprojectile" value="1" /> Claro que isso soh vai funcionar pra jogar pela porta, voce pode fazer o mesmo com as janelas mas se a casa tiver 2 andares a pessoa ainda vai poder jogar lixo. Edit: Alias, esqueci que tinha a funçao onAddItem, porem a gambiarra seria bruta. (Teria que colocar um actionid em todos os pisos das casas do server ou pegar o id de todos os pisos nas casas.)
-
Ta dando problema pra pra achar o nome da cidade do player, retira os prints agora e bota troca: table.insert(str, (ocup).." and "..rank.." from ".. getTownName(getPlayerTown(thing))..".") por isso: table.insert(str, (ocup).." and "..rank..".") Isso vai remover o bug porem nao vai mostrar o nome da cidade ao dar look, o problema é que provavelmente o ID da cidade nao foi configurado direito.
-
Antes da linha: table.insert(str, (ocup).." and "..rank.." from ".. getTownName(getPlayerTown(thing))..".") Bota: print("Ocup:") print(ocup) print("Rank:") print(rank) print("Town:") print(getTownName(getPlayerTown(thing))) da look no player e olha no console, deve aparecer Ocup: blablalba Rank: blabla Town: Blabla Algum deles vai faltar dai soh corrigir dps q souber qual que ta faltando
-
Não tive esse problema com os slots infinitos, qualquer coisa faz uma talkaction teste e printa o storage 32149 print(getPlayerStorageValue(cid, 32149)) Vai aparecer no console quantos slots o player tem. E o negocio que voce falou das msgs: <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="xtibia.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { OnlyPremium = false, AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {10020,5919,5809,5804,5015}, maxSlotsStorage = 32149, defaultMaxSlot = 3, -- deixe false pra desabilitar itemAddValue = 2, -- vai adicionar 2 slots ao usar o item coinnames = {"gold coin", "platinum coin", "crystal coin"}, } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, 27000))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, 27000, x) else setPlayerStorageTable(cid, 27000, {item}) end end function removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, 27000, x) end function ShowItemsTabble(cid) local str,n = "-- Lista de Loot --\n\n",0 for i = 1,#getPlayerStorageTable(cid, 27000) do n = n + 1 str = str..""..n.." - "..getItemNameById(getPlayerStorageTable(cid, 27000)[i]).."\n" end return doShowTextDialog(cid, 2529, str) end function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, quant) -- by mkalo local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end function AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) doPlayerSendTextMessage(cid, 23, "{AUTO-LOOT} Collected " .. deposit .. " gold coins sent to your bank account.") return doPlayerDepositMoney(cid, deposit) end function corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, 27000), tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({"2148","2152","2160"},tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end end end ]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "MonsterAttack") return true end]]></event> <event type="death" name="LootEventDeath" event="script"><![CDATA[ domodlib('Loot_func') function onDeath(cid, corpse, deathList) local killer,pos = deathList[1],getCreaturePosition(cid) addEvent(corpseRetireItems,1,killer,pos) return true end]]></event> <event type="combat" name="MonsterAttack" event="script"><![CDATA[ domodlib('Loot_func') if isPlayer(cid) and isMonster(target) and not isInArray(info.BlockMonsters,string.lower(getCreatureName(target))) then registerCreatureEvent(target, "LootEventDeath") end return true]]></event> <talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') if info.defaultMaxSlot and getPlayerStorageValue(cid, info.maxSlotsStorage) <= 0 then setPlayerStorageValue(cid, info.maxSlotsStorage, info.defaultMaxSlot) end local t = string.explode(string.lower(param), ",") local stt = getPlayerStorageTable(cid, 27000) for i = 1, #info.coinnames do local p = table.find(stt, getItemIdByName(info.coinnames[i], false)) if p then table.remove(stt, p) end end if info.OnlyPremium == true and not isPremium(cid) then doPlayerSendCancel(cid, "you must be a premium account.") return true elseif not t[1] then ShowItemsTabble(cid) return true elseif t[1] == "clear" then setPlayerStorageTable(cid, 27000, {}) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce removeu todos os items da lista") return true elseif tonumber(t[1]) or tonumber(t[2]) then doPlayerSendCancel(cid, "enter !autoloot add,name or !autoloot remove,name") return true elseif isInArray({"add","remove"}, tostring(t[1])) then local func,check = tostring(t[1]) == "add" and addItemTable or removeItemTable, tostring(t[1]) == "add" and true or false local item = getItemIdByName(tostring(t[2]), false) if t[2] ~= "gold" and not item then doPlayerSendCancel(cid, "O item nao existe") return true elseif t[2] ~= "gold" and check == true and isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "Esse item nao é permitido a ser adicionado.") return true elseif t[2] ~= "gold" and isInTable(cid, item) == check then doPlayerSendCancel(cid, "This Item "..(check == true and "already" or "is not").." in your list.") return true elseif t[2] ~= "gold" and check and info.defaultMaxSlot and #stt >= getPlayerStorageValue(cid, info.maxSlotsStorage) and not table.find(info.coinnames, t[2]) then doPlayerSendCancel(cid, "You cannot add more than " .. getPlayerStorageValue(cid, info.maxSlotsStorage) .. " items in your list.") return true end if t[2] ~= "gold" then func(cid, item) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "Voce adicionou o item "..t[2].." a sua lista" or "Voce removeu o item "..t[2].." from the list") return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "Voce ativou a coleta de gold automatica." or "Voce desativou a coleta de gold automatica.") for i = 1, #info.coinnames do local item = getItemIdByName(info.coinnames[i], false) if not item then error("shit happened. check coin names") else if isInTable(cid, item) ~= check then func(cid, item) --doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "Voce adicionou o item "..info.coinnames[i].." a sua lista" or "Voce removeu o item "..info.coinnames[i].." from the list") end end end end end return true]]></talkaction> <action itemid="5889" event="buffer"><![CDATA[ domodlib('Loot_func') local s = doPlayerRemoveItem(cid,item.itemid,1) if s then setPlayerStorageValue(cid, info.maxSlotsStorage, getPlayerStorageValue(cid, info.maxSlotsStorage)+info.itemAddValue) doSendAnimatedText(getPlayerPosition(cid), "Boosted" , COLOR_RED) doSendMagicEffect(getPlayerPosition(cid), 26) else doPlayerSendCancel(cid, "Pick up the item first.") end return true ]]></action> </mod>
-
local itens = { -- [ID] = porcentagem. [2463] = 20, [2646] = 100, } local effect = 3 -- Numero do efeito ou false function playerHasItemEquipped(cid, itemid) if not isPlayer(cid) then return false end for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do if getPlayerSlotItem(cid, i).itemid == itemid then return true end end end function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then if isCreature(attacker) then local total = 0 for itemid, percentage in pairs(itens) do if playerHasItemEquipped(cid, itemid) then total = total+percentage end end if total > 0 then doCreatureAddHealth(attacker, -math.ceil((total/100)*value)) doSendAnimatedText(getCreaturePosition(attacker), tostring(math.ceil((total/100)*value)) , COLOR_RED) if effect then doSendMagicEffect(getCreaturePosition(attacker), effect) end end end end return true end
-
Bem o problema eh aquela parte que eu falei pra voce tirar que tava bugada, nao faço ideia de como consertar porque nao sei como funciona
-
Nessa parte: doTargetCombatHealth(cid, attacker, combat, -math.ceil((total/100)*value)*2, -math.ceil((total/100)*value)*2, nil) else doTargetCombatHealth(cid, attacker, combat, -math.ceil((total/100)*value), -math.ceil((total/100)*value), nil) Bota isso: doTargetCombatHealth(cid, attacker, COMBAT_UNDEFINEDDAMAGE, -math.ceil((total/100)*value)*2, -math.ceil((total/100)*value)*2, nil) else doTargetCombatHealth(cid, attacker, COMBAT_UNDEFINEDDAMAGE, -math.ceil((total/100)*value), -math.ceil((total/100)*value), nil) O erro não é no calculo o problema é que ele calcula a resistencia do player ao tipo de dano. Testei com SD e funcionou perfeitamente porque o player nao tinha resistencia. Talvez mudando pra COMBAT_UNDEFINEDDAMAGE ele nao tenha resistencia mas nao vai sair o mesmo efeito da magia que o player lançou...
-
<?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="xtibia.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { OnlyPremium = false, AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {10020,5919,5809,5804,5015}, maxSlotsStorage = 32149, defaultMaxSlot = 3, -- deixe false pra desabilitar itemAddValue = 2, -- vai adicionar 2 slots ao usar o item coinnames = {"gold coin", "platinum coin", "crystal coin"}, } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, 27000))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, 27000, x) else setPlayerStorageTable(cid, 27000, {item}) end end function removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, 27000, x) end function ShowItemsTabble(cid) local str,n = "-- Lista de Loot --\n\n",0 for i = 1,#getPlayerStorageTable(cid, 27000) do n = n + 1 str = str..""..n.." - "..getItemNameById(getPlayerStorageTable(cid, 27000)[i]).."\n" end return doShowTextDialog(cid, 2529, str) end function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, quant) -- by mkalo local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end function AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) doPlayerSendTextMessage(cid, 23, "{AUTO-LOOT} Collected " .. deposit .. " gold coins sent to your bank account.") return doPlayerDepositMoney(cid, deposit) end function corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, 27000), tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({"2148","2152","2160"},tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end end end ]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "MonsterAttack") return true end]]></event> <event type="death" name="LootEventDeath" event="script"><![CDATA[ domodlib('Loot_func') function onDeath(cid, corpse, deathList) local killer,pos = deathList[1],getCreaturePosition(cid) addEvent(corpseRetireItems,1,killer,pos) return true end]]></event> <event type="combat" name="MonsterAttack" event="script"><![CDATA[ domodlib('Loot_func') if isPlayer(cid) and isMonster(target) and not isInArray(info.BlockMonsters,string.lower(getCreatureName(target))) then registerCreatureEvent(target, "LootEventDeath") end return true]]></event> <talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') if info.defaultMaxSlot and getPlayerStorageValue(cid, info.maxSlotsStorage) <= 0 then setPlayerStorageValue(cid, info.maxSlotsStorage, info.defaultMaxSlot) end local t = string.explode(string.lower(param), ",") local stt = getPlayerStorageTable(cid, 27000) for i = 1, #info.coinnames do local p = table.find(stt, getItemIdByName(info.coinnames[i], false)) if p then table.remove(stt, p) end end if info.OnlyPremium == true and not isPremium(cid) then doPlayerSendCancel(cid, "you must be a premium account.") return true elseif not t[1] then ShowItemsTabble(cid) return true elseif t[1] == "clear" then setPlayerStorageTable(cid, 27000, {}) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce removeu todos os items da lista") return true elseif tonumber(t[1]) or tonumber(t[2]) then doPlayerSendCancel(cid, "enter !autoloot add,name or !autoloot remove,name") return true elseif isInArray({"add","remove"}, tostring(t[1])) then local func,check = tostring(t[1]) == "add" and addItemTable or removeItemTable, tostring(t[1]) == "add" and true or false local item = getItemIdByName(tostring(t[2]), false) if t[2] ~= "gold" and not item then doPlayerSendCancel(cid, "O item nao existe") return true elseif t[2] ~= "gold" and check == true and isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "Esse item nao é permitido a ser adicionado.") return true elseif t[2] ~= "gold" and isInTable(cid, item) == check then doPlayerSendCancel(cid, "This Item "..(check == true and "already" or "is not").." in your list.") return true elseif t[2] ~= "gold" and check and info.defaultMaxSlot and #stt >= getPlayerStorageValue(cid, info.maxSlotsStorage) and not table.find(info.coinnames, t[2]) then doPlayerSendCancel(cid, "You cannot add more than " .. getPlayerStorageValue(cid, info.maxSlotsStorage) .. " items in your list.") return true end if t[2] ~= "gold" then func(cid, item) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "Voce adicionou o item "..t[2].." a sua lista" or "Voce removeu o item "..t[2].." from the list") return true else for i = 1, #info.coinnames do local item = getItemIdByName(info.coinnames[i], false) if not item then error("shit happened. check coin names") else if isInTable(cid, item) ~= check then func(cid, item) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "Voce adicionou o item "..info.coinnames[i].." a sua lista" or "Voce removeu o item "..info.coinnames[i].." from the list") end end end end end return true]]></talkaction> <action itemid="5889" event="buffer"><![CDATA[ domodlib('Loot_func') local s = doPlayerRemoveItem(cid,item.itemid,1) if s then setPlayerStorageValue(cid, info.maxSlotsStorage, getPlayerStorageValue(cid, info.maxSlotsStorage)+info.itemAddValue) doSendAnimatedText(getPlayerPosition(cid), "Boosted" , COLOR_RED) doSendMagicEffect(getPlayerPosition(cid), 26) else doPlayerSendCancel(cid, "Pick up the item first.") end return true ]]></action> </mod> !autoloot (add/remove), gold -- add/retira todos os items da tabela "coinnames" na lootlist Os items da tabela não contam slot, ou seja voce pode adicionar eles tres usando o !autoloot add, gold ou um por um que não faz diferença. E mais uma coisa voce deveria botar setPlayerStorageValue(cid, 27000, -1) no login.lua pra evitar bugs, se voce ja estivesse rodando esse script antes em algum server, e na minha opniao resetar a table de loot quando logar é melhor se for fazer alguma modificaçao depois.
-
Como o SamueLGuedes tinha dito antes, olha os ids da arvore. Procura essa linha, conserta os ids das arvores, pelo visto ta errado local item = getTileItemById(pos, 12591) --id do item arvore normal Se esse for o id certo entao troca: if item2.itemid == 2703 and isInArray(skills["headbutt"], getPokemonName(mysum)) then Um lugar ta falando que o id da arvore normal eh 2703 e outro 12591, algum deles ta errado.
-
Do mesmo jeito o player poderia tirar o item e o summon nao ia desaparecer.
-
Não é possivel sem editar sources, somente se o item realmente estiver equipado em algum slot pra usar a function onDeEquip, nao funcionaria dentro da backpack.
-
function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function playerHasItemEquipped(cid, itemuid) if not isPlayer(cid) then return false end for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do if getPlayerSlotItem(cid, i).uid == itemuid then return true end end end function onUse(cid, item, frompos, item2, topos) local dolls = { [11256] = {pet = "Safira"}, [11207] = {pet = "Ashmunrah"}, [11144] = {pet = "Demon"}, [9019] = {pet = "Vampire"}, } local go = dolls[item.itemid] local summon = getCreatureSummons(cid) --------------------------------------------------- local backpack = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK).uid if table.find(getContainerItems(backpack), item.uid) or playerHasItemEquipped(cid, item.uid) then if #summon >= 1 then for _, pid in ipairs(getCreatureSummons(cid)) do doRemoveCreature(pid) doCreatureSay(cid, "Can go rest ["..go.pet.."]", TALKTYPE_ORANGE_1) end return true end doConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid))) doCreatureSay(cid, "Let battle ["..go.pet.."]", TALKTYPE_ORANGE_1) return true end end Nao testei mas deve funcionar.
-
tfs 1.2 Pequeno erro ao compilar alguem pode me ajudar?
pergunta respondeu ao boyfrempss de MatheusGlad em Programação
Tive o mesmo problema e consertei assim: Vai em Project>Properties>Linker>General e da edit em Additional Library Directories e bota "C:\boost64\lib64-msvc-14.0" (Se for 32bits mesma coisa soh muda o nome da pasta..) Agora abre um .cpp qualquer exemplo, actions.cpp e adiciona essa linha junto com os "extern": extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; Se voce fizer no actions.cpp deve ficar assim: extern Game g_game; extern Spells* g_spells; extern Actions* g_actions; extern ConfigManager g_config; extern "C" { FILE __iob_func[3] = { *stdin,*stdout,*stderr }; } Depois marca release e bota a plataforma direitinho e da rebuild, deve aparecer isso alguma hora quando voce tiver dando rebuild 1> Generating code 1> Finished generating code Se nao der certo tenta extrair a source denovo e fazer o processo do 0 sem ter dado build errado antes. -
Vei ~~ não é mais facil fazer quando der use no item sumonar o monstro e quando der use retirar ele? Do jeito que eu fiz ali era pra sair qualquer monstro do server pra um god usar (Pelo menos foi o que eu entendi do seu post muito vago...) Da proxima vez tenta formular sua ideia 100% antes de postar: http://www.xtibia.com/forum/topic/234500-regras-pedidos-e-duvidas-scripting/
-
Tem um comando pra god fazer isso ja "/s" mas como ele nao remove: function setGlobalStorageTable(storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setGlobalStorageValue(storage, tabstr:sub(1, #tabstr-1)) end function getGlobalStorageTable(storage) local tabstr = getGlobalStorageValue(storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) local globaltab = getGlobalStorageTable(14023) if not globaltab[param:lower()] or not isCreature(globaltab[param:lower()]) then local monster = doCreateMonster(param, pos) if monster then doConvinceCreature(cid, monster) globaltab[param:lower()] = monster setGlobalStorageTable(14023, globaltab) else doPlayerSendDefaultCancel(cid, (monster == false and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM)) end else doRemoveCreature(globaltab[param:lower()]) globaltab[param:lower()] = nil setGlobalStorageTable(14023, globaltab) end return true end
-
Use /create Demon pra sumonar o demon e /create demon denovo pra remover, caso o demon esteja morto ele vai sumonar outro. Funciona com varios monstros ao mesmo tempo. data\talkactions\scripts\nomedoscript.lua: function setGlobalStorageTable(storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setGlobalStorageValue(storage, tabstr:sub(1, #tabstr-1)) end function getGlobalStorageTable(storage) local tabstr = getGlobalStorageValue(storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) local globaltab = getGlobalStorageTable(14023) if not globaltab[param:lower()] or not isCreature(globaltab[param:lower()]) then local monster = doCreateMonster(param, pos) if monster then globaltab[param:lower()] = monster setGlobalStorageTable(14023, globaltab) else doPlayerSendDefaultCancel(cid, (monster == false and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM)) end else doRemoveCreature(globaltab[param:lower()]) globaltab[param:lower()] = nil setGlobalStorageTable(14023, globaltab) end return true end tag: <talkaction access="5" words="/create" event="script" value="nomedoscript.lua"/>
-
Retire o monstro depois de um tempo ou quando voce usar o comando denovo?
-
Substitui por isso, tem os tres pedidos ai, o item que da mais storage voce muda o id la em baixo no final do mod. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="xtibia.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { OnlyPremium = false, AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {10020,5919,5809,5804,5015}, maxSlotsStorage = 32149, defaultMaxSlot = 3, -- deixe false pra desabilitar itemAddValue = 2, -- vai adicionar 2 slots ao usar o item } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, 27000))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, 27000, x) else setPlayerStorageTable(cid, 27000, {item}) end end function removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, 27000) do table.insert(x,getPlayerStorageTable(cid, 27000)[i]) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, 27000, x) end function ShowItemsTabble(cid) local str,n = "-- Lista de Loot --\n\n",0 for i = 1,#getPlayerStorageTable(cid, 27000) do n = n + 1 str = str..""..n.." - "..getItemNameById(getPlayerStorageTable(cid, 27000)[i]).."\n" end return doShowTextDialog(cid, 2529, str) end function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, quant) -- by mkalo local item = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid) local piles = 0 if #item > 0 then for i,x in pairs(item) do if getThing(x).type < 100 then local it = getThing(x) doTransformItem(it.uid, itemid, it.type+quant) if it.type+quant > 100 then doPlayerAddItem(cid, itemid, it.type+quant-100) end else piles = piles+1 end end else return doPlayerAddItem(cid, itemid, quant) end if piles == #item then doPlayerAddItem(cid, itemid, quant) end end function AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) doPlayerSendTextMessage(cid, 23, "{AUTO-LOOT} Collected " .. deposit .. " gold coins sent to your bank account.") return doPlayerDepositMoney(cid, deposit) end function corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, 27000), tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({"2148","2152","2160"},tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end end end ]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "MonsterAttack") return true end]]></event> <event type="death" name="LootEventDeath" event="script"><![CDATA[ domodlib('Loot_func') function onDeath(cid, corpse, deathList) local killer,pos = deathList[1],getCreaturePosition(cid) addEvent(corpseRetireItems,1,killer,pos) return true end]]></event> <event type="combat" name="MonsterAttack" event="script"><![CDATA[ domodlib('Loot_func') if isPlayer(cid) and isMonster(target) and not isInArray(info.BlockMonsters,string.lower(getCreatureName(target))) then registerCreatureEvent(target, "LootEventDeath") end return true]]></event> <talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') if info.defaultMaxSlot and getPlayerStorageValue(cid, info.maxSlotsStorage) <= 0 then setPlayerStorageValue(cid, info.maxSlotsStorage, info.defaultMaxSlot) end local t = string.explode(string.lower(param), ",") if info.OnlyPremium == true and not isPremium(cid) then doPlayerSendCancel(cid, "you must be a premium account.") return true elseif not t[1] then ShowItemsTabble(cid) return true elseif tonumber(t[1]) or tonumber(t[2]) then doPlayerSendCancel(cid, "enter !autoloot add,name or !autoloot remove,name") return true elseif isInArray({"add","remove"}, tostring(t[1])) then local func,check = tostring(t[1]) == "add" and addItemTable or removeItemTable, tostring(t[1]) == "add" and true or false local item = getItemIdByName(tostring(t[2]), false) if not item then doPlayerSendCancel(cid, "O item nao existe") return true elseif check == true and isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "Esse item nao é permitido a ser adicionado.") return true elseif isInTable(cid, item) == check then doPlayerSendCancel(cid, "This Item "..(check == true and "already" or "is not").." in your list.") return true elseif check and info.defaultMaxSlot and #getPlayerStorageTable(cid, 27000) >= getPlayerStorageValue(cid, info.maxSlotsStorage) then doPlayerSendCancel(cid, "You cannot add more than " .. getPlayerStorageValue(cid, info.maxSlotsStorage) .. " items in your list.") return true end func(cid, item) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "Voce adicionou o item "..t[2].." a sua lista" or "Voce removeu o item "..t[2].." from the list") return true end return true]]></talkaction> <action itemid="5889" event="buffer"><![CDATA[ domodlib('Loot_func') local s = doPlayerRemoveItem(cid,item.itemid,1) if s then setPlayerStorageValue(cid, info.maxSlotsStorage, getPlayerStorageValue(cid, info.maxSlotsStorage)+info.itemAddValue) else doPlayerSendCancel(cid, "Pick up the item first.") end return true ]]></action> </mod>
-
Sim eu falei "Comenta ou retira essa parte e ve se funciona." Seleciona no script tudo que eu mandei e retira ou bota " -- " no inicio das linhas
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.