Solutions
-
Emersonssss's post in (Resolvido)[pedido] Action Use No pilar, nasce o boss was marked as the answerfunction onUse(cid, item, fromPosition, itemEx, toPosition) tempo = 2 * 60 * 60 BosPos = {x=190, y=116, z=10} -- onde o bos vai nasce if getGlobalStorageValue(99293) < os.time() then if(item.itemid == 9790) then doSummonCreature("NOMEDACRIATURA", BosPos) setGlobalStorageValue(99293, (os.time() + tempo)) end else local left = getGlobalStorageValue(99293) - os.time() left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)} doPlayerSendCancel(cid, 'Voce pode invocar esse BOS depois de '.. left.hour ..'h e '..left.minutes..'min.') end return true end <action itemid="9790" event="script" value="SumonBos.lua"/>
-
Emersonssss's post in (Resolvido)[Ajuda] Script Evento Double Xp was marked as the answerExplicando Em DoubleXP = {"Wednesday", "Sunday"} Coloque os dias que serão Double XP, será de 00:00 a 24:59 do dia escolhido, os dias tem que ser em ingles, quando o player logar e for o dia escolhido será modificado o rateXP dele para Double.
Segue :
function onLogin(cid) -- Monday = Segunda -- Tuesday = Terça -- Wednesday = Quarta -- Thursday = Quinta -- Friday = Sexta -- Saturday = Sabado -- Sunday = Domingo DoubleXP = {"Wednesday", "Sunday"} if isInArray(DoubleXP, os.date("%A")) then doPlayerSetRate(cid, SKILL__LEVEL, 2.0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--[Double XP]--\nHoje Estamos em evento Double XP!!") end return true end Em CreatureScripts.xml
<event type="login" name="DoubleXP" event="script" value="DoubleXP.lua"/> Login.lua
registerCreatureEvent(cid, "DoubleXP") Creditos?
Emerson Henrique
-
Emersonssss's post in (Resolvido)Player não para de morrer was marked as the answerlocal config = { [1] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, -- [ID Vocation] = {hp = Qt./LvL, mp = {Qt./LvL, MinHP = Qt. Minima de HP, MinMP = Qt. Minima de MP} [2] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, [3] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, [4] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, [5] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, [6] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, [7] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, [8] = {hp = 280, mp = 250, MinHP = 100, MinMP = 100}, } function onLogin(cid) if getCreatureMaxHealth(cid) < hp*voc.MinHP then setCreatureMaxMana(cid, hp*voc.MinHP) end if getCreatureMaxMana(cid) < hp*voc.MinMP then setCreatureMaxMana(cid, hp*voc.MinMP) end hp = getPlayerLevel(cid) local voc = config[getPlayerVocation(cid)] if (getPlayerLevel(cid) >= 1) then -- if (getPlayerLevel(cid) >= LvL Min Para Ativar) then setCreatureMaxHealth(cid, hp*voc.hp) setCreatureMaxMana(cid, hp*voc.mp) end return true end