Ir para conteúdo

Oneshot

Marquês
  • Total de itens

    1347
  • Registro em

  • Última visita

  • Dias Ganhos

    36

Tudo que Oneshot postou

  1. Oneshot

    spell sem exhaust

    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.5, -900, -1.0, -1200) setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 16) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.5, -900, -1.0, -1200) setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, 16) arr1 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 3, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 3, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local area2 = createCombatArea(arr2) setCombatArea(combat2, area2) function onCastSpell(cid, var) local p = getCreaturePosition(cid) local x = { [0] = {x=p.x+1, y=p.y, z=p.z}, [1] = {x=p.x+2, y=p.y+1, z=p.z}, [2] = {x=p.x+1, y=p.y+2, z=p.z}, [3] = {x=p.x, y=p.y+1, z=p.z} } local y = { [0] = 47, [1] = 47, [2] = 47, [3] = 47 } pos = x[getCreatureLookDirection(cid)] eff = y[getCreatureLookDirection(cid)] doSendMagicEffect(pos, eff) doCombat(cid, combat1, var) doCombat(cid, combat2, var) return true end
  2. <?PHP $storage_number = 2000; $values = $SQL->query("SELECT name, level, value FROM players, player_storage WHERE players.id = player_storage.player_id AND player_storage.key = ".$storage_number." ORDER BY value DESC LIMIT 100"); $main_content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><CENTER><H2>Storage Ranking</H2></CENTER><BR>"; $main_content .= "<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%></TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR='".$config['site']['vdarkborder']."'><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=50% CLASS=whites><B>Name</B></TD><TD WIDTH=10% CLASS=whites><B>Level</B></TD><TD WIDTH=30% CLASS=whites><B>Value</B></TD>"; foreach($values as $value) { if(!is_int($number_of_rows /2)) { $bgcolor = $config["site"]["darkborder"]; } else { $bgcolor = $config["site"]["lightborder"]; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>'.$number_of_rows.'</TD><TD><a href="?subtopic=characters&name='.urlencode($value["name"]).'">'.$value["name"].'</a></TD><TD>'.$value["level"].'</TD><TD>'.$value["value"].'</TD></TR>'; } $main_content .= "</TR></TABLE>"; $main_content .= "</TR></TABLE>"; ?> Pra Gesior AAC. Abraços.
  3. Tá aí o problema, a função doPlayerPopupFYI utiliza uma variável que não foi declarada no script. local config = { loginMessage = getConfigValue('loginMessage') } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local Subwat = getPlayerAccountManager(cid) if(Subwat == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Seu ultimo login foi " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. "The BEST" doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(Subwat == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appearss that your character has been namelocked, what would you like as your new name?") elseif(Subwat == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' acessar sua conta ou digite 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Ola, digite 'account' Para criar uma conta no Subwat ou 'recover' Para recuperar conta perdida.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local message = "Subwat Server - Um mapa escroto com hunts escrotas para gente escrota" doPlayerPopupFYI(cid, message) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Bem vindo!") registerCreatureEvent(cid, "Mail") if getPlayerLevel(cid) < 717217 then registerCreatureEvent(cid, "AdvanceTeleport") end registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "DeathBroadcast") registerCreatureEvent(cid, "addons") registerCreatureEvent(cid, "FragReward") registerCreatureEvent(cid, "ZombieAttack") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "magebomb") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "RepLogin") registerCreatureEvent(cid, "ReportBug") doSetCreatureLight(cid, 25, 250, -1) return true end Agora sim funcionará. Abraços.
  4. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 3.5, 7) local area = createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5) setCombatArea(combat, area) function onCastSpell(cid, var) if isMonster(cid) then doCreatureSay(cid, "exevo tera hur", TALKTYPE_MONSTER) end return doCombat(cid, combat, var) end
  5. SendFYIBox, é aquela caixa de mensagem For Your Information, que só aguenta, se não me engano, 255 caracteres. Verifique em algum script que usa a função doPlayerPopupFYI com um texto muito grande.
  6. Sério mesmo que o cara tá reclamando que tiraram o tópico do pênis com verrugas dele do Barzinho?
  7. Toma, cara. local spell_config = { [1] = { damage = COMBAT_FIREDAMAGE, areaEffect = CONST_ME_FIREAREA, shootEffect = CONST_ANI_FLAMMINGARROW }, [2] = { damage = COMBAT_ENERGYDAMAGE, areaEffect = CONST_ME_ENERGYAREA, shootEffect, CONST_ANI_FLASHARROW }, [3] = { damage = COMBAT_EARTHDAMAGE, areaEffect = CONST_ME_SMALLPLANTS, shootEffect, CONST_ANI_EARTHARROW } } local combats = {} for _, config in ipairs(spell_config) do local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, config.damage) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.areaEffect) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, config.shootEffect) function onGetFormulaValues(cid, level, skill, attack, factor) return -(((skill + 25) / 3) + (level / 5)), -((skill + 25) + (level / 5)) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") table.insert(combats, combat) end function onCastSpell(cid, var) for n = 1, #combats do addEvent(doCombat, n * 100, cid, combats[n], var) end return true end
  8. Olá, Thorick. Primeiramente seja bem-vindo ao xtibia.com. Crie um arquivo em data/logs, chamado promotion21122012.log, este será o arquivo responsável por armazenar os IPs que já receberam prêmios. Em data/actions/scripts, crie um arquivo chamado chest21122012.lua, colando o código abaixo: local REWARDS = { {2160, 100} } function onUse(cid, item, fromPosition, itemEx, toPosition) local file = io.open(getLogsDir() .."/promotion21122012.log", "a+") local text = file:read("*a") if text:find(getPlayerIp(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") end for n = 1, #REWARDS do local tmp = doCreateItemEx(REWARDS[n][1], REWARDS[n][2]) doPlayerAddItemEx(cid, tmp, true) end file:write(getPlayerIp(cid) .."\n") file:close() return true end Em data/actions/actions.xml, adicione a seguinte linha: <action uniqueid="10000" event="script" value="promotion21122012.lua"/> Obs: Você pode mudar o número 10000 para a uniqueid do baú. Antes de: </actions> Em data/npc/scripts, crie um arquivo chamado npcisland.lua, colando o código abaixo: 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 local guild_name = "Exemplo" local to_position = {x = 100, y = 100, z = 7} function callbackOnCreatureSay(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, "island") then if getPlayerGuildName(cid) == guild_name then doTeleportThing(cid, to_position) else selfSay("Sorry, only members of the guild ".. guild_name .." can teleport to the {island}.", cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, callbackOnCreatureSay) npcHandler:setMessage(MESSAGE_GREET, "Hello, |PLAYERNAME|. Do you want to go to {island}.") npcHandler:addModule(FocusModule:new()) Basta fazer um NPC que use o script acima. Você pode mudar o nome da guild permitida aqui: local guild_name = "Exemplo" Abraços.
  9. --[[ <(Advanced Reset System 2.0)> Autor: Juniior Cwb ;*. Contato: (Juniior_Cwb@hotmail.com) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Atenção , Se Achar Esse Sistema em outro site ou forum favor comunicar Eu ( Juniior Cwb ) Juniior_Cwb@hotmail.com ) -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [sTAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "/installreset" -- Só será usado uma vez, para instalar o sistema. -- "!resetar" -- Para Resetar. function onSay(cid, words, param) if words =="!resetar" then if getCreatureStorage(cid, 88833) > os.time() then return doPlayerSendCancel(cid, "Espere mais ".. getCreatureStorage(cid, 88833) - os.time() .." segundos.") end --[ Condições de Reset ] -- local coNdConf = { needPz = false, -- Precisa estar em Pz pra resetar? [true, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [true, false] red = true, -- Players com Pk Red pode resetar? [true, false] battle = true, -- Players precisão estar sem battle pra resetar? [true, false] teleport = false, -- Teleportar Player para o templo após resetar? [true, false] look = true, -- Aparecer Resets no Look do Player? [true, false] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 350, -- Level Necessário para Resetar. [Valor] backLvl = 10, -- Level que voltará após o Reset. [Valor] time = 2, -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {x}, Desabilitar = {}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 4, premmy= 350, free= 350}, stage2= {resets= 9, premmy= 360, free= 360}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 14, premmy= 370, free= 370}, -- resets = Número de resets para o Stage; stage4= {resets= 19, premmy= 380, free= 380}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 24, premmy= 390, free= 390}, -- free = Level necessário para Free Accounts; stage6= {resets= 29, premmy= 400, free= 400}, -- Coloque em Ordem... stage7= {resets= 34, premmy= 420, free= 420}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 39, premmy= 440, free= 440}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 44, premmy= 460, free= 460}, stage10={resets= 49, premmy= 480, free= 480}, stage11={resets= 54, premmy= 500, free= 500}, stage12={resets= 59, premmy= 525, free= 525}, stage13={resets= 64, premmy= 550, free= 550}, stage14={resets= 69, premmy= 575, free= 575}, stage15={resets= 74, premmy= 600, free= 600}, stage16={resets= 79, premmy= 650, free= 650}, stage17={resets= 84, premmy= 700, free= 700}, stage18={resets= 89, premmy= 750, free= 750}, stage19={resets= 94, premmy= 800, free= 800}, stage20={resets= 99, premmy= 1000, free= 1000}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) doCreatureSetStorage(cid, 88833, os.time()+10) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) doCreatureSetStorage(cid, 88833, os.time()+10) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown (cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[sTAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, premmy= stage.stage1.premmy, free= stage.stage1.free}, {resets= stage.stage2.resets, premmy= stage.stage2.premmy, free= stage.stage2.free}, {resets= stage.stage3.resets, premmy= stage.stage3.premmy, free= stage.stage3.free}, {resets= stage.stage4.resets, premmy= stage.stage4.premmy, free= stage.stage4.free}, {resets= stage.stage5.resets, premmy= stage.stage5.premmy, free= stage.stage5.free}, {resets= stage.stage6.resets, premmy= stage.stage6.premmy, free= stage.stage6.free}, {resets= stage.stage7.resets, premmy= stage.stage7.premmy, free= stage.stage7.free}, {resets= stage.stage8.resets, premmy= stage.stage8.premmy, free= stage.stage8.free}, {resets= stage.stage9.resets, premmy= stage.stage9.premmy, free= stage.stage9.free}, {resets=stage.stage10.resets, premmy=stage.stage10.premmy, free=stage.stage10.free}, {resets=stage.stage11.resets, premmy=stage.stage11.premmy, free=stage.stage11.free}, {resets=stage.stage12.resets, premmy=stage.stage12.premmy, free=stage.stage12.free}, {resets=stage.stage13.resets, premmy=stage.stage13.premmy, free=stage.stage13.free}, {resets=stage.stage14.resets, premmy=stage.stage14.premmy, free=stage.stage14.free}, {resets=stage.stage15.resets, premmy=stage.stage15.premmy, free=stage.stage15.free}, {resets=stage.stage16.resets, premmy=stage.stage16.premmy, free=stage.stage16.free}, {resets=stage.stage17.resets, premmy=stage.stage17.premmy, free=stage.stage17.free}, {resets=stage.stage18.resets, premmy=stage.stage18.premmy, free=stage.stage18.free}, {resets=stage.stage19.resets, premmy=stage.stage19.premmy, free=stage.stage19.free}, {resets=stage.stage20.resets, premmy=stage.stage20.premmy, free=stage.stage20.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown (cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: marcello_dirt@hotmail.com", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installreset" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] - ="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[by: Juniior Cwb ;* ]=-- =-- Que gambiarra esse sistema hein...
  10. data/weapons/scripts/scythe of death.lua local config = { chances = { curse = 10, coma = 3, breaking = 5 }, soulcost = 1 } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) local function onCurse(cid) if not isCreature(cid) then return true end doAreaCombatHealth(0, COMBAT_DEATHDAMAGE, getThingPosition(cid), 0, -(getCreatureMaxHealth(cid) * 0.1), -(getCreatureMaxHealth(cid) * 0.1), CONST_ME_MORTAREA) return true end function onUseWeapon(cid, var) if (config.chances.breaking * 100) > math.random(1, 10000) then doRemoveItem(getPlayerItemById(cid, true, 2550).uid, 1) return true end if getPlayerSoul(cid) < config.soulcost then return true end local target = variantToNumber(var) if (config.chances.curse * 100) > math.random(1, 10000) then doCreatureSay(cid, "Curse Sentence!", TALKTYPE_ORANGE_1) doSendDistanceShoot(getThingPosition(cid), getThingPosition(target), CONST_ANI_SUDDENDEATH) doSendMagicEffect(getThingPosition(target), CONST_ME_MORTAREA) for n = 1, 10 do addEvent(onCurse, n * 6 * 1000, target) end elseif (config.chances.coma * 100) > math.random(1, 10000) then doCreatureAddHealth(target, (1 - getCreatureMaxHealth(target))) doCreatureSay(cid, "Death Sentence!", TALKTYPE_ORANGE_1) doSendDistanceShoot(getThingPosition(cid), getThingPosition(target), CONST_ANI_SUDDENDEATH) doSendMagicEffect(getThingPosition(target), CONST_ME_MORTAREA) else doCombat(cid, combat, var) end doPlayerAddSoul(cid, -config.soulcost) return true end data/weapons/weapons.xml <melee id="2550" level="100" unproperly="1" event="script" value="scythe of death.lua"/>
  11. Normalmente quem cria tópicos de despedida, não vem agradecer os outros usuários que vêm desejar boa sorte e a puta que o pariu, cacete.
  12. Legal, cara, legal mesmo. function getMonsterLootList(name) local monster = getMonsterInfo(name) return monster and monster.loot or false end Abraços, cara, abraços.
  13. Consertarei os bugs assim que puder. Abraços.
  14. Não está quebrado, o sistema de censura do fórum que trocou o nome da concorrente por ######
  15. Faz isso aqui: local item = getPlayerItemById(cid, true, 2112) doUseItem(cid, item.uid) Mude o 2112 para o ID do item.
  16. Não, velho, na boa... Você só pode estar de brincadeira... http://www.xtibia.com/forum/topic/201384-script-para-quando-matar-o-player-de-mesmo-ip-perde-level/
  17. int32_t LuaInterface::luaGetChannelUsers(lua_State* L) { //getChannelUsers(channelId) ScriptEnviroment* env = getEnv(); uint16_t channelId = popNumber(L); if(ChatChannel* channel = g_chat.getChannelById(channelId)) { UsersMap usersMap = channel->getUsers(); UsersMap::iterator it = usersMap.begin(); lua_newtable(L); for(int32_t i = 1; it != usersMap.end(); ++it, ++i) { lua_pushnumber(L, i); lua_pushnumber(L, env->addThing(it->second)); pushTable(L); } } else lua_pushboolean(L, false); return 1; } Ela funciona como descrito acima. Abraços.
  18. doAddAccountBanishment(getAccountIdByName(getCreatureName(cid)))
  19. Eee que legal... function fixStr(str) local ret = "" for n in string.gmatch(str, "%w+") do ret = ret .. string.sub(n, 0, 1):upper() .. string.sub(n, 2) end return ret end
  20. Procure na internet por ASCII e você vai entender o significado de string.byte.
  21. 1. O item que dará a storage ao jogador A local storage = 47454 function onUse(cid, item, fromPosition, itemEx, toPosition) local result = getCreatureStorage(cid, storage) if result == 1 then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end return doCreatureSetStorage(cid, storage, 1) end 2. A talkaction que executada em um certo canal, mostra a lista e teleporta para tal jogador. local config = { storage = 47454 } function getPlayersByStorage(storage) local ret = {} for _, pid in ipairs(getPlayersOnline()) do if getCreatureStorage(pid, storage) == 1 then table.insert(ret, getCreatureName(pid)) end end table.sort(ret, function(a, b) return string.byte(string.sub(a, 0, 1)) < string.byte(string.sub(b, 0, 1)) end) return ret end function onSay(cid, words, param, channel) if param == "" then return doPlayerSendCancel(cid, words .." [all] or [player number]") end if param == "all" then local msg = "" for n = 1, #getPlayersByStorage(config.storage) do local name = ret[n] msg = msg .. n ..". ".. name .."\n" end doShowTextDialog(cid, 1960, msg) elseif tonumber(param) then local key = tonumber(param) local pid = getPlayerByNameWildcard(getPlayersByStorage(config.storage)[key]) if not pid then return doPlayerSendDefautCancel(cid, RETURNVALUE_NOTPOSSIBLE) end doTeleportThing(cid, getThingPosition(pid)) end return true end É aconselhável fazer isso na hora de colocar no talkactions.xml <talkaction words="/show" channel="9" event="script" value="arquivo.lua"/> Assim a talkaction só poderá ser executada no channel de ID 9, por exemplo.
  22. Troca essa linha doAddPlayerBanishment(getPlayerGUID(cid), 3, (os.time() + (24 * 60 * 60)), 12, 2, "[sISTEMA ANTI-BOT]") Por essa doAddAccountBanishment(getAccountIdByName(getOnlinePlayers()[x])) No creaturescript e no globalevent. Abraços.
  23. Tô rindo disso aí, cara. Isso aí nem é uma função, está mais para uma piada sobre loops em Lua. Aquela raposa é louca mesmo.
  • Quem Está Navegando   0 membros estão online

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