-
Total de itens
5780 -
Registro em
-
Última visita
-
Dias Ganhos
96
Tudo que Administrador postou
-
Créditos: Erinsx Um monk que marcará no mapa shops, depots, etc... E se você pedir ele vai te levar ao templo que você reside <?xml version="1.0" encoding="UTF-8"?> <npc name="Brevan" script="jorvikmark.lua" walkinterval="0" floorchange="0" speechbubble="1"> <health now="100" max="100"/> <look type="206" head="17" body="54" legs="114" feet="0" addons="0" /> <parameters> <parameter key="message_greet" value="Greetings |PLAYERNAME|! I can mark your {map} to help you find you way around! If you want this, just say {map}! I can also make Jorvik your {home} town. If you want this, say {home}."/> </parameters> </npc> local marks = { [1]={{x=0496,y=0172,z=7},"Temple",MAPMARK_TEMPLE}, [2]={{x=0408,y=0203,z=7},"Depot",MAPMARK_LOCK}, [3]={{x=0478,y=0148,z=7},"Weapons and Armor shops",MAPMARK_SWORD}, [4]={{x=0464,y=0208,z=7},"Magic shop",MAPMARK_STAR}, [5]={{x=0476,y=0201,z=7},"Potions shop",MAPMARK_STAR}, [6]={{x=0390,y=0202,z=7},"Bank",MAPMARK_DOLLAR}, [7]={{x=0433,y=0235,z=7},"Adventurer Supplies",MAPMARK_BAG}, [8]={{x=0480,y=0163,z=7},"Mount Seller",MAPMARK_EXCLAMATION}, [9]={{x=0430,y=0210,z=7},"Loot Buyer",MAPMARK_TICK}, } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local player = Player(cid) if msg == "map" then for i = 1, #marks do player:addMapMark(marks[i][1],marks[i][3],marks[i][2]) end selfSay('I have marked your map for you, good luck!', cid) talkState[talkUser] = 0 elseif msg == "home" then player:setTown(Town(4)) selfSay('It is done! Goodbye.', cid) talkState[talkUser] = 0 else selfSay('Okay, goodbye.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
- 2 respostas
-
- npc
- teleporter
- (e 7 mais)
-
Curtindo esses desafios haha Ver a galera rachar a cabeça. #EsperandoPorMais
-
Apenas algumas ferramentas que o Codex NG reconstruiu em um interpretador Lua para obter certos valores a partir de arquivos. Monster local data = { ['monster'] = {'name', 'nameDescription', 'race', 'experience', 'speed', 'manacost', 'skull', 'script'}, ['health'] = {'min', 'max'}, ['look'] = { 'type', 'head', 'body', 'legs', 'feet', 'corpse', 'addons', 'typeex', 'mount'}, ['targethange'] = { 'interval', 'chance', 'speed'}, ['flag'] = {'summonable', 'attackable', 'hostile', 'illusionable', 'convinceable', 'pushable', 'canpushitems', 'canpushcreatures', 'staticattack', 'lightlevel', 'lightcolor', 'targetdistance', 'runonhealth', 'hidehealth'}, ['attack'] = {'name', 'interval', 'min', 'max', 'range', 'chance'}, ['attribute'] = {'key', 'value'}, ['defenses'] ={'armor', 'defense'}, ['element'] = {'physicalPercent', 'icePercent', 'poisonPercent', 'earthPercent', 'firePercent', 'energyPercent', 'holyPercent', 'deathPercent', 'drownPercent', 'lifedrainPercent', 'manadrainPercent'}, ['immunity'] = {'name', 'physical', 'energy', 'fire', 'poison', 'earth', 'drown', 'ice', 'holy', 'death', 'lifedrain', 'manadrain', 'paralyze', 'outfit', 'drunk', 'invisible', 'invisibility', 'bleed'}, ['voices'] = {'speed', 'interval', 'chance', 'sentence', 'yell'}, ['voice'] = {'speed', 'interval', 'chance', 'sentence', 'yell'}, ['summons'] = {'maxSummons'}, ['summon'] = {'name','interval','chance','speed'}, ['script'] = {'name'}, ['item'] = {'id','countmax','chance', 'chance1', 'subtype', 'actionId', 'text'} } local dir = 'data/monster/' local file = 'monsters.xml' for line in io.lines(dir..file) do if string.match(line, '<(%a-)%s* ') ~= nil then for lines in io.lines(dir..line:match('file="(.-)"') ) do if string.match(lines, '<(%a-)%s* ') ~= nil then local p = data[string.match(lines, '<(%a-)%s* ')] if p ~= nil then for i = 1, #p do local t = lines:match(p[i]..'="(.-)"') if t ~= nil then print(string.match(lines, '<(%a-)%s* '), p[i], t) end end end end end end end Items local items = {} local para = { 'id', 'name', 'fromid', 'toid', 'key', 'value' } function Items() local file = 'data/items/items.xml' local k = {} for line in io.lines(file) do if string.match(line, '<(%a-)%s* ') ~= nil then local itemParam = string.match(line, '<(%a-)%s* ') if itemParam ~= nil then for type_ in line:gmatch(itemParam) do for i = 1, #para do if line:match(para[i]..'="(.-)"') then table.insert(k, para[i]..' = "'..line:match(para[i]..'="(.-)"')..'", ') end end local temp = '{'..table.concat(k) temp = temp:sub(1, #temp - 2)..'},' k = {} table.insert(items, temp) end end end end for k, v in pairs(items)do print(v) end end Items() Spells local spells = {} local para = { 'group', 'spellid', 'name', 'words', 'lvl', 'mana', 'prem', 'range', 'needtarget', 'blockwalls', 'needweapon', 'exhaustion', 'groupcooldown', 'casterTargetOrDirection', 'aggressive', 'needlearn', 'selftarget', 'script', 'charges', 'maglv' } function parseSpells() local file = 'data/spells/spells.xml' local k = {} for line in io.lines(file) do if string.match(line, '<(%a-)%s* ') ~= nil then spellParam = string.match(line, '<(%a-)%s* ') if spellParam ~= nil then for type_ in line:gmatch(spellParam) do for i = 1, #para do if line:match(para[i]..'="(.-)"') then table.insert(k, para[i]..' = "'..line:match(para[i]..'="(.-)"')..'", ') end end local temp = '{'..table.concat(k) temp = temp:sub(1, #temp - 2)..'},' k = {} table.insert(spells, temp) end end end end for k, v in pairs(spells)do print(v) end end parseSpells()
-
Script feito por Narko Define um número máximo de itens em um tile. function Player:onMoveItem(item, count, fromPosition, toPosition) local tile = toPosition:getTile() if tile then -- checks if tile if Tile(toPosition):getItemCount() >= 6 then self:sendCancelMessage("Sorry, not possible.") return false end end return true end Se por um acaso a função getTile() não funcionar em seu servidor, utilize este: function Player:onMoveItem(item, count, fromPosition, toPosition) if toPosition ~= nil if Tile(toPosition):getItemCount() >= 6 then self:sendCancelMessage("Sorry, not possible.") return false end end return true end
-
Créditos: Codex NG Athern function Player:getCustomSkill(storage) return self:getStorageValue(storage) end function Player:addCustomSkill(skillName, storage) local skillStorage = math.max(10, self:getStorageValue(storage)) local skillTries = math.max(0, self:getStorageValue(storage + 1)) self:setStorageValue(storage, skillStorage + 1) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You advanced to " .. string.lower(skillName) .. " level "..self:getCustomSkill(storage)..".") self:setStorageValue(storage + 1, 0) end function Player:addCustomSkillTry(skillName, storage) local skillStorage = math.max(10, self:getStorageValue(storage)) local skillTries = math.max(0, self:getStorageValue(storage + 1)) self:setStorageValue(storage + 1, skillTries + 1) if skillTries > math.floor(20 * math.pow(1.1, (skillStorage - 11)) / 10) then self:addCustomSkill(skillName, storage) end end function Player:getCustomSkillPercent(storage) local skillStorage = math.max(10, self:getStorageValue(storage)) local skillTries = math.max(0, self:getStorageValue(storage + 1)) local triesNeeded = math.floor(20 * math.pow(1.1, (skillStorage - 11)) / 10) local percent = math.floor(100 * (1 - skillTries / triesNeeded)) if percent > 1 and percent <= 100 then return percent else percent = 1 return percent end end Usando a magia "Haste" como um exemplo, você vai ter que aplicar sua própria formula de aumento de dano, velocidade, etc... local name = "haste" local storage = 15000 local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) local function x(creature, var) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 33000) condition:setFormula(0.3, -24, 0.3, -24) combat:setCondition(condition) creature:addCustomSkillTry(name, storage) return combat:execute(creature, var) end function onCastSpell(creature, var) return x(creature, var) end 22:08 You advanced to haste level 11. 22:09 You advanced to haste level 12.
-
action Square Trainer - Perder stamina enquanto treina
um tópico no fórum postou Administrador Actions e Talkactions
Ta ai um script muito bom galera, créditos e instruções no próprio script. --[[ Square Skill Trainer made by Arthur aka artofwork 12/1/14, my original account Updated 10/15/2015, to 1.2 based on tfs sources on github by Codex NG This script will train all of a players skills indefintely including magic level It has a small configuration setup where you can set the number of tries per skill The time interval in between each skill try added A storage value to help prevent abuse You can assign any tile you wish to this script that a player can walk on with action id 900 Now removes offline training time for free accounts New in this script? skill tries for both free account & premium accounts mana gain for both free & premium accounts mana multipliers to effect magic level for both free and premium accounts based on percentage experience gain for both free and prem accounts Added optional all skills for free accounts or just the weapons & shield they have equiped add this too movements <!-- Square Trainer --> <movevent event="StepIn" actionid="900" script="squaretrainer.lua"/> <movevent event="StepOut" actionid="900" script="squaretrainer.lua"/> save this file in data\movements\script\ as squaretrainer.lua ]]-- local special = false -- true for vip false for prem -- do not edit local currentTime = os.time() local day = 86400 -- 1 full day in seconds local minimumTime = 0 -- minimum time for vip local addSkillTimer = 1000 -- do not edit - time at which skill tries are added local skills = 5 -- 0 to 5 includes 0:fist, 1:club, 2:sword, 3:axe, 4:distance, 5:shield -- do not edit ------------------------------- local allskills = false -- should free accounts train all their skills local removeOfflineTime = true -- do you want to remove offline training time? -- minutes to remove per minute, should be minimum 2 since they gain a minute for every minute they are not killing something local timeOfOfflineToRemove = 2 -- minimum hours needed to train, set it to 12 if u want to test the tp to temple local minimumTimeNeedToUseTrainers = 1 local useConfigMlRate = false -- do you want to use the config settings rate of Magic in this script local useConfigExpRate = false -- do you want to use the config settings rate of Exp in this script local useConfigSkillRate = true -- do you want to use the config settings rate of Skills in this script -- do not edit local keys = { RATE_SKILL = 6, RATE_MAGIC = 8, RATE_LOOT = 7, RATE_EXPERIENCE = 5 } local tseconds = 1000 local tminute = 60 * tseconds local thour = 60 * tminute local trainingTimeMax = thour * minimumTimeNeedToUseTrainers -- 43200000 default value (12 hours) ----------------- -- used by isSpecial, this allows certain account types to skip the offline time removal local godAccount = 4 -- tile actionid local aid = 900 local p = {} local addskills = { prem = 1000, -- xp to add as vip/prem (depends if special is true) account per interval -- the rate is a percentage of their max mana, this way it scales with their level manaGainPremRate = .10, -- mana to add as vip/prem (depends if special is true) account per interval premSkillTries = 100, -- Number of tries per skill for vip/prem (depends if special is true) account per interval premManaMultiplier = 5, -- when player has full mana multiply how much more mana is used to gain magic level free = 100, manaGainFreeRate = .01, -- mana to add as free account per interval freeSkillTries = 1, -- Number of tries per skill for free account freeManaMultiplier = 1, -- when player has full mana multiply how much more mana is used to gain magic level balanceShield = 3 -- 3 is good, but if shielding goes up too quick then lower it, use only whole numbers e.g. 1, 2, 3 } -- do not edit local weaponTypes = { [0] = { 0, 0 }, -- fist { 1, 2 }, -- Sword { 2, 1 }, -- Club { 3, 3 }, -- Axe { 4, 5 }, -- Shield { 5, 4 }, -- Distance { 6, 0 } -- 6 is rod / wands, 0 is for fists.. } local shieldId = 5 function getSlottedItems(player) local left = pushThing(player:getSlotItem(CONST_SLOT_LEFT)).itemid local right = pushThing(player:getSlotItem(CONST_SLOT_RIGHT)).itemid left = ItemType( left ):getWeaponType() right = ItemType( right ):getWeaponType() return left, right end -------------------------------- -- this function is only effected by free accounts function templeTeleport(p) p.player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) p.player:setStorageValue( 18010, 0) local temple = p.player:getTown():getTemplePosition() p.player:teleportTo(temple) temple:sendMagicEffect(CONST_ME_ENERGYAREA) p.player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, "..p.name.." you don't have enough offline time to train.") end function RemoveOfflineTrainingTime(p) if trainingTimeCheck(p) then p.player:removeOfflineTrainingTime(timeOfOfflineToRemove * 60000) p.seconds = 60000 -- reset the timer end end function trainingTimeCheck(p) local time_ = p.player:getOfflineTrainingTime() if time_ <= (timeOfOfflineToRemove * tminute) then templeTeleport(p) end if time_ >= trainingTimeMax then return true else templeTeleport(p) end end function isSpecial(player) -- this is so i could test the shit right away if player:getAccountType() >= godAccount then return true end if special then return (math.floor((player:getStorageValue(13540) - currentTime) / (day)) > minimumTime) else return player:isPremium() end end function train(p) local player = p.player if player:isPlayer() and player:getStorageValue(18010) == 1 then if isSpecial(player) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session will now begin.") addEvent(trainMe, 1, p) else -- if free account, they have to wait 30 seconds to begin training if p.secondsTime > 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session will begin in "..(p.secondsTime).." seconds.") end if p.secondsTime <= 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session will now begin.") addEvent(trainMe, 1, p) else p.secondsTime = p.secondsTime - 10 addEvent(train, 10000, p) end end end return true end function returnRate(useRate, RATE) return useRate and configManager.getNumber(RATE) - 3300 or 1 end function trainMe(p) local player = p.player local weaponLeft, weaponRight = getSlottedItems(player) if player:isPlayer() and player:getStorageValue(18010) == 1 then if isSpecial(player) then player:addExperience(addskills["prem"] * returnRate(useConfigExpRate, RATE_EXPERIENCE) ) -- add mana to player based on premium mana rate settings player:addManaSpent(addskills["manaGainPremRate"] * player:getMaxMana() ) else player:addExperience(addskills["free"] * returnRate(useConfigExpRate, RATE_EXPERIENCE) ) -- add mana to player based on free mana rate settings player:addManaSpent(addskills["manaGainFreeRate"] * player:getMaxMana() ) end for i = 0, skills do if isSpecial(player) then if i == shieldId then -- shielding, will help balance shield gain player:addSkillTries(i, (addskills["premSkillTries"] * addskills["balanceShield"]) * returnRate(useConfigSkillRate, RATE_SKILL) ) else player:addSkillTries(i, addskills["premSkillTries"] * returnRate(useConfigSkillRate, RATE_SKILL) ) -- all other skills end else if allskills then if i == shieldId then -- shielding, will help balance shield gain player:addSkillTries(i, (addskills["freeSkillTries"] * addskills["balanceShield"]) * returnRate(useConfigSkillRate, RATE_SKILL) ) else player:addSkillTries(i, addskills["freeSkillTries"] * returnRate(useConfigSkillRate, RATE_SKILL) ) -- all other skills end else -- this effects only free accounts for i = 0, #weaponTypes do if weaponTypes[i][2] == shieldId and weaponTypes[i][1] == weaponRight then player:addSkillTries(weaponTypes[i][2], (addskills["freeSkillTries"] * addskills["balanceShield"]) * returnRate(useConfigSkillRate, RATE_SKILL) ) end if weaponTypes[i][2] ~= shieldId and weaponTypes[i][1] == weaponLeft then player:addSkillTries(weaponTypes[i][2], addskills["freeSkillTries"] * returnRate(useConfigSkillRate, RATE_SKILL) ) end end end end -- will increase magic level based on max mana times multiplier local maxMana = player:getMaxMana() if player:getMana() == maxMana then if isSpecial(player) then -- premium account multiplier used to increase level player:addManaSpent(maxMana * (addskills["premManaMultiplier"] * returnRate(useConfigMlRate, RATE_MAGIC)) ) else -- free account multiplier used to increase level player:addManaSpent(maxMana * (addskills["freeManaMultiplier"] * returnRate(useConfigMlRate, RATE_MAGIC)) ) end player:addMana(-maxMana) end end if not isSpecial(player) then p.seconds = p.seconds - addSkillTimer if(p.seconds <= 1000) then -- we want to be fair so we make sure the player gets a whole minute if removeOfflineTime then addEvent(RemoveOfflineTrainingTime, 1, p) end end end addEvent(trainMe, addSkillTimer, p) end return true end function onStepIn(player, item, position, fromPosition) if not player:isPlayer() then return false end p = -- this is table is essential so we can pass it to the other functions { player = player:getPlayer(), item = item, pos = player:getPosition(), soul = player:getSoul(), seconds = 60000, secondsTime = 30, name = player:getName() } if player:isPlayer() then if player:getStorageValue(18010) < 1 then if p.item.actionid == aid then player:setStorageValue(18010, 1) -- if the player is a free acc they will lose offline training time as they train if removeOfflineTime then RemoveOfflineTrainingTime(p) end addEvent(train, 1, p) end else player:teleportTo(fromPos, true) end end return true end function onStepOut(player, item, position, fromPosition) p.secondsTime = 30 stopEvent(train) -- may not work as expected stopEvent(trainMe) -- may not work as expected player:setStorageValue(18010, 0) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session has now ended.") return true end -
action Sistema de nocautear e assaltar o player
tópico respondeu ao TaaG de Administrador em Actions e Talkactions
Boa @@TaaG Trazendo uns conteúdos muito bons. -
action Zelda Like Bridge - Fiery Death
um tópico no fórum postou Administrador Actions e Talkactions
Feito por Codex NG. Esse script vai criar uma ponte em direção x e, em seguida, irá destruir-se e enviar o jogador para o andar de baixo. Zelda Like Bridge --[[ Zelda like bridge by Breed ]] c = { -- config b = { -- this is your starting point, depending on the direction you choose is the direction your bridge will form x=124, y=125, z=6, -- every tile after this location will form a bridge for the value of bridgeLength }, sp = 0, -- do not edit actionid = 803, -- action id of the tile which activates the bridge -- these are the normal switch id's but you can use any tiles you like tileStepIn = 426, -- the switch or item you want to use to click on tileStepOut = 425, -- the it will be transformed to bridgeLength = 13, -- the length of the bridge in tiles bridgeItem = 406, -- 406 is black, 407 is white direction = {"north", "east", "south", "west"}, timer = 2, -- time in seconds, 1 equals 1 second itemid = {}, -- table to hold the items that are removed oldLoc = {}, tile_id = 459, -- stairs create = CONST_ME_GROUNDSHAKER, -- this is the effect when creating the bridge destroy = CONST_ME_FIREAREA, -- this is the effect when destroying the bridge exhaust = true, exhaust_time = 1, -- this is the monster = "Demon" } local choice = "east" -- Do not edit anything below function onStepIn(cid, item, pos, fromPos) if item.itemid == c.tileStepIn and item.actionid == c.actionid and isPlayer(cid) then if c.exhaust then c.exhaust = false if choice == c.direction[1] then -- north for i = 1, c.bridgeLength do c.oldLoc[i] = {x = c.b.x, y = c.b.y - i, z = c.b.z, stackpos = c.sp} end elseif choice == c.direction[2] then -- east for i = 1, c.bridgeLength do c.oldLoc[i] = {x = c.b.x + i, y = c.b.y, z = c.b.z, stackpos = c.sp} end elseif choice == c.direction[3] then -- south for i = 1, c.bridgeLength do c.oldLoc[i] = {x = c.b.x, y = c.b.y + i, z = c.b.z, stackpos = c.sp} end elseif choice == c.direction[4] then -- west for i = 1, c.bridgeLength do c.oldLoc[i] = {x = c.b.x - i, y = c.b.y, z = c.b.z, stackpos = c.sp} end end for i = 1, c.bridgeLength do local l = c.oldLoc[i] c.itemid[i] = getThingfromPos(c.oldLoc[i]).itemid local bridge = (i % 2 == 0) and c.bridgeItem or c.bridgeItem + 1 -- this will swap between 2 different tiles addEvent(makeBridge, i * 1000, c.oldLoc[i], bridge, c.create) end doTransformItem(item.uid, c.tileStepOut) addEvent(removeBridge, (c.bridgeLength + c.timer) * 1000, c) return true else doTransformItem(item.uid, c.tileStepOut) end end return true end function makeBridge(pos, item, effect) local newpos = {x = pos.x, y = pos.y, z = pos.z + 1} doSendMagicEffect(pos, effect) doTransformItem(getThingfromPos(pos).uid, item) if getTopCreature(pos).uid > 1 then local player = Tile(pos):getTopCreature() if player ~= nil or player:isPlayer() then player:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) player:teleportTo(newpos, false) end end end function resetExhaust(c, val) c.exhaust = val end function removeBridge(c) for n = 1, c.bridgeLength do addEvent(makeBridge, n * 1000, c.oldLoc[n], c.tile_id, c.destroy) if (n * 1000) == (c.bridgeLength * 1000) then addEvent(resetExhaust, (c.bridgeLength + c.exhaust_time) * 1000, c, true) doSummonCreature(c.monster, c.oldLoc[#c.oldLoc]) end end end function onStepOut(cid, item, pos) doTransformItem(item.uid, c.tileStepIn) end Fiery Death local lava = {598, 599, 600, 601, 1509, 9883} -- lava tile id, 1509 is walkable local health = 1 -- percentage of hp to take, .1 is 10%, .2 is 20%, 1 is 100% function onStepIn(cid, item, pos, fromPos) if isInArray(lava, getThingfromPos(pos).itemid) then doCreatureAddHealth(cid, -(getCreatureMaxHealth(cid) * health)) end end -
Ótimos mapas, você tem uma criatividade incrível =) Esperando por mais buahaha
-
Script feito por Codex NG. Basicamente, este script vai permitir que você faça uma tile (invisível) no qual os jogadores podem pisar. function newGround(pos, id) local tile = Tile(pos) if not tile then Game.createTile(pos) tile = Tile(pos) return tile end if not tile:getItemById(id) then return Game.createItem(id, 1, pos) end return false end local id = 415 -- tile id -- position of the base tile that floats across the screen local pos = {x = 148, y = 148, z = 6, stackpos = 0} -- the distance the tile will travel local distance = 5 function removeGround(pos, id) tile = Tile(pos) if not tile then return false end local ground = tile:getGround() --print(ground, tile.itemid == id, tile, id, ground) if ground then ground:remove() end return pos end function updatePosition(pos, dir, num, stack) if dir == 'n' then pos = {x = pos.x, y = pos.y + num, z = pos.z, stackpos = stack and stack or ( pos.stackpos and pos.stackpos or 0 ) } elseif dir == 'e' then pos = {x = pos.x + num, y = pos.y, z = pos.z, stackpos = stack and stack or ( pos.stackpos and pos.stackpos or 0 ) } elseif dir == 's' then pos = {x = pos.x, y = pos.y - num, z = pos.z, stackpos = stack and stack or ( pos.stackpos and pos.stackpos or 0 ) } elseif dir == 'w' then pos = {x = pos.x - num, y = pos.y, z = pos.z, stackpos = stack and stack or ( pos.stackpos and pos.stackpos or 0 ) } end return pos end function relocate(fromPos, toPos) if fromPos == toPos then return false end local fromTile = Tile(fromPos) if fromTile == nil then return false end if Tile(toPos) == nil then return false end for i = fromTile:getThingCount() - 1, 0, -1 do local thing = fromTile:getThing(i) if thing ~= nil then if thing:isItem() then if ItemType(thing:getId()):isMovable() then thing:moveTo(toPos, true) end elseif thing:isCreature() then thing:teleportTo(toPos, true) end end end return true end local limit = 1 local d = true local storage = 18050 -- position of the base tile that floats across the screen local globalPos = {x = 148, y = 148, z = 6, stackpos = 0} local trackPos = {} function onThink(creature, interval) --if creature:getStorageValue(storage) == 0 then if limit <= distance and d then if limit > 1 then removeGround(pos, id) end if limit <= distance and #trackPos <= distance then trackPos[#trackPos + 1] = pos end --creature:sendTextMessage(MESSAGE_INFO_DESCR, ' forward x = '..pos.x ..', y = ' .. pos.y .. ', z = '..pos.z..'') local old = pos pos = updatePosition(pos, 'e', 1, 0) relocate(old, pos) newGround(pos, id) limit = limit + 1 else pos.x = pos.x >= globalPos.x and pos.x or globalPos.x d = false --creature:sendTextMessage(MESSAGE_INFO_DESCR, ' reverse x = '..pos.x ..', y = ' .. pos.y .. ', z = '..pos.z..'') removeGround(pos, id) local old = pos pos = updatePosition(pos, 'w', 1, 0) relocate(old, pos) newGround(pos, id) limit = limit - 1 if limit == 2 then d = true end end --else --reset() --creature:sendTextMessage(MESSAGE_INFO_DESCR, 'before x = '..pos.x ..', y = ' .. pos.y .. ', z = '..pos.z..'') --print('before',pos.x, pos.y, pos.z) --pos = globalPos --print('after',pos.x, pos.y, pos.z) --creature:sendTextMessage(MESSAGE_INFO_DESCR, 'after x = '..pos.x ..', y = ' .. pos.y .. ', z = '..pos.z..'') --end --MoveTile(1, 6, pos, id, true, 'e', 'w') end function reset() for i = 1, #trackPos do removeGround(trackPos[i], id) end return Game.createItem(id, 1, updatePosition(globalPos, 'e', 1, 0)) end function MoveTile(from, to, pos, id, go, forward, reverse) local dir = {} dir.forward = forward dir.reverse = reverse if from <= to and go then if from > 1 then removeGround(pos, id) end local old = pos pos = updatePosition(pos, dir.forward, 1, 0) relocate(old, pos) newGround(pos, id) from = from + 1 else go = false removeGround(pos, id) local old = pos pos = updatePosition(pos, dir.reverse, 1, 0) relocate(old, pos) newGround(pos, id) from = from - 1 if from == 2 then go = true end end end
-
tfs 1.0/1.2 Level UP "You advanced to level 35 in 3 minutes and 10 seconds".
um tópico no fórum postou Administrador Globalevents e Spells
Script feito por Ahilphino, adiciona uma mensagem com o tempo que você levou para upar, ao upar. creaturescripts\scripts\timelevel.lua function timeString(timeDiff) local dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find("second") then local a, b = ret:find(" and ") ret = ret:sub(b+1) end return ret end function onAdvance(player, skill, oldlevel, newlevel) if skill ~= SKILL_LEVEL then return true end oldtime = player:getStorageValue(3499) timenow = os.time() if oldtime == -1 then player:setStorageValue(3499, timenow) else player:sendTextMessage(MESSAGE_INFO_DESCR, "It took you " .. timeString(timenow - oldtime) .. " to advance in level from your last advance.") player:setStorageValue(3499, timenow) end return true end login.lua player:registerEvent("timelevel") creaturescripts.xml <event type="advance" name="timelevel" script="timelevel.lua"/> -
Esse script foi feito por Codex NG. Bom, o nome já diz tudo então... Bom proveito! global.lua function upGradeSpells(player, words, tier, max) if player:getStorageValue(SPELL_WORDS[words]) < max then if player:getStorageValue(SPELL_WORDS[words]) < TIER[tier] then player:setStorageValue(SPELL_WORDS[words], TIER[tier]) player:getPosition():sendMagicEffect(CONST_ME_CONFETTI_HORIZONTAL) doCreatureSay(cid, tier, TALKTYPE_ORANGE_1, false, 0, player:getPosition()) elseif player:getStorageValue(SPELL_WORDS[words]) == TIER[tier] then player:sendCancelMessage("You've already scribed a this version of the spell.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false else player:sendCancelMessage("You already have a higher spell version scribed.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end else player:sendCancelMessage("You've reached the maximum tier for this spell.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end end --light, haste, single targets, area, single target heal, support spell, speed SPELL_WORDS = { ["exura dis"] = 1001, ["exevo dis flam hur"] = 1002, ["exiva"] = 1003, ["exori min flam"] = 1004, ["utevo lux"] = 1005, ["exura"] = 1006, ["exani tera"] = 1007, ["exura ico"] = 1008, ["exana pox"] = 1009, ["exani hur"] = 10010, ["exori vis"] = 10011, ["exori tera"] = 10012, ["exevo con"] = 10013, ["utevo gran lux"] = 10014, ["exori flam"] = 10015, ["exevo pan"] = 10016, ["adevo grav pox"] = 10017, ["utamo vita"] = 10018, ["utani hur"] = 10019, ["adevo grav flam"] = 10020, ["exori frigo"] = 10021, ["adori min vis"] = 10022, ["adana pox"] = 10023, ["adura gran"] = 10024, ["exori moe ico"] = 10025, ["exevo con pox"] = 10026, ["exori mort"] = 10027, ["exori ico"] = 10028, ["adeta sio"] = 10029, ["adito grav"] = 10030, ["exevo con mort"] = 10031, ["adevo grav vis"] = 10032, ["exevo flam hur"] = 10033, ["exura sio"] = 10034, ["exevo frigo hur"] = 10035, ["exura gran"] = 10036, ["utani gran hur"] = 10037, ["exeta res"] = 10038, ["adori blank"] = 10039, ["adito tera"] = 10040, ["exana vis"] = 10041, ["exevo vis lux"] = 10042, ["utevo res ina"] = 10043, ["exori con"] = 10044, ["exevo con hur"] = 10045, ["adori tera"] = 10046, ["adura vita"] = 10047, ["adevo mas pox"] = 10048, ["adori vis"] = 10049, ["exevo con flam"] = 10050, ["utani tempo hur"] = 10051, ["utevo res"] = 10052, ["utori flam"] = 10053, ["utevo vis lux"] = 10054, ["exana ina"] = 10055, ["adevo mas flam"] = 10056, ["adevo res flam"] = 10057, ["adori san"] = 10058, ["adori flam"] = 10059, ["adevo ina"] = 10060, ["adana mort"] = 10061, ["adevo grav vita"] = 10062, ["adori frigo"] = 10063, ["exori hur"] = 10064, ["adori mas vis"] = 10065, ["adori mas tera"] = 10066, ["exevo gran vis lux"] = 10067, ["adevo mas grav pox"] = 10068, ["exura vita"] = 10069, ["exana flam"] = 10070, ["adori mas frigo"] = 10071, ["adori mas flam"] = 10072, ["adevo mas hur"] = 10073, ["adevo grav tera"] = 10074, ["utura mas sio"] = 10075, ["utori mas sio"] = 10076, ["utito mas sio"] = 10077, ["utamo mas sio"] = 10078, ["adevo mas grav flam"] = 10079, ["exevo con grav"] = 10080, ["exori mas"] = 10081, ["utori vis"] = 10082, ["utana vid"] = 10083, ["exori"] = 10084, ["exura san"] = 10085, ["exura gran mas res"] = 10086, ["adevo mas vis"] = 10087, ["exevo vis hur"] = 10088, ["exevo tera hur"] = 10089, ["exori san"] = 10090, ["exevo gran frigo hur"] = 10091, ["utori kor"] = 10092, ["adevo mas grav vis"] = 10093, ["exeta vis"] = 10094, ["exeta con"] = 10095, ["exana kor"] = 10096, ["adori gran mort"] = 10097, ["utura"] = 10098, ["utori pox"] = 10099, ["exevo mas san"] = 100100, ["adana ani"] = 100101, ["utamo tempo san"] = 100102, ["exevo gran mas tera"] = 100103, ["utamo tempo"] = 100104, ["exevo gran mas vis"] = 100105, ["exori amp vis"] = 100106, ["exevo con vis"] = 100107, ["utito tempo san"] = 100108, ["exura gran san"] = 100109, ["exevo gran mas frigo"] = 100110, ["exevo gran mas flam"] = 100111, ["utito tempo"] = 100112, ["exori gran tera"] = 100113, ["exori gran flam"] = 100114, ["exori min"] = 100115, ["utori san"] = 100116, ["utori mort"] = 100117, ["exori gran vis"] = 100118, ["exana mort"] = 100119, ["exura gran ico"] = 100120, ["exori gran frigo"] = 100121, ["exori max flam"] = 100122, ["exori max tera"] = 100123, ["exori gran con"] = 100124, ["exori gran"] = 100125, ["exori max frigo"] = 100126, ["exori max vis"] = 100127, ["utura gran"] = 100128, ["exori gran ico"] = 100129 } TIER = { ["Apprentice"] = 0, ["Journeyman"] = 1, ["Adept"] = 2, ["Expert"] = 3, ["Master"] = 4, ["Grandmaster"] = 5 } Isso é salvo em chatchannels data\chatchannels\chatchannels.xml <?xml version="1.0" encoding="UTF-8"?> <channels> <channel id="2" name="Tutor" script="tutor.lua" /> <channel id="3" name="World Chat" public="1" script="worldchat.lua" /> <channel id="4" name="Spells" public="1" script="spells.lua" /> <channel id="5" name="Trade" public="1" script="advertising.lua" /> <channel id="6" name="Advertising-Rookgaard" public="1" script="advertising-rook.lua" /> <channel id="7" name="Help" public="1" script="help.lua" /> <channel id="8" name="Gamemaster" script="gamemaster.lua" /> </channels> data\chatchannels\scripts\spells.lua local CHANNEL_CHARACTER = 4 local tier = { [0] = "[ Apprentice ]", [1] = "[ Journeyman ]", [2] = "[ Adept ]", [3] = "[ Expert ]", [4] = "[ Master ]", [5] = "[ Grandmaster ]" } local function listSpells(player) local count = getPlayerInstantSpellCount(player) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(player, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end t[#t+1] = spell end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "\nSpells for Level " .. spell.level .. "\n" prevLevel = spell.level player:sendChannelMessage(cid, line, TALKTYPE_CHANNEL_O, CHANNEL_CHARACTER) end if player:getStorageValue(SPELL_WORDS[spell.words]) > 0 then local index = player:getStorageValue(SPELL_WORDS[spell.words]) text = " " .. spell.words .. " " .. tier[index] .. " - " .. spell.name .. " : " .. spell.mana .. "\n" else text = " " .. spell.words .. " " .. tier[0] .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end player:sendChannelMessage(cid, text, TALKTYPE_CHANNEL_Y, CHANNEL_CHARACTER) end end function onJoin(player) addEvent(listSpells, 100, player) return true end function onSpeak(player, type, message) player:sendCancelMessage("You may not speak in this chat.") return false end Exemplo: data\chatchannels\actions\scripts\spells.lua function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) upGradeSpells(cid, "exevo pan", 1, item) return true end Exemplo em Spell: local food = { 2666, -- meat 2671, -- ham 2681, -- grape 2674, -- apple 2689, -- bread 2690, -- roll 2696 -- cheese } function onCastSpell(creature, var) if not creature:isPlayer() then return false end if creature:getStorageValue(SPELL_WORDS["exevo pan"]) > 0 then -- if the tier is higher then apprentice increase the amount of food created creature:addItem(food[math.random(#food)], (creature:getStorageValue(SPELL_WORDS["exevo pan"]) + 1)) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) else -- else give 1 piece of food creature:addItem(food[math.random(#food)], 1) creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end return true end
-
kk Valeu
-
Trabalhando nisso:
-
cidade de pallet sendo desinvolvida
tópico respondeu ao faeleligi de Administrador em Exposições (Show Off)
Ta ficando Show @faeleligi -
Caramba, parabéns @ Ótimo script
-
HUE HUE BRBR você tem talento manin
-
open pvp OT Dedicado no Brasil 24h (200x + Mapa Exclusivo + Sistemas Únicos)
tópico respondeu ao dudu2323 de Administrador em OTServlist
Servidor parece ser muito bom, o site também está bem bacana. =) -
dúvida [Encerrado] [AJUDA] Erro SQLite ?
tópico respondeu ao yagoshira004 de Administrador em Tópicos Sem Resposta
Imagem não abre aqui, hospeda no imgur.com -
[Encerrado]Projeto Dragon Ball Z Online V8.60
tópico respondeu ao Gokussj5 de Administrador em Formação de Equipes
Projeto interessante, boa sorte! -
tfs 0.3.6 Erro Use With Sword ou Runa Mana Rune
pergunta respondeu ao Estelinha de Costek de Administrador em Programação
Coloque os scripts dos itens no tópico para facilitar. Acontece com todas as runas/swords? -
Credito que isso seja bem útil, boa cara
-
• MAGEBOT Saiba como crackear seu magebot e usá-lo 100% grátis clicando aqui. Ou assista este vídeo e aprenda como crackear todas as versões do seu magebot. • DOWNLOADS 10.x MagebotSetupvT1082.exe MagebotSetupvT1081.exe MagebotSetupvT1080.exe MagebotSetupvT1079.exe MagebotSetupvT1078.exe MagebotSetupvT1077.exe MagebotSetupvT1076.exe MagebotSetupvT1075.exe MagebotSetupvT1074.exe MagebotSetupvT1073.exe MagebotSetupvT1072.exe MagebotSetupvT1071.exe MagebotSetupvT1070.exe MagebotSetupvT1064.exe MagebotSetupvT1062.exe MagebotSetupvT1061.exe MagebotSetupvT1060.exe MagebotSetupvT1059.exe MagebotSetupvT1058.exe MagebotSetupvT1057.exe MagebotSetupvT1056.exe MagebotSetupvT1055.exe MagebotSetupvT1054.exe MagebotSetupvT1053b.exe MagebotSetupvT1052.exe MagebotSetupvT1051.exe MagebotSetupvT1050.exe MagebotSetupvT1039t.exe MagebotSetupvT1038.exe MagebotSetupvT1036t.exe MagebotSetupvT1035.exe MagebotSetupvT1034.exe MagebotSetupvT1033.exe MagebotSetupvT1032.exe MagebotSetupvT1031.exe MagebotSetupvT1030.exe MagebotSetupvT1022.exe MagebotSetupvT1021c.exe MagebotSetupvT1020c.exe MagebotSetupvT1012.exe MagebotSetupvT1011.exe MagebotSetupvT1010.exe 9.x MagebotSetupvT984b.exe MagebotSetupvT982b.exe MagebotSetupvT980.exe MagebotSetupvT971.exe MagebotSetupvT970.exe MagebotSetupvT963c.exe MagebotSetupvT960.exe MagebotSetupvT954.exe MagebotSetupvT953.exe MagebotSetupvT952.exe MagebotSetupvT951.exe MagebotSetupvT950.exe MagebotSetupvT946.exe MagebotSetupvT944.exe MagebotSetupvT943.exe MagebotSetupvT942.exe MagebotSetupvT941.exe MagebotSetupvT940.exe MagebotSetupvT931.exe MagebotSetupvT920.exe MagebotSetupvT910.exe MagebotSetupvT900.exe 8.x MagebotSetupvT874.exe MagebotSetupvT873.exe MagebotSetupvT872.exe MagebotSetupvT871.exe MagebotSetupvT870.exe MagebotSetupvT862.exe MagebotSetupvT861.exe MagebotSetupvT860.exe MagebotSetupvT857.exe MagebotSetupvT855.exe MagebotSetupvT854.exe MagebotSetupvT853.exe MagebotSetupvT852.exe MagebotSetupvT850.exe MagebotSetupvT842.exe MagebotSetupvT841.exe MagebotSetupvT831.exe MagebotSetup_vT822.exe MagebotSetup_vT821.exe
-
Procurei em todos os fóruns que esse mapa está postado, estão todos com o link quebrado. Vou falar com o slec e ver se ele tem o mapa =) btw, se alguém tiver, posta ai!
-
Eai galera, achei essas extensões criadas por RokojoM e Limos da OtLand. Bom, espero que curtam. Itens.otb OFICIAL BAIXAR EXTENSÕES RkjM RME Mod.rar Map Editor (Última Versão) (São os arquivos que você deve utilizar no map editor para ter as extensões mostradas nas imagens - Para usar basta colar os arquivos baixados em Remere's Map Editor > data > client) IMAGENS
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.