-
Total de itens
3406 -
Registro em
-
Última visita
-
Dias Ganhos
111
Posts postados por Vodkart
-
-
local storage,days = (getPlayerAccountId(cid)+550),1
onde ta 1 troca por 2
-
function onLogin(cid) if isVip(cid) and isInArray({9,10,11,12},getPlayerVocation(cid)) then doPlayerSetVocation(cid,getPlayerVocation(cid) + 4) elseif not isVip(cid) and isInArray({13,14,15,16},getPlayerVocation(cid)) then doPlayerSetVocation(cid,getPlayerVocation(cid) - 4) end return true end
-
ONDE TA 13540 TROCA POR 13705
-
editdo errado
----------------------- agr ta certo --------------
function onLogin(cid) local storage,days = (getPlayerAccountId(cid)+550),1 if getGlobalStorageValue(storage) <= 0 then setGlobalStorageValue(storage, 13705) local time = getPlayerStorageValue(cid, 13540) - os.time() <= 0 and (os.time() + days * 24 * 60 * 60) or (getPlayerStorageValue(cid, 13540) + days * 24 * 60 * 60) setPlayerStorageValue(cid, 13540, time) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu um "..days.." dias de vip, bom jogo!") end return true end
-
então pq vc não atualiza o sistema para o 3.0 que eu atualizo os script pro 3.0 tbm?
NÃO SEI SE VC SABE, MAS ESSE SISTEMA DO PERFECT VIP SYSTEM É POR CHARACTER, N POR ACCOUNT.
ENTÃO O CERTO DESSE SEU SCRIPT DE DAR 1 DIA É FAZER 1 DIA POR CHARACTER E NÃO 1 DIA POR ACCOUNT... OQ ACHA?
-
executa na sua db
ALTER TABLE `guilds` ADD `checkdata` INT(11) NOT NULL DEFAULT 0;
-
vc adora segurar um danado né
vc só fala viadagem
-
esse sistema vip é o 3.0, ele é por data base(query)... já instalou ele?? ou vc usa o perfect vip system 2.0 que era por storage? a 13540
-
simples, essa função não existe no seu server.
qual seu sistema vip
-
eu to falando sério
puxa saco viado
-
meu hobby e procurar algum hobby
DPS DISSO É BOM PROCURAR A CRIATIVIDADE, PQ TA EM FALTA
-
dormir
-
<?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Arena" version="1.0" author="DrakyLucas" contact="XTibia" enabled="yes"> <config name="arena_config"><![CDATA[ config = { delay = 30, -- tempo de um level para o outro posicaoPlayer = {x = 387,y = 25,z = 7}, -- posição q o player vai cair dps de entra no TP posicaoArena = {{x = 380,y = 19,z = 7},{x = 394,y = 32,z = 7}}, premio = { {10127,1}, {5785,1}, }, -- ID, Quantidade... só aceita de 1 a 100 por vez, e você pode adicionar quantos itens quiser. storage = 15444, -- não mecha.. posicaoTp = {x = 243, y = 46, z = 7}, -- posicao que o teleporte vai aparecer acesso = 3, -- acesso minimo para ser ignorado pelo evento, e o mesmo acesso para poder inicializa-lo } -- você pode adicionar quantos leveis desejar -- [NumeroDoLevel] = {{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade},{"Nome",Quantidade}}, leveis = { [1] = {{"Morgaroth",2}}, [2] = {{"ghazbaran",2},{"ferumbras",2}}, [3] = {{"Infernatil",2}}, [4] = {{"infernatil",1},{"ferumbras",2}}, [5] = {{"ghazbaran",2},{"morgaroth",2},{"Ferumbras",2}}, } function abrirTeleport(n) doItemSetAttribute(doCreateItem(1387, config.posicaoTp), "aid", 2941) -- cria o tp e deixa aid 2941 doBroadcastMessage("O Evento arena vai começar! teleport foi aberto e faltam ".. n .. " pessoas para o evento iniciar!") doSetStorage(config.storage, n) end function fecharTPeAguardarEvento() doRemoveItem(getTileItemById(config.posicaoTp, 1387).uid,100) doBroadcastMessage("O evento ja concluiu " .. #getPlayersInArena() .. " players e começará em " .. config.delay .. " segundos!") addEvent(evento,config.delay*1000,1) end function getPlayerHealth(cid) doPlayerSave(cid) local PlayerInfo = db.getResult("SELECT `health` FROM `players` WHERE `id` = " .. getPlayerGUID(cid)) return PlayerInfo:getDataInt("health") end function HaveCreatureArena(area, remove, clean) -- função do Vodkart for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end if clean ~= false then doCleanTile(pos, false) end end end end function resetEvento() doSetStorage(config.storage, -1) end function criarMonstros(lv) local monstro = leveis[lv] local area = {config.posicaoArena[1],config.posicaoArena[2]} for i = 1,#monstro do for k=1,monstro[i][2]do pos = {x=math.random(area[1].x,area[2].x), y=math.random(area[1].y,area[2].y), z=area[1].z} monstrinho = doCreateMonster(monstro[i][1], pos) registerCreatureEvent(monstrinho, "removerCorpse") end end end function evento(i) if #getPlayersInArena() == 0 then doBroadcastMessage("Ninguém sobreviveu a arena =/") doBroadcastMessage("O evento acabou!") HaveCreatureArena({config.posicaoArena[1],config.posicaoArena[2]}, true, true) -- remove monstros, itens da arena resetEvento() return true end if i == (#leveis +1) then HaveCreatureArena({config.posicaoArena[1],config.posicaoArena[2]}, true, true) doBroadcastMessage("Evento finalizado, " .. #getPlayersInArena() .. " sobreviveram ao evento!") for _, pid in ipairs(getPlayersInArena()) do doPlayerSendTextMessage(pid,22,"Parabéns, você sobreviveu ao evento!") addItens(pid) doTeleportThing(pid,getTownTemplePosition(getPlayerTown(pid))) end resetEvento() return true end for _, pid in ipairs(getPlayersInArena()) do doPlayerSendTextMessage(pid,22,"Nivel " .. i .. " !!!") end criarMonstros(i) addEvent(evento,config.delay*1000,i+1) end function addItens(pid) for i=1,#config.premio do doPlayerAddItem(pid,config.premio[i][1],config.premio[i][2]) end doPlayerSendTextMessage(pid,22,"Parabéns, você recebeu seus premios!") end function getPlayersInArena() local t = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccess(pid) < config.acesso then if isInRange(getCreaturePosition(pid), config.posicaoArena[1], config.posicaoArena[2]) then table.insert(t, pid) end end end return t end ]]></config> <talkaction words="/arena" event="buffer"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) < config.acesso then return doPlayerSendCancel(cid,"Você nao tem acesso para esse comando") end if tonumber(param) ~= nil then -- se o parametro é numerico if tonumber(param) > 0 then doSetStorage(config.storage, param) abrirTeleport(param) end else doPlayerSendTextMessage(cid,19,"Digite /arena e um numero.. \n exemplo: \n/arena 5") end ]]></talkaction> <movevent type="StepIn" actionid="2941" event="script"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) > config.acesso then doTeleportThing(cid, config.posicaoPlayer) return false end -- GM nao conta doSetStorage(config.storage,getStorage(config.storage) - 1) doTeleportThing(cid, config.posicaoPlayer) registerCreatureEvent(cid, "naoAtacarPlayer") registerCreatureEvent(cid, "morrerNaArena") if getStorage(config.storage) <= 0 then fecharTPeAguardarEvento() end return true ]]></movevent> <event type="login" name="VerSeTaNaArenaEExpulsa" event="script"><![CDATA[ domodlib('arena_config') if isInRange(getCreaturePosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true ]]></event> <event type="combat" name="naoAtacarPlayer" event="script"><![CDATA[ domodlib('arena_config') if isPlayer(cid) and isPlayer(target) then if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) and isInRange(getPlayerPosition(target), config.posicaoArena[1], config.posicaoArena[2]) then doPlayerSendCancel(cid, "Nao ataque seus amigos.") return false end end return true ]]></event> <event type="death" name="removerCorpse" event="script"><![CDATA[ domodlib('arena_config') doCreatureSay(cid,"Ninguém terá meu loot! Buaahahahha",1) pos = getCreaturePosition(cid) addEvent(doCleanTile,1,pos, false) return true ]]></event> <event type="statschange" name="morrerNaArena" event="script"><![CDATA[ domodlib('arena_config') if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then if type == STATSCHANGE_HEALTHLOSS then if isPlayer(cid) then if value >= getPlayerHealth(cid) then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(pid,22,"Você morreu na arena =/.. veja pelo lado positivo, você nao perdeu nada!") doCreatureAddHealth(cid,getCreatureMaxHealth(cid) - getPlayerHealth(cid)) return false end end end end return true ]]></event> </mod>
-
a função vc tem que colocar em
DATA > LIB > functions.lua
-
é pq n tem aquela função no seu ot, me mostra como ficou o seu script
-
vc colocou traduzir pagina?? ai fico td bugado kkk...
bem, no script lá tem essa parte:
<event type="statschange" name="morrerNaArena" event="script"><![CDATA[ domodlib('arena_config') if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then if type == STATSCHANGE_HEALTHLOSS then if isPlayer(cid) then if value >= getCreatureHealth(cid) then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(pid,22,"Você morreu na arena =/.. veja pelo lado positivo, você nao perdeu nada!") doCreatureAddHealth(cid,getCreatureMaxHealth(cid) - getCreatureHealth(cid)) return false end end end end return true ]]></event>
troca por<event type="statschange" name="morrerNaArena" event="script"><![CDATA[ domodlib('arena_config') function getPlayerHealth(cid) -- by vodka doPlayerSave(cid) local PlayerInfo = db.getResult("SELECT `health` FROM `players` WHERE `id` = " .. getPlayerGUID(cid)) return PlayerInfo:getDataInt("health") end if isInRange(getPlayerPosition(cid), config.posicaoArena[1], config.posicaoArena[2]) then if type == STATSCHANGE_HEALTHLOSS then if isPlayer(cid) then if value >= getPlayerHealth(cid) then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(pid,22,"Você morreu na arena =/.. veja pelo lado positivo, você nao perdeu nada!") doCreatureAddHealth(cid,getCreatureMaxHealth(cid) - getPlayerHealth(cid)) return false end end end end return true ]]></event>
já pode adicionar na sua lib essa função:function getPlayerHealth(cid) -- by vodka doPlayerSave(cid) local PlayerInfo = db.getResult("SELECT `health` FROM `players` WHERE `id` = " .. getPlayerGUID(cid)) return PlayerInfo:getDataInt("health") end
-
MANDA SCRIPT DO PRIMEIRO
-
-
troque está:
local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as INTEGER) DESC;")
paralocal query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as SIGNED) DESC;")
-
vou resolver, testa uma função pra mim dps??
-
adiciona no script da sua spell
exemplo:
if isInRange(getCreaturePosition(cid), {x = 341, y = 465, z = 7}, {x = 424, y = 520, z = 7}) then doPlayerSendCancel(cid,"You can not use this spell here.") return false end
ficando tp assimfunction onCastSpell(cid, var) if isInRange(getCreaturePosition(cid), {x = 341, y = 465, z = 7}, {x = 424, y = 520, z = 7}) then doPlayerSendCancel(cid,"You can not use this spell here.") return false end return doCombat(cid, combat, var) end
as pos ali eh começo e final da area
-
function onUse(cid, item, fromPosition, itemEx, toPosition) local B = { {21832,{x=229, y=1061, z=7, stackpos = 1}}, {21926,{x=228, y=1061, z=7, stackpos = 1}}, {21781,{x=229, y=1060, z=7, stackpos = 1}}, {21781,{x=228, y=1060, z=7, stackpos = 1}} } for i = 1, #B do if getTileItemById(B[i][2], B[i][1]).uid > 0 then doRemoveItem(getThingfromPos(B[i][2]).uid,1) end end doTransformItem(item.uid, 10030) return true end
-
tem que colocar para checar se ele está mesmo trapado e não pode se mexer, porque só com skull ele vai poder bugar muita coisa, quest's ou houses
depois eu faço isso .
Mais ele so consegui usar o item se tiver do lado do player.
se tiver longe não funfa .
longe quer dizer o que? uma tela ? ele pode passar nas portas, paredes, etc... coloca outra função para checar se o player está na frente dele(até um limite de 2 sqm por exemplo)
if getDistanceBetween(pos, pos2) > 2 then doPlayerSendCancel(cid, "Você pode usar este item até 2 sqm longe do jogador.") return true end
-
beleza, me passa o ID dela e o arquivo.lua dela que fica na pasta spells
por exemplo:
o id da SD é 2268
e o arquivo.lua dela é o sudden death.lua
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
[ERRO] Sistema Guilds (checkdata)
em Scripts
Postado