Ir para conteúdo

FlavioHulk

Membro
  • Registro em

  • Última visita

Tudo que FlavioHulk postou

  1. Ele pediu um check utilizando o vip system do mockBear, e meu script funciona exatamente da mesma forma que o seu, porém de uma forma mais clean e organizada de entender o código
  2. aff Skydrowz, deixa o grilinho mostrar serviço !
  3. Agora sim ! Tá explicado, bb ! Sempre há pessoas que não entende o tópico, e suas respostas, e quer pagar de bom entendedor :D
  4. local failPosition = Position(32313, 32215, 7) function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end if not player:isPremium() then item:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) player:sendTextMessage(MESSAGE_STATUS_DEFAULT, "You dont have golden account.") player:teleportTo(failPosition) return true end return true end
  5. Tá desesperado, fion ?
  6. tu postou a dúvida e a correção no mesmo tópico
  7. talvez postando o script
  8. posta o script
  9. local items = { [9306] = {value = SKILL_SWORD}, [1449] = {value = SKILL_AXE}, [8834] = {value = SKILL_MAGLEVEL}, [8616] = {value = SKILL_CLUB}, [3739] = {value = SKILL_DISTANCE} } function onUse(cid, item, fromPosition, itemEx, toPosition) local item = items[item.itemid] if not item then return false end if not vip.hasVip(cid) then doPlayerSendCancel(cid, 'You need be a vip account.') return true end setPlayerStorageValue(cid, 62669, item.value) doRemoveCreature(cid) return true end
  10. local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. "Hello ." doPlayerSendTextMessage(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type {account} to manage your account and if you want to start over then type {cancel}.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type {account} to create an account or type {recover} to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "critical") registerCreatureEvent(cid, "recompensa") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "TopFrags") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "VipReceive") registerCreatureEvent(cid, "expvip") registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "AuraLogin") registerCreatureEvent(cid, "Auto Loot") registerCreatureEvent(cid, "vipeffects") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "TopEffect") registerCreatureEvent(cid, "BlessAmulet") registerCreatureEvent(cid, "ProtectLevel") registerCreatureEvent(cid, "TiraBattle") registerCreatureEvent(cid, "hmup") registerCreatureEvent(cid, "Popup1") registerCreatureEvent(cid, "blesscheck") registerCreatureEvent(cid, "AdvEffect") registerCreatureEvent(cid, "CastleExp") registerCreatureEvent(cid, "DesertDeath") registerCreatureEvent(cid, "DesertCombat") registerCreatureEvent(cid, "BattleDeath") registerCreatureEvent(cid, "ZombieThink") registerCreatureEvent(cid, "ZombieDeath") registerCreatureEvent(cid, "BattleCombat") registerCreatureEvent(cid, "FragsGuildLogin") registerCreatureEvent(cid, "FragsGuildKill") registerCreatureEvent(cid, "ctf") registerCreatureEvent(cid, "ga1") registerCreatureEvent(cid, "ga2") registerCreatureEvent(cid, "ga3") registerCreatureEvent(cid, "gv1") registerCreatureEvent(cid, "gv2") registerCreatureEvent(cid, "gv3") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena registerCreatureEvent(cid, "deathchannel") if getPlayerStorageValue(cid, 48913) == -1 then setPlayerStorageValue(cid, 48913, 0) end return true end
  11. Se não funcionou, poste o erro ! local event = { 'killctf', 'ZombieAttack', 'Mail', 'Recompensa', 'GuildMotd', 'Idle', 'SkullCheck', 'ExpVip', 'ReportBug', 'AdvanceSave', 'attackguild', 'advance', 'forever amulet', 'task_count', 'killbossesbroadcast', 'FirstItems', 'goldplayer', 'promotion', 'goldplayer2', 'PlayerCheck', 'FimVip', 'EndPremium', 'onPrepareDeath', 'SkullCheck', 'demonOakLogout', 'AntiHacker', 'demonOakDeath', 'demonOakComplete', 'ReportBug', 'VipReceive', 'VocationVip', 'PlayerKill', 'zombieevent', 'KillingInTheNameOf', 'PythiusDead', 'blessedfeather' } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if loss then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), getConfigValue('loginMessage') if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Acesse http://www.xtibia.com/forum/user/251027-subwat/" else str = str .. " www.subwatsoft.com" doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if not isPlayerGhost(cid) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end -- Events for i = 1, #events do registerCreatureEvent(cid, events[i]) end if InitArenaScript ~= 0 then InitArenaScript = 1 for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i + 100, 0) end end if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) end setPlayerStorageValue(cid, 42350, 0) setPlayerStorageValue(cid, 42352, 0) if not getVipTime(cid) then local name = getCreatureName(cid) if string.find(tostring(name):lower(),"[VIP]") then local newname = string.sub(tostring(name), 7) -- conta o nome a partir do sétimo caractere. "[VIP] God Wolf" vai virar "God Wolf" end db.executeQuery("UPDATE `players` SET `name` = '".. newname .."' WHERE `id` = "..getPlayerGUID(cid)..";") end return true end
  12. local config = { loginMessage = getConfigValue('loginMessage') } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Acesse http://www.xtibia.com/forum/user/251027-subwat/" else str = str .. " www.subwatsoft.com" doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "killctf") registerCreatureEvent(cid, "ZombieAttack") registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "Recompensa") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "forever amulet") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "killbossesbroadcast") registerCreatureEvent(cid, "FirstItems") registerCreatureEvent(cid, "goldplayer") registerCreatureEvent(cid, "promotion") registerCreatureEvent(cid, "goldplayer2") registerCreatureEvent(cid,'PlayerCheck') registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "EndPremium") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "demonOakLogout") registerCreatureEvent(cid, "AntiHacker") registerCreatureEvent(cid, "demonOakDeath") registerCreatureEvent(cid, "demonOakComplete") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "VipReceive") registerCreatureEvent(cid, "VocationVip") registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "zombieevent") registerCreatureEvent(cid, "KillingInTheNameOf") registerCreatureEvent(cid, "PythiusDead") registerCreatureEvent(cid, "blessedfeather") registerCreatureEvent(cid, "KillingInTheNameOf") if (InitArenaScript ~= 0) then InitArenaScript = 1 for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) end setPlayerStorageValue(cid, 42350, 0) setPlayerStorageValue(cid, 42352, 0) if not (getVipTime(cid)) then local name = getCreatureName(cid) if string.find(tostring(name):lower(),"[VIP]") then local newname = string.sub(tostring(name), 7) -- conta o nome a partir do sétimo caractere. "[VIP] God Wolf" vai virar "God Wolf" end db.executeQuery("UPDATE `players` SET `name` = '".. newname .."' WHERE `id` = "..getPlayerGUID(cid)..";") end return true end
  13. Bem observado kkk, eu não tinha visto... E realmente é tudo globalEvents '-' Desculpa, erro meu !
  14. poste o globalevents, você não postou ele !
  15. isso é no globalevents, mano
  16. info = { AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {2123,2515}, Max_Slots = {free = 2, premium = 5}, storage = {27000,28001,28002} } function getAutoLootTime(cid) return db.getResult("SELECT `loot_time` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)):getDataInt("loot_time") end function setAutoLootTime(cid, time) return db.query("UPDATE `accounts` SET `loot_time` = "..time.." WHERE `id` = "..getPlayerAccountId(cid)) end function getAutoLootDays(cid) local days = math.ceil((getAutoLootTime(cid) - os.time()) / (86400)) return days <= 0 and 0 or days end function addAutoLootDays(cid, days) local add = (days <= 0 and 1 or days) * 86400 local time = getAutoLootDays(cid) == 0 and (os.time() + add) or (getAutoLootTime(cid) + add) return setAutoLootTime(cid, time) end 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, info.storage[1]))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, info.storage[1]) do table.insert(x,getPlayerStorageTable(cid, info.storage[1])) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, info.storage[1], x) else setPlayerStorageTable(cid, info.storage[1], {item}) end end function removeItemTable(cid, item) local x = {} for i = 1, #getPlayerStorageTable(cid, info.storage[1]) do table.insert(x,getPlayerStorageTable(cid, info.storage[1])) end for i, v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x, i) end end return setPlayerStorageTable(cid, info.storage[1], x) end function ShowItemsTabble(cid) local n,str = 0,"[+] Auto Loot Commands [+]\n\n!autoloot item name --> To add ou Remove item from list.\n!autoloot money --> To collect gold automatically.\n!autoloot clear --> To clear the list.\n\nTime: "..(getAutoLootTime(cid) > 0 and "you have ["..getAutoLootDays(cid).."] days --> ends in "..os.date("%d/%m/%y %X", getAutoLootTime(cid)).."." or "no have Auto Loot time.").."\nGold Collecting: "..(getPlayerStorageValue(cid, info.storage[2]) > 0 and "Activated" or "Disabled")..".\nBalance Total: ["..getPlayerBalance(cid).."] gp's.\nMaximum Slots: ["..#getPlayerStorageTable(cid, info.storage[1]).."/"..(vip.hasVip(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n" for i = 1,#getPlayerStorageTable(cid, info.storage[1]) do n = n + 1 str = str.."Slot "..n.." - "..getItemNameById(getPlayerStorageTable(cid, info.storage[1])).."\n" end return doPlayerPopupFYI(cid, 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) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, amount) -- revisado local item, _G = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid), 0 if #item > 0 then for _, x in pairs(item) do local ret = getThing(x) if ret.type < 100 then doTransformItem(ret.uid, itemid, ret.type + amount) if ret.type + amount > 100 then doPlayerAddItem(cid, itemid, ret.type + amount - 100) end break else _G = _G + 1 end end if _G == #item then doPlayerAddItem(cid, itemid, amount) end else return doPlayerAddItem(cid, itemid, amount) 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) 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 then local items = getContainerItems(tile.uid) for i, x in pairs(items) do if isInArray(getPlayerStorageTable(cid, info.storage[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.storage[2]) > 0 and isInArray({2148,2152,2160}, tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit 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
  17. arr1 = { {3} } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 79) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -20.5, 1, -20.5, 1) setCombatArea(combat, createCombatArea(arr1)) local function castSpell(cid, var) if not isPlayer(cid) then return end return doCombat(cid, combat, var) end function onCastSpell(cid, var) if isPlayer(cid) and exhaustion.check(cid, 1200) then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getPlayerPosition(cid), 2) return false end exhaustion.set(cid, 1200, 2) for i = 200, 2000, 400 do addEvent(castSpell, i, cid, var) end return true end
  18. Provavelmente algo relacionado a houses
  19. function onUse(player, item, fromPosition, target, toPosition, isHotkey) if not Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'someone message') return true end Tile(playerPos):hasFlag(TILESTATE_PROTECTIONZONE) if not table.contains({SKULL_RED, SKULL_BLACK}, player:getSkull()) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!") player:getPosition():sendMagicEffect(CONST_ME_POFF) return true end player:setSkull(SKULL_NONE) player:setSkullTime(0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!") db.query("UPDATE `player_deaths` SET `unjustified` = 0 WHERE `unjustified` = 1 AND `killed_by` = " .. db.escapeString(player:getName())) item:remove(1) return true end
  20. Cara, esse é bem louco viu, pode pá

Informação Importante

Confirmação de Termo