-
Total de itens
631 -
Registro em
-
Última visita
-
Dias Ganhos
13
Tudo que jhon992 postou
-
Não vou analisar o código acima, mais assim resolve o seu problema caso o de cima não esteja correto novamente. --[[ <(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]=-- -- "!resetar" -- Para Resetar. local exhaustionMinutes = 2 -- exausted em minutos local storageUse = 34538 -- storage usado no exausted. function onSay(cid, words, param) if words =="!resetar" then if(exhaustion.check(cid, storageUse) == TRUE) then if (exhaustion.get(cid, storageUse) >= 60) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. math.floor(exhaustion.get(cid, storageUse) / 60 + 1) .."] minutos.") end if (exhaustion.get(cid, storageUse) <= 60) then doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, storageUse).."] segundos.") end return TRUE end exhaustion.set(cid, storageUse, exhaustionMinutes*60) --[ Condições de Reset ] -- local coNdConf = { needPz = true, -- 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 = false, -- 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 = 8, -- 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= 700, free= 700}, stage14={resets= 69, premmy= 750, free= 750}, stage15={resets= 74, premmy= 760, free= 760}, stage16={resets= 79, premmy= 900, free= 900}, stage17={resets= 84, premmy= 1000, free= 1000}, stage18={resets= 89, premmy= 1100, free= 1100}, stage19={resets= 94, premmy= 1200, free= 1200}, stage20={resets= 99, premmy= 1500, free= 1500}, } --[[>> 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) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) 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 == "/installresetguiizeera" 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 ;* ]=--
-
no meu script, a vocation que vai virar é a promotion da vocação atual em que o player esta. Ou seja, a promotion da vocação que esta dentro da variavel: vocationid = {2,3},
-
esse mostra a lista de players online com o mesmo ip n eh?
-
function onUse(cid, item, fromPosition, itemEx, toPosition) local configs = { vocationid = {2,3}, -- id da vocação que pode usar o item, que quiser deixar apenas a 2 põe {2}. level = 20 -- lvl minimo para usar o item. } if isInArray(configs.vocationid, getPlayerVocation(cid)) then if getPlayerLevel(cid) >= configs.level then if getPlayerPromotionLevel(cid) < 1 then setPlayerPromotionLevel(cid, 1) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 19, "Você foi promovido para "..getPlayerVocation(cid)..".") doSendMagicEffect(getPlayerPosition(cid), 29) else doPlayerSendCancel(cid, "Voce ja é promoted.") end else doPlayerSendCancel(cid, "Voce precisa ser level " .. configs.level .. " ou maior para adiquirir a promotion.") end else doPlayerSendCancel(cid, "Sua vocação não pode usar isso!") end return true end
-
Domination-Ot - Global 8.60 Com Zão Full 13 Vipcitys 7 Events...
tópico respondeu ao KleytonAfonso de jhon992 em Lixeira Pública
8.6 ta muito ultrapassado jah. -
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid 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 greetCallback(cid) talkState[talkUser] = 0 return true end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then return false end local vocationsNameId = { {name = "Elder Druid", id = 5}, -- nome da vocação, id {name = "Master Sorcerer", id = 6} } local vocationNeed = {1,2,3} -- id da vocação que precisa estar. local startstorageid = 30031 local msg = string.lower(msg) if getPlayerLevel(cid) < 20 then selfSay("You need level 20 to change vocation.", cid) npcHandler:onCreatureDisappear(cid) end if not isInArray(vocationNeed, getPlayerVocation(cid)) then selfSay("You can not change his vocation here!", cid) npcHandler:onCreatureDisappear(cid) end if getPlayerStorageValue(cid, startstorageid) == 3 then selfSay("You has changed your vocation!", cid) npcHandler:onCreatureDisappear(cid) end if msgcontains(msg, 'yes') and talkState[talkUser] == nil or talkState[talkUser] == 0 then selfSay("You want to change your vocation?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, 'no') and talkState[talkUser] == nil or talkState[talkUser] == 0 then talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then selfSay("Ok, you change to {"..(vocationsNameId[1].name).."} or {"..(vocationsNameId[2].name).."}?", cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'no') and talkState[talkUser] == 2 then talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) elseif msgcontains(msg, string.lower(vocationsNameId[1].name)) and talkState[talkUser] == 3 then selfSay("You want to change your vocation to {"..(vocationsNameId[1].name).."}?", cid) setPlayerStorageValue(cid, startstorageid, 1) talkState[talkUser] = 4 elseif msgcontains(msg, string.lower(vocationsNameId[2].name)) and talkState[talkUser] == 3 then selfSay("You want to change your vocation to {"..(vocationsNameId[2].name).."}?", cid) setPlayerStorageValue(cid, startstorageid, 2) talkState[talkUser] = 4 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 4 then doPlayerSetVocation(cid, vocationsNameId[getPlayerStorageValue(cid, startstorageid)].id) doSendMagicEffect(getCreaturePosition(cid), 29) setPlayerStorageValue(cid, startstorageid, 3) selfSay("Ok, you have changed this vocation to vocation {"..(vocationsNameId[getPlayerStorageValue(cid, startstorageid)].name).."}.", cid) talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) elseif msgcontains(msg, 'no') and talkState[talkUser] == 4 then talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
local config = { lifeAlmentar = 100, -- quantidade de life que almenta effectMonster = 22 -- efeito no monster } function onUse(cid, item, fromPosition, itemEx, toPosition) local mid = itemEx.uid if isMonster(mid) then setCreatureMaxHealth(mid, getCreatureMaxHealth(mid)+config.lifeAlmentar) doCreatureAddHealth(mid, getCreatureMaxHealth(mid)) sendMagicEffect(mid) doPlayerSendTextMessage(cid, 19, "Você deixou o "..getCreatureName(mid).." com mais vitalidade.") doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid, "Você só pode usar esse objeto em um monstro!") end return true end function sendMagicEffect(mid) if isMonster(mid) then doSendMagicEffect(getCreaturePosition(mid), config.effectMonster) addEvent(sendMagicEffect, 1500, mid) end end
-
Tenho esse script aqui que já tava pronto em um otserv: function onSay(cid, words, param, channel) local _ip = nil if(param ~= '') then _ip = tonumber(param) if(not _ip or _ip == 0) then local revertIp = doRevertIp(param) if(not revertIp) then local tid = getPlayerByNameWildcard(param) if(not tid) then _ip = nil else _ip = getPlayerIp(tid) end else _ip = doConvertIpToInteger(revertIp) end end end local list, ips = {}, {} local players = getPlayersOnline() for i, pid in ipairs(players) do local ip = getPlayerIp(pid) local tmp = table.find(ips, ip) if(tmp ~= nil and (not _ip or _ip == ip)) then if(table.countElements(list, ip) == 0) then list[players[tmp]] = ip end list[pid] = ip end table.insert(ips, ip) end if(table.maxn(list) > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently online players with same IP address(es):") for pid, ip in pairs(list) do doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " (" .. doConvertIntegerToIp(ip) .. ")") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently there aren't any players with same IP address(es).") end return TRUE end
-
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid 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 greetCallback(cid) talkState[talkUser] = 0 return true end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then return false end local vocationsNameId = { {name = "Elder Druid", id = 5}, -- nome da vocação, id {name = "Master Sorcerer", id = 6} } local startstorageid = 30031 local msg = string.lower(msg) if getPlayerLevel(cid) < 20 then selfSay("You need level 20 to change vocation.", cid) npcHandler:onCreatureDisappear(cid) end if getPlayerStorageValue(cid, startstorageid) == 3 then selfSay("You has changed your vocation!", cid) npcHandler:onCreatureDisappear(cid) end if msgcontains(msg, 'yes') and talkState[talkUser] == nil or talkState[talkUser] == 0 then selfSay("You want to change your vocation?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, 'no') and talkState[talkUser] == nil or talkState[talkUser] == 0 then talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then selfSay("Ok, you change to {"..(vocationsNameId[1].name).."} or {"..(vocationsNameId[2].name).."}?", cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'no') and talkState[talkUser] == 2 then talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) elseif msgcontains(msg, string.lower(vocationsNameId[1].name)) and talkState[talkUser] == 3 then selfSay("You want to change your vocation to {"..(vocationsNameId[1].name).."}?", cid) setPlayerStorageValue(cid, startstorageid, 1) talkState[talkUser] = 4 elseif msgcontains(msg, string.lower(vocationsNameId[2].name)) and talkState[talkUser] == 3 then selfSay("You want to change your vocation to {"..(vocationsNameId[2].name).."}?", cid) setPlayerStorageValue(cid, startstorageid, 2) talkState[talkUser] = 4 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 4 then doPlayerSetVocation(cid, vocationsNameId[getPlayerStorageValue(cid, startstorageid)].id) doSendMagicEffect(getCreaturePosition(cid), 29) setPlayerStorageValue(cid, startstorageid, 3) selfSay("Ok, you have changed this vocation to vocation {"..(vocationsNameId[getPlayerStorageValue(cid, startstorageid)].name).."}.", cid) talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) elseif msgcontains(msg, 'no') and talkState[talkUser] == 4 then talkState[talkUser] = 0 npcHandler:onCreatureDisappear(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
No globalevents ta pra executar as 15 horas: <globalevent name="zombieevent" time="15:00" event="script" value="zombie event.lua"/> Só por mais uma tag com o novo horário: <globalevent name="zombieevent" time="20:00" event="script" value="zombie event.lua"/>
-
Não é normal, ta configurado pra funcionar com qualquer vocationId, verifica se tais adicionando as "," virgulas depois do effect, pois só o ultimo effect adicionado não precisa da virgula. E verifica se o char estão com essas vocationId mesmo.
-
config = { [782] = 180, -- [looktype] = effect [783] = 181, [784] = 182, [785] = 183 } function onLogin(cid) if config[getPlayerVocation(cid)] then doEffect(cid) end return TRUE end function doEffect(cid) local delay = 1 if isCreature(cid) == TRUE and config[getPlayerVocation(cid)] then doSendMagicEffect(getCreaturePosition(cid), config[getPlayerVocation(cid)]) addEvent(doEffect, delay*1000, cid) end return TRUE end
-
function onLogin(cid) if getPlayerVocation(cid) == 782 then doEffect(cid) end return TRUE end function doEffect(cid) local efeito = 180 local delay = 1 if isCreature(cid) == TRUE and getPlayerVocation(cid) == 782 then doSendMagicEffect(getCreaturePosition(cid), 180) addEvent(doEffect, delay*1000, cid) end return TRUE end
-
Pra funcionar perfeitamente, só removendo essa tag do animatedeffect: doSendAnimatedText(getPlayerPosition(cid), "Critical!", TEXTCOLOR_LIGHTGREY) Essa função foi retirada dos servidores atuais. Tente usar novamente mais não tive sucesso com palavras, apenas conseguir fazer rodar com números. Assim: doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE, "$$$", número desejado, COLOR_LIGHTGREEN, getCreaturePosition(cid))
-
Olhá só, usa eu script aqui que eu fiz: Em data/creaturescripts/scripts, duplica um arquivo e nomeia pra "outfitEffects" sem as aspas e nele cole: function onLogin(cid) registerCreatureEvent(cid, "OutfitEffects") effectOut(cid, effect, out) end local effect = { [136] = {3}, -- [looktype] = {effects} [279] = {17, 18}, [141] = {66}, [155] = {31, 32, 15}, [288] = {6} } function onOutfit(cid, old, current) if effect[current.lookType] then for i=0, #effect[current.lookType] do effectOut(cid, effect, out) end end return true end function effectOut(cid, effect, out) if isPlayer(cid) and getCreatureOutfit(cid).lookType == out.lookType then doSendMagicEffect(cid, effect) addEvent(effectOut, 1000, cid, effect[current.lookType][i], current) end end Agora em creaturescripts.xml cole as tags: <event type="login" name="OutfitLoginEffect" event="script" value="outfitEffects.lua"/> <event type="outfit" name="OutfitEffects" event="script" value="outfitEffects.lua"/> Prontinho, vai funcionar da seguinte maneira, ali você vai poder configurar quando o player tiver com tal outfit qual o effect vai ficar saindo nele, e é possível configurar mais de um effect por player.
-
pedido Talkactions Que Teleporta Players Que Trapam Trap
pergunta respondeu ao \Mattheus ~* de jhon992 em Scripts
Era só ler abaixo do script: Vai funcionar assim, se tu ficar virado na direção do player por 1 minuto e o level dele for mais baixo que o level de proteção do server, seu char vai ser teleportado para a posição do char low level. Isso vai funcionar apenas fora de protection zones. É um ant-trap, que faz vc atravessar o player low-level no tempo estipulado. Até que lvl o player deve ter pra ser atravessado também é configurado. -
pedido Talkactions Que Teleporta Players Que Trapam Trap
pergunta respondeu ao \Mattheus ~* de jhon992 em Scripts
http://www.xtibia.com/forum/topic/186630-system-anti-trap-low-level/ -
Vai no seu config.lua e procure as linhas: formulaLevel = 5.0 formulaMagic = 1.0 Basta aumentar os números que consequentemente vai aumentar os danos das spells.
-
npcHandler:say("Oro aos deuses, para que com estes equipamentos você possa sempre sair vitorioso de suas batalhas!", cid, 5000, 1) -- fala após um determinado delay de 5000 milesegundos npcHandler:onCreatureDisappear(cid) -- encerra conversa com o player
-
Sisteminha bom esse, o kra que fez éh foda. asjida Aqui ta explicando certinho como põe: http://www.xtibia.com/forum/topic/177761-um-pet-system-diferente/page__fromsearch__1
-
O player tem que ta online pra funfar oque eu fiz.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.