Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. resolvido via PM.
  2. local query = db.query or db.executeQuery local premios = { -- [chance] -- itemid,amount [{1, 3}] = {2390, 1}, -- por exmeplo de 1 a 3 porcento de vim 1 item com id 2390 [{4, 15}] = {2469, 1}, [{16, 25}] = {2646, 1}, [{25, 40}] = {8306, 1}, [{41, 55}] = {2408, 1}, [{56, 65}] = {10020, 1}, [{66, 75}] = {5804, 1}, [{76, 86}] = {5809, 1}, [{86, 100}] = {5937, 1} } local function getGuildNameById(id) local name = "" local query = db.getResult('SELECT `name` FROM `guilds` WHERE `id` = "'.. id ..'"') if query:getID() == -1 then return true end name = query:getDataString("name") query:free() return name end function pointNumber(number) if not tonumber(number) then return false end local str = "" number = tostring(number):reverse() local count = 0 for i = 1, number:len() do count = count + 1 if count <= 3 then if str == "" then str = number:sub(i, i) else str = str..number:sub(i, i) end else count = 1 str = str.."."..number:sub(i, i) end end return str:reverse() end function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if isInArray({"Castle Guardian I", "Castle Guardian II", "Castle Guardian III", "Castle Guardian IV", "Castle Generator", "Ice Crystal"}, getCreatureName(cid)) then doPlayerSetStorageValue(attacker, 1827311, getPlayerStorageValue(attacker, 1827311) + value) local quant = guild_hit_count[getPlayerGuildId(attacker)] and guild_hit_count[getPlayerGuildId(attacker)] or 0 guild_hit_count[getPlayerGuildId(attacker)] = quant + value end end return true end function onDeath(cid, corpse, deathList) local gid = 0 local winner = 0 if isMonster(cid) and getCreatureName(cid) == "Ice Crystal" then if not getPlayingGuilds() then return true end local guilds = getPlayingGuilds() local max = 0 for index, var in pairs(guild_hit_count) do if var > max then max = var gid = index end end setGlobalStorageValue(1823999, gid) query("UPDATE `castle_dono` SET `guild_id` = '"..gid.."' WHERE `guild_id` > 0") doBroadcastMessage("{Castle War} O evento acabou, a guild com maior desempenho foi "..getGuildNameById(gid)..", com "..pointNumber(max).." pontos sobre o castelo.") updateCastleData() setGlobalStorageValue(18219113, -1) if gid > 0 then local mx = 0 for _, pid in pairs(getPlayersOnline()) do if getPlayerGuildId(pid) == gid then local st = getPlayerStorageValue(pid, 1827311) if st > mx then mx = st winner = pid end end end if isPlayer(winner) then local r = math.random(1,100) for v, k in pairs(premios) do if r >= v[1] and r <= v[2] then local itemr, amountr = k[1], k[2] local recompensa = doPlayerAddItem(winner, itemr, amountr) doBroadcastMessage("{Castle War} O jogador com maior desempenho foi "..getCreatureName(winner)..", com "..pointNumber(mx).." pontos sobre o castelo. Ele recebeu "..amountr.."x "..getItemNameById(itemr).." como premio.") doItemSetAttribute(recompensa, 'description', "Premio do jogador "..getCreatureName(winner).." ganho no evento castle war do dia "..os.date("%d/%m/%y")..".") end end local medal = doPlayerAddItem(winner, 10127, 1) doItemSetAttribute(medal, 'description', "Trofeu ganho pelo jogador "..getCreatureName(winner).." no evento castle war do dia "..os.date("%d/%m/%y")..".") end end for _, pid in pairs(getPlayersOnline()) do if isInArea(getThingPos(pid), {x = 500, y = 574, z = 6}, {x = 575, y = 620, z = 6}) or isInArea(getThingPos(pid), {x = 511, y = 588, z = 5}, {x = 556, y = 607, z = 5}) or isInArea(getThingPos(pid), {x = 511, y = 588, z = 4}, {x = 556, y = 607, z = 4}) or isInArea(getThingPos(pid), {x = 511, y = 588, z = 3}, {x = 556, y = 607, z = 3}) or isInArea(getThingPos(pid), {x = 481, y = 580, z = 7}, {x = 683, y = 798, z = 7}) then doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid))) end end guild_hit_count = {} end return true end
  3. bem úteis essas funções, obrigado por compartilhar!
  4. local itemr,amountr = premios[rand][1], math.random(premios[rand][2], premios[rand][3]) por local itemr,amountr = premios[rand][1], premios[rand][2]
  5. local premios = {{2390, 1, 200}, {2469, 1, 200}, {2646, 1, 200}, {8306, 1, 200}, {2408, 1, 200}, {10020, 1, 1}, {5804, 1, 1}, {5809, 1, 1}, {5937, 1, 1}} local itemr,amountr = premios[rand][1], math.random(premios[rand][2], premios[rand][3]) doPlayerAddItem(winner, itemr, amountr) doBroadcastMessage("{Castle War} O jogador com maior desempenho foi "..getCreatureName(winner)..", com "..mx.." pontos sobre o castelo. Ele recebeu "..amountr.."x "..getItemNameById(itemr).." como premio.")
  6. Vodkart

    Trade OFF 8.60

    troca essa linha doPlayerSendMailByName(getCreatureName(cid), parcel, getPlayerTown(cid)) por essa: doPlayerAddItemEx(cid, parcel)
  7. Vodkart

    Trade OFF 8.60

    local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 30, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == 'help') then doPlayerPopupFYI(cid, "#######Commands#######\n---------------------------------\n!market add, itemName, itemPrice, itemCount \nexample: !market add, plate armor, 500, 1 \n---------------------------------\n!market buy, AuctionID \nexample: !market buy, 1943 \n---------------------------------\n!market remove, AuctionID - example: !market remove, 1943 \n!market receber - Use this command to get money for sold items.\n---------------------------------") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end local item,amount = buy:getDataString("item_id"), buy:getDataInt("count") local parcel = doCreateItemEx(ITEM_PARCEL) if isItemStackable(item) or amount == 1 then doAddContainerItem(parcel, item, amount) else for i = 1, amount do doAddContainerItem(parcel, item, 1) end end local carta = doAddContainerItem(parcel, 1952) local texto = "[ Item Market ] - "..os.date("%d/%m/%Y ", os.time()).."\n(Buyer) "..getCreatureName(cid).." bought "..amount.."x "..getItemNameById(item).."." doItemSetAttribute(carta, "writer", "Item Market (ID:"..t[2]..")") doItemSetAttribute(carta, "text", texto) doPlayerSendMailByName(getCreatureName(cid), parcel, getPlayerTown(cid)) doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "receber") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end return true end
  8. Vodkart

    Trade OFF 8.60

    local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 30, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == 'help') then doPlayerPopupFYI(cid, "#######Commands#######\n---------------------------------\n!market add, itemName, itemPrice, itemCount \nexample: !market add, plate armor, 500, 1 \n---------------------------------\n!market buy, AuctionID \nexample: !market buy, 1943 \n---------------------------------\n!market remove, AuctionID - example: !market remove, 1943 \n!market receber - Use this command to get money for sold items.\n---------------------------------") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end local item,amount = buy:getDataString("item_id"), buy:getDataInt("count") local parcel = doCreateItemEx(ITEM_PARCEL) if isItemStackable(item) or amount == 1 then doAddContainerItem(parcel, item, amount) else for i = 1, amount do doAddContainerItem(parcel, item, 1) end end local carta = doAddContainerItem(parcel, 1952) doItemSetAttribute(carta, "description","[Trade Off]- "..os.date("%d/%m/%Y ", os.time()).."\n","(Buyer) "..getCreatureName(cid).." bought "..amount.."x "..getItemNameById(item)..".") doPlayerSendMailByName(getCreatureName(cid), parcel, getPlayerTown(cid)) doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "receber") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end return true end
  9. Vodkart

    Script Reset BUG

    local config = { backToLevel = 8, exp = 4200, redskull = false, battle = false, pz = false, stages = { [{0, 4}] = {350,330}, -- free, vip [{5, 9}] = {355,335}, [{10, 14}] = {360,340}, [{15, 19}] = {365,345}, [{20, 24}] = {380,350}, [{25, 29}] = {390,355}, [{30, 34}] = {410,360}, [{35, 39}] = {430,365}, [{40,math.huge}] = {450,370} } } function getResets(cid) return getPlayerStorageValue(cid, 1020) < 0 and 0 or getPlayerStorageValue(cid, 1020) end function setResets(cid, count) return setPlayerStorageValue(cid, 1020, getResets(cid) + count) end function onSay(cid, words, param) if config.redskull and getCreatureSkullType(cid) >= 4 then doPlayerSendCancel(cid, "Voce precisa estar sem red skull para resetar.") return true elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid, "Voce precisa estar em protection zone para resetar.") return true elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Voce precisa estar sem battle para resetar.") return true end for var, ret in pairs(config.stages) do if getResets(cid) >= var[1] and getResets(cid) <= var[2] then resetLevel = isPremium(cid) and ret[2] or ret[1] end end if getPlayerLevel(cid) < resetLevel then doPlayerSendCancel(cid, "Voce precisa do level " .. resetLevel .. " ou mais para resetar.") return true end setResets(cid, 1) local guid = getPlayerGUID(cid) doRemoveCreature(cid, true) return db.query("UPDATE `players` SET `level` = " .. config.backToLevel .. ", `experience` = " .. config.exp .. " WHERE `id` = " .. guid) end
  10. coloca todos os monstro com letra minuscula, exemplo: ["mega hachibi"] = {monster_race={"mega hachibi"}, storage_start = 200201, storage = 91001,count = 1,exp = 100000, money = 2000000},
  11. tfs 1.1 e que versão de server? 10.10?
  12. function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) local from,to = {x = 154, y = 68, z = 7},{x = 160, y = 70, z = 7} if isPlayer(cid) and isMonster(lastHitKiller[1]) and isInRange(getCreaturePosition(cid), from, to) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce saiu da arena.") return false end return true end
  13. ACTIONS nome do seu script.lua local t = { lvl = 100, entrada = { {x = 710, y = 1420, z = 5}, -- pos players {x = 709, y = 1420, z = 5}, {x = 708, y = 1420, z = 5}, {x = 707, y = 1420, z = 5} }, saida = { {x = 710, y = 1420, z = 6}, -- pos para onde eles irão {x = 709, y = 1420, z = 6}, {x = 708, y = 1420, z = 6}, {x = 707, y = 1420, z = 6} } } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.') return true end table.insert(check, x) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada[i], CONST_ME_POFF) doTeleportThing(tid, t.saida[i], false) doSendMagicEffect(t.saida[i], CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
  14. ------------------------------ se não der então tenta assim: <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then if thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,', '..(getPlayerSex(thing.uid) == 0 and 'esposa' or 'marido')..' de '..getPartner(thing.uid)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, '.\n'..(getPlayerSex(cid) == 0 and 'She' or 'He')..' is married to '..getPartner(cid)) end end return true end]]> </event>
  15. troca essa parte: <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then if thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,', '..(getPlayerSex(thing.uid) == 0 and 'esposa' or 'marido')..' de '..getPartner(thing.uid)) else doPlayerSetSpecialDescription(cid,', '..(getPlayerSex(thing.uid) == 0 and 'esposa' or 'marido')..' de '..getPartner(thing.uid)) end end return true end]]> </event> por <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid,'.\n'..(getPlayerSex(thing.uid) == 0 and 'She' or 'He')..' is married to '..getPartner(thing.uid)) elseif isPlayer(cid) and isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, '.\n'..(getPlayerSex(cid) == 0 and 'She' or 'He')..' is married to '..getPartner(cid)) end return true end]]></event>
  16. a função 'doPlayerSetSpecialDescription' não funciona para você mesmo(cid), então vc tem que usar: doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "msg")
  17. Vodkart

    Baiakzik Full

    precisa de site pra logar no servidor?
  18. baixei aqui, bem completo o servidor! parabens tem como colocar o servidor online sem usar site? eu sei que é no config.lua, mas esqueci onde
  19. Vodkart

    Ajuda script npc!

    troca if msgcontains(msg, 'yes') and getPlayerItemCount(cid,2197) >= 1 then por if msgcontains(msg, 'yes') and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2197 then
  20. Vodkart

    help addon doll

    já existe function onSay(cid, words, param) local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["noblewoman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336} } local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335}, ["wayfarer"]={366} } local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param!", "Full Addon Set sucesfully added!"} local x = string.explode(param, ",") if(getPlayerItemCount(cid, 8982) > 0) then if param ~= "" then if maleOutfits[x[1]:lower()] and femaleOutfits[x[1]:lower()] then if (x[2] == '1' or x[2] == '2') then doPlayerRemoveItem(cid, 8982, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, femaleOutfits[x[1]:lower()][1], x[2]) else doPlayerAddOutfit(cid, maleOutfits[x[1]:lower()][1], x[2]) end else doPlayerSendTextMessage(cid, 27, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end return true end exemplo: !addon knight, 1
  21. Vodkart

    Magic Items

    vdd erro meu fiz na pressa o certo é function onLogin(cid) registerCreatureEvent(cid, 'randomstats_loot') return true end
  22. obg já estou usando! rep+ obg a todos tbm q postaram
  23. tipo[*avatar*] teria como fazer um avatar usando essa imagem: achei o cara mto gato
  24. cara ficou meio esquisito, a tipografia n combino com o azulão da imagem n tem como tirar todo essa azul e trocar de efeito?
  25. [Tamanho*]: 300x300px. (Para Avatar) [Tema*] : DAREDEVIL(série da netflix) [Tipo*]: Background. [Outros]: deixe bem foda pf :3 [Cores preferenciais]: sombrio, pq tem a ver com o demolidor.
  • Quem Está Navegando   0 membros estão online

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