Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 05/29/12 em todas áreas
-
Automatic Raids.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="xtibia.com" enabled="yes"> <config name="raids_func"><![CDATA[ days = { ["Monday"] = { ["21:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 15}, ["21:33"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"100 Dragon"}, Time = 20} }, ["Sunday"] = { ["10:08"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15}, ["10:46"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20} } } ]]></config> <globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[ domodlib('raids_func') function onThink(interval, lastExecution) if days[os.date("%A")] then hours = tostring(os.date("%X")):sub(1, 5) tb = days[os.date("%A")][hours] if tb then function removeCreature(tb) for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid if m ~= 0 and isMonster(m) then doRemoveCreature(m) end end end end doBroadcastMessage("The invasion of " .. tb.nome .. " started") for _,x in pairs(tb.m) do for s = 1, tonumber(x:match("%d+")) do pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z = tb.pos.fromPosition.z} doSummonCreature(x:match("%s(.+)"), pos) end end addEvent(removeCreature, tb.Time*60*1000, tb) end end return true end ]]></globalevent> </mod> Configuração: days = { ["Monday"] = { ["21:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 1}, ["21:33"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"100 Dragon"}, Time = 2} }, ["Tuesday"] = { ["10:44"] = {nome = "Demon", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}}, m = {"5 Demon", "8 Fire Devil"}, Time = 1}, ["10:46"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 2} } } ["DIA"] = { ["HORA DA INVASÃO"] = {nome = "NOME DA INVASÃO", pos = {começo e final da área}, monster = {"MONSTROS"}, Time = para remover os monstro} } O dia da invasão é colocada entre " " e somente dia em inglês e a primeira letra maiúscula, exemplo: "Saturday" Depois são as hora da invasão, que é colocada entre " " e somente a hora e minuto, segundos não precisa exemplo: "15:00" As Posições estão entre { } adicionando as posições x, y e z, é o começo e final da área exemplo: pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}} fromPosition -- começo da área onde vai acontecer a raid toPosition -- final da área onde vai acontecer a raid Os monters tem um modo especial de configurar, vc coloca entre { }, e cada monstro entre " ", e entre as " " vc adiciona "QUANTIDADE MONSTRO", e para adicionar mais tipos de monstro se separa por virgulas, exemplo: {"40 Water Elemental", "5 Cyclops"} Time é uma função extra, é para caso ninguém participe do evento os monstros não fiquem pelo mapa, e é em minutos, exemplo: Time = 154 pontos
-
Como eu não tinha nada pra fazer, fiz essa inútil função abaixo: function putkks(value) local e = 0 for _ in tostring(value):gmatch("000") do e = e + 1 end local n = value / 1000^e for i = 1, e do n = n .."k" end return n end Creio que não tem nenhuma utilidade, ela simplesmente faz isso: 1000000 -> 1kk Ela abrevia um grande número na gíria de jogos de RPG.3 pontos
-
Tibia Pan 8.60 - Exclusivo Xtibia
Vilden e um outro reagiu a rod_doidim por um tópico no fórum
XTibia Exclusivo Um servidor de Tibia 8.60 de alta estabilidade. "Tibia Pan" Servidor custom, baseado em servidores com cenário do Tibia Global. NPC'S próprios para o servidor. Servidor com grande possibilidade para vários estilos, "high exp" ou "low exp" Quests e mapa interagem com o jogador. Conheça Informações Técnicas: Versão 8.60 Servidor capacitado para ser usado em MySQL Distro próprio baseado em TFS (open source) Gostou? Vamos aos Downloads! (Baixe sobre sua responsabilidade, sou um usuário com posts antigos 8.4x fixados e credibilitados, principalmente na sessão de website do Xtibia) PASTA DATA SEM .EXE DOWNLOAD DISTRO (.EXE) OBS: Una a pasta ao distro para executa-lo! Use MySQL para colocar seu servidor Online. Outros: SOURCES (SEM BUGS, SÓ COMPILAR USANDO DEVC+)2 pontos -
Exclusivo Baiak 8.60 + De 300 Tps
diegolopes13 e um outro reagiu a JumentoCuzaum por um tópico no fórum
Quem Quiser o Map Manda PM e Me da 1 +REP que eu envio o download2 pontos -
Esse servidor é o melhor global 8.60 da atualidade, ele é vendido pelo site da otprojects, eu o comprei porém a primeira pessoa que divulgou foi o Guizinhoo então irei da os créditos a ele. O servidor é bem completo, com muitas funções boas e com o mapa mais completo, vocês podem aproveitar várias coisas do servidor.. Quem tem problemas com site, aconselho usar este.. Junto com database e outros.. eu não o baxei, e nen testei.. eu tenho ele aqui em casa pois eu também o comprei, se for ele mesmo, vocês estão conseguindo o melhor global disponível no momento. de graça. Global Pack FULL Servidor: * War System * Addon Bonus * Task completas (quest log) * Paralyze exaust * Raids completas e com horário * 5 eventos automáticos e com horário (Coliseum, Zombie, Loterry, Dota e War of Emperium) * Mapa COMPLETO * Todas as quests * Uptime +400h * Arena Hunting (VIP) * Recompensa lvl 45 * 11 Cidades + 12 Ilhas (VIP) * 120+mb * Sha1 ~> password é salvo em códigos * Database completa Site: * Proteções * Informaçoes sobre, task, raids, 5 eventos, addon bonus, War System * Melhor gesior da atualidade Downlaods: Download Servidor http://www.4shared.c...OTProjects.html Download WebSite http://www.4shared.c...or_extreme.html Download tfs+dll 4.0 ~> http://speedy.sh/dKCC9/DLLS-DISTRO.rar Download Dll [opção 2] http://www.4shared.c...s_e_Distro.html ____________________________________________________ Downlaod somente Mapa http://www.xtibia.co...me-world-118mb/ Download somente Db http://speedy.sh/9WDFh/database.sql ____________________________________________________ Scans: * Não sei se ja colocaram o servidor aqui no xtibia, qualquer coisa contate-me __________________________________ Eu estou usando o site no meu yurots, caso queiram da uma olhada é esse: pvp24h.servegame.com <- click1 ponto
-
Vip System by Account 1.0 By Kydrai Este é um vip system por account, ou seja, um sistema de vip válido para todos os characters de uma determinada conta. O script foi testado no TFS 0.3.6 - 8.54. E no site Gesior 0.3.4 beta4. Em caso de erros ou dúvidas é só postar. Funções do Script Função necessária para começar a usar o script: installVip() -> Cria a coluna no banco de dados para usar o sistema de vip (testei somente em sqlite, mas acredito que funcione em mysql) Funções que utilizam o account id: doTeleportPlayersByAccount(acc, topos) -> Teleporta todos os players da account getVipTimeByAccount(acc) -> Pega o tempo de vip setVipTimeByAccount(acc, time) -> Edita o tempo de vip getVipDaysByAccount(acc) -> Pega o tempo de vip em dias isVipAccount(acc) -> Verifica se é vip addVipDaysByAccount(acc, days) -> Adiciona dias de vip doRemoveVipDaysByAccount(acc, days) -> Remove dias de vip getVipDateByAccount(acc) -> Pega a data e hora que irá terminar a vip Funções que utilizam o creature id (cid): doTeleportPlayers(cid, topos) -> Teleporta todos os players da account getVipTime(cid) -> Pega o tempo de vip setVipTime(cid, time) -> Edita o tempo de vip getVipDays(cid) -> Pega o tempo de vip em dias isVip(cid) -> Verifica se é vip addVipDays(cid, days) -> Adiciona dias de vip doRemoveVipDays(cid, days) -> Remove dias de vip getVipDate(cid) -> Pega a data e hora que irá terminar a vip Inserindo as funções Abra a pasta data/lib, crie um arquivo lua e coloque: vipAccount.lua --[[ Name: Vip System by Account Version: 1.0 Author: Kydrai Forum: http://www.xtibia.com/forum/topic/136543-vip-system-by-account-v10/ [Functions] -- Install installVip() -- By Account doTeleportPlayersByAccount(acc, topos) getVipTimeByAccount(acc) setVipTimeByAccount(acc, time) getVipDaysByAccount(acc) isVipAccount(acc) addVipDaysByAccount(acc, days) doRemoveVipDaysByAccount(acc, days) getVipDateByAccount(acc) -- By Player doTeleportPlayers(cid, topos) getVipTime(cid) setVipTime(cid, time) getVipDays(cid) isVip(cid) addVipDays(cid, days) doRemoveVipDays(cid, days) getVipDate(cid) ]]-- -- Install function installVip() if db.executeQuery("ALTER TABLE `accounts` ADD viptime INT(15) NOT NULL DEFAULT 0;") then print("[Vip System] Vip System instalado com sucesso!") return TRUE end print("[Vip System] Não foi possível instalar o Vip System!") return FALSE end -- By Account function doTeleportPlayersByAccount(acc, topos) if db.executeQuery("UPDATE `players` SET `posx` = "..topos.x..", `posy` = "..topos.y..", `posz` = "..topos.z.." WHERE `account_id` = "..acc..";") then return TRUE end return FALSE end function getVipTimeByAccount(acc) local vip = db.getResult("SELECT `viptime` FROM `accounts` WHERE `id` = "..acc..";") if vip:getID() == -1 then print("[Vip System] Account not found!") return FALSE end return vip:getDataInt("viptime") end function setVipTimeByAccount(acc, time) if db.executeQuery("UPDATE `accounts` SET `viptime` = "..time.." WHERE `id` = "..acc..";") then return TRUE end return FALSE end function getVipDaysByAccount(acc) local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local days = math.ceil((vipTime - timeNow)/(24 * 60 * 60)) return days <= 0 and 0 or days end function isVipAccount(acc) return getVipDaysByAccount(acc) > 0 and TRUE or FALSE end function addVipDaysByAccount(acc, days) if days > 0 then local daysValue = days * 24 * 60 * 60 local vipTime = getVipTimeByAccount(acc) local timeNow = os.time() local time = getVipDaysByAccount(acc) == 0 and (timeNow + daysValue) or (vipTime + daysValue) setVipTimeByAccount(acc, time) return TRUE end return FALSE end function doRemoveVipDaysByAccount(acc, days) if days > 0 then local daysValue = days * 24 * 60 * 60 local vipTime = getVipTimeByAccount(acc) local time = vipTime - daysValue setVipTimeByAccount(acc, (time <= 0 and 1 or time)) return TRUE end return FALSE end function getVipDateByAccount(acc) if isVipAccount(acc) then local vipTime = getVipTimeByAccount(acc) return os.date("%d/%m/%y %X", vipTime) end return FALSE end -- By Player function doTeleportPlayers(cid, topos) doTeleportPlayersByAccount(getPlayerAccountId(cid), topos) end function getVipTime(cid) return getVipTimeByAccount(getPlayerAccountId(cid)) end function setVipTime(cid, time) return setVipTimeByAccount(getPlayerAccountId(cid), time) end function getVipDays(cid) return getVipDaysByAccount(getPlayerAccountId(cid)) end function isVip(cid) return isVipAccount(getPlayerAccountId(cid)) end function addVipDays(cid, days) return addVipDaysByAccount(getPlayerAccountId(cid), days) end function doRemoveVipDays(cid, days) return doRemoveVipDaysByAccount(getPlayerAccountId(cid), days) end function getVipDate(cid) return getVipDateByAccount(getPlayerAccountId(cid)) end Exemplos de uso Talkaction GOD: /installvip /addvip name, days /removevip name, days /checkvip name Player: /buyvip /vipdays talkactions.xml: <talkaction log="yes" access="5" words="/installvip;/addvip;/removevip;/checkvip" event="script" value="vipaccgod.lua"/> <talkaction words="/buyvip;/vipdays" event="script" value="vipaccplayer.lua"/> vipaccgod.lua: function onSay(cid, words, param, channel) local t = param:explode(",") local name, days = t[1], tonumber(t[2]) if words == "/installvip" then if installVip() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Vip System instalado com sucesso!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não foi possível instalar o Vip System!") end elseif words == "/addvip" then if name then if days then local acc = getAccountIdByName(name) if acc ~= 0 then addVipDaysByAccount(acc, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você adicionou "..days.." dia(s) de vip ao "..name..", agora ele possui "..getVipDaysByAccount(acc).." dia(s) de vip.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar essa quantidade de dia(s) de vip.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar dia(s) de vip a este player.") end elseif words == "/removevip" then if name then if days then local acc = getAccountIdByName(name) if acc ~= 0 then doRemoveVipDaysByAccount(acc, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você retirou "..days.." dia(s) de vip do "..name..", agora ele possui "..getVipDaysByAccount(acc).." dia(s) de vip.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode retirar essa quantidade de dia(s) de vip.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode retirar dia(s) de vip a este player.") end elseif words == "/checkvip" then if name then local acc = getAccountIdByName(name) if acc ~= 0 then local duration = getVipDateByAccount(acc) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O "..name.." possui "..getVipDaysByAccount(acc).." dias de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode visualizar os dias de vip a este player.") end end return TRUE end vipaccplayer.lua: function onSay(cid, words, param, channel) if words == "/buyvip" then local price = 1000000 local days = 30 if doPlayerRemoveMoney(cid, price) then addVipDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você adicionou "..days.." dia(s) de vip, agora você possui "..getVipDays(cid).." dia(s) de vip.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa de "..price.." para adicionar "..days.." dia(s) de vip.") end elseif words == "/vipdays" then local duration = getVipDate(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) end return TRUE end Movement (Tile) Coloque actionid 15000 em um tile onde somente os vips poderão passar. movements.xml: <movevent type="StepIn" actionid="15000" event="script" value="viptile.lua"/> viptile.lua: function onStepIn(cid, item, position, fromPosition) if isVip(cid) == FALSE then doTeleportThing(cid, fromPosition, false) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Somente players vip podem passar.") end return TRUE end Creaturescript (Login) Quando player logar irá verificar se a vip do player acabou, se sim então irá teleportar todos os players da account para o templo, se não irá mostrar o tempo da vip. creaturescripts.xml: <event type="login" name="viplogin" script="viplogin.lua"/> viplogin.lua: function onLogin(cid) local vip = isVip(cid) if getVipTime(cid) > 0 and vip == FALSE then local townid = 1 doPlayerSetTown(cid, townid) local templePos = getTownTemplePosition(getPlayerTown(cid)) doTeleportThing(cid, templePos, false) setVipTime(cid, 0) doTeleportPlayers(cid, templePos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua Vip acabou!") elseif vip == TRUE then local duration = getVipDate(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela irá durar até "..duration..".") or "")) end return TRUE end Action (Door) Coloque actionid 15001 na door onde somente os vips poderão passar. Use a porta gate of expertise (id: 1227) actions.xml: <action actionid="15001" script="vipdoor.lua"/> vipdoor.lua: function onUse(cid, item, fromPosition, itemEx, toPosition) if isVip(cid) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente players vip podem passar.") elseif item.itemid == 1227 then doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, toPosition) end return TRUE end NPC (Vendedor de VIP) vipnpc.xml: <?xml version="1.0" encoding="UTF-8"?> <npc name="Vendedor de VIP" script="vipnpc.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|, I sell {vip} days."/> </parameters> </npc> vipnpc.lua: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 buyVip(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if doPlayerRemoveMoney(cid, parameters.price) then addVipDays(cid, parameters.days) npcHandler:say('Thanks, you buy '..parameters.days..' vip days. You have '..getVipDays(cid)..' vip days.', cid) else npcHandler:say('Sorry, you don\'t have enough money.', cid) end npcHandler:resetNpc() return true end local node1 = keywordHandler:addKeyword({'vip'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want buy 30 vip days for 1000000 gp\'s?'}) node1:addChildKeyword({'yes'}, buyVip, {price = 1000000, days = 30}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) npcHandler:addModule(FocusModule:new()) Erros e Soluções Configurando o Gesior Com essa configuração irá aparecer o vip status do player no site e será possível vender vip pelo site. Se eu esqueci de alguma coisa é só avisar. accountmanagement.php Depois de: if(!$account_logged->isPremium()) $account_status = '<b><font color="red">Free Account</font></b>'; else $account_status = '<b><font color="green">Premium Account, '.$account_logged->getPremDays().' days left</font></b>'; Adicione: if(!$account_logged->isVip()) $account_vip_status = '<b><font color="red">Not Vip Account</font></b>'; else $account_vip_status = '<b><font color="green">Vip Account, '.$account_logged->getVipDays().' days left</font></b>'; Depois de: <td class="LabelV" >Account Status:</td><td>'.$account_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';" > Adicione: <td class="LabelV" >Account Vip Status:</td><td>'.$account_vip_status.'</td></tr><tr style="background-color:'.$config['site']['darkborder'].';" > pot/OTS_Account.php Substitua: private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','page_access' => 0,'lastday' => 0,'premdays' => 0, 'created' => 0); Por: private $data = array('email' => '', 'blocked' => false, 'rlname' => '','location' => '','page_access' => 0,'lastday' => 0,'premdays' => 0, 'created' => 0, 'viptime' => 0); Substitua: $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('page_access') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch(); Por: $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('name') . ', ' . $this->db->fieldName('password') . ', ' . $this->db->fieldName('email') . ', ' . $this->db->fieldName('blocked') . ', ' . $this->db->fieldName('rlname') . ', ' . $this->db->fieldName('location') . ', ' . $this->db->fieldName('page_access') . ', ' . $this->db->fieldName('premdays') . ', ' . $this->db->fieldName('viptime') . ', ' . $this->db->fieldName('lastday') . ', ' . $this->db->fieldName('created') . ' FROM ' . $this->db->tableName('accounts') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch(); Substitua: $this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('page_access') . ' = ' . (int) $this->data['page_access'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); Por: $this->db->query('UPDATE ' . $this->db->tableName('accounts') . ' SET ' . $this->db->fieldName('password') . ' = ' . $this->db->quote($this->data['password']) . ', ' . $this->db->fieldName('email') . ' = ' . $this->db->quote($this->data['email']) . ', ' . $this->db->fieldName('blocked') . ' = ' . (int) $this->data['blocked'] . ', ' . $this->db->fieldName('rlname') . ' = ' . $this->db->quote($this->data['rlname']) . ', ' . $this->db->fieldName('location') . ' = ' . $this->db->quote($this->data['location']) . ', ' . $this->db->fieldName('page_access') . ' = ' . (int) $this->data['page_access'] . ', ' . $this->db->fieldName('premdays') . ' = ' . (int) $this->data['premdays'] . ', ' . $this->db->fieldName('viptime') . ' = ' . (int) $this->data['viptime'] . ', ' . $this->db->fieldName('lastday') . ' = ' . (int) $this->data['lastday'] . ' WHERE ' . $this->db->fieldName('id') . ' = ' . $this->data['id']); Depois de: public function getPremDays() { if( !isset($this->data['premdays']) || !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return $this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])); } Adicione: public function getVipDays() { if( !isset($this->data['viptime']) || !isset($this->data['lastday']) ) { throw new E_OTS_NotLoaded(); } return ceil(($this->data['viptime'] - time()) / (24*60*60)); } Depois de: public function isPremium() { return ($this->data['premdays'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])) > 0); } Adicione: public function isVip() { return ceil(($this->data['viptime'] - time()) / (24*60*60)) > 0; } characters.php Substitua: if($config['site']['show_vip_status']) { $id = $player->getCustomField("id"); 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 WIDTH=10%>Vip Status:</TD>'; $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch(); if($vip == false) { $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>'; } else { $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>'; } $comment = $player->getComment(); $newlines = array("\r\n", "\n", "\r"); $comment_with_lines = str_replace($newlines, '<br />', $comment, $count); if($count < 50) $comment = $comment_with_lines; if(!empty($comment)) { 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 VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>'; } } Por: if($config['site']['show_vip_status']) { $id = $player->getCustomField("id"); 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 WIDTH=10%>Account Vip Status:</TD>'; if(!$account->isVip()) { $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>'; } else { $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>'; } $comment = $player->getComment(); $newlines = array("\r\n", "\n", "\r"); $comment_with_lines = str_replace($newlines, '<br />', $comment, $count); if($count < 50) $comment = $comment_with_lines; if(!empty($comment)) { 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 VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>'; } } shopsystem.php (+Créditos ao GM Bekman) Substitua: if($buy_offer['type'] == 'pacc') { $player_premdays = $buy_player_account->getCustomField('premdays'); $player_lastlogin = $buy_player_account->getCustomField('lastday'); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');'; $SQL->query($save_transaction); $buy_player_account->setCustomField('premdays', $player_premdays+$buy_offer['days']); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; if($player_premdays == 0) { $buy_player_account->setCustomField('lastday', time()); } $main_content .= '<h2>PACC added!</h2><b>'.$buy_offer['days'].' days</b> of Premium Account added to account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } Por: if($buy_offer['type'] == 'pacc') { $player_viptime = $buy_player_account->getCustomField('viptime'); $player_lastlogin = $buy_player_account->getCustomField('lastday'); $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).', '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');'; $SQL->query($save_transaction); if($player_viptime > 0) $buy_player_account->setCustomField('viptime', $player_viptime + ($buy_offer['days'] * 24 * 60 * 60)); else $buy_player_account->setCustomField('viptime', time() + ($buy_offer['days'] * 24 * 60 * 60)); $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']); $user_premium_points = $user_premium_points - $buy_offer['points']; if($player_viptime == 0) { $buy_player_account->setCustomField('lastday', time()); } $main_content .= '<h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of Vip Account added to account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br /><a href="index.php?subtopic=shopsystem">GO TO MAIN SHOP SITE</a>'; } Links Úteis 01- [Gesior Acc] Vendedo Vip Pelo Pacc Créditos: GM Bekman 02- Double Exp Para Vip Créditos: Vodkart 03- Outfits Só Para Jogadores Vips Créditos: Vodkart1 ponto
-
[Tutorial] Criando Sua Propria Arma No Paint.
pedroszmatos reagiu a Stigal por um tópico no fórum
Eai Xtibianos! Venho Mostrar Como "CRIAR" Suas Proprias Sprites No PAINT! Índice O que você vai precisar O que eu vou precisar Configurando o paint Criando suas próprias armas O que você vai precisar: O que eu vou precisar: Configurando o paint: Criando suas próprias armas: Espero Que Gostem!!! Não Esquesao De Comentar ;D!1 ponto -
Quer Aprender A Ser Scripter?
00007 reagiu a Sir Picaralhos por um tópico no fórum
Dividi em fases Entaum vamos lah ensinalo a ser um scripter: NPC'S vou ensinar a base de um npc seller,passa o script de comando, Npc Seller: vá em data>Npcs> Copie qualquer um cole na pasta abra com bloco de notas, Vai estar Assim: <?xml version="1.0"?> <npc name="NOME script="Diretorio/Arquivo.lua" access="3"> <look type="look" head="head" body="body" legs="legs" feet="57"/> </npc> Explicando: Npc Name= Nome do Npc script= é onde está localizado o script do npc,ponha na pasta scripts dentro da pasta npc,e no final ponha o nome do arquivo lua,e sempre ponha .lua no final Acces = é o acesso do npc,por exemplo se um player de acces 4 chega nele e fala "hi" dá um debug no server,portanto se o acces de seu gm é 10000 o acces do npc tem que ser 10000. Look: é o Look do Npc,exemplo: se a ordem de numeros estiver 0,0,0,0 o Npc será todo branco,alguns ot's vêem as cores do outfit(acho) _________________-Script do Npc_______________________ vai na pasta scripts copie qualquer um, e renomeie de acordo com o que vc pois no .xml do npc na pasta anterior no começo tem assim: target = 0 following = false attacking = false focus = 0itemid = 0 count = 0payback = 0talkcount = 0talk_start = 0function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(id) if id == target then target = 0 attacking = false selfAttackCreature(0) following = false endfocus = 0itemid = 0 end function onCreatureTurn(creature) end function onCreatureSay(cid, type, msg)msg = string.lower(msg) dist = getDistanceToCreature(cid)if dist >= 8 thenreturnendtalk_start = os.clock() if string.find(msg, 'hi') and string.len(msg) == 2 thenif focus == cid thenselfSay('I am talking to you.')else if focus > 0 then selfSay('Wait.') endendif(focus == 0) thenselfSay('Hello ' .. creatureGetName(cid) .. '! .')focus = cidendtalk_start = os.clock()endExplicando :Nesta Parte se vc fala hi para ele,ele fala: Hello ( e seu nome)[color=blue]' .. creatureGetName(cid) .. ' Esse comando Faz o Npc falar o nome do char(cid) que falou hi[/color]Sempre Use essa parte no começo,se um char,fala hi e depois fala hi denovo o npc fala: I'm Already Talking to You,Pode Ser Alterado nesta Parte:if string.find(msg, 'hi') and string.len(msg) == 2 thenif focus == cid thenselfSay('I am talking to you.')<---else if focus > 0 then selfSay('Wait.')<--neste é quando o npc está atendendo outra pessoas endend Continuando(vamos usar como exemplo um npc que vende um axe ring if string.find(msg, 'yes(%a*)') and cid == focus and talkcount == 1 then talkcount = 0 buy(focus,itemid,count,cost) end se o char,falar yes,ele responde ao talk 1 if string.find(msg, 'yes(%a*)') and cid == focus and talkcount == 1 se voce por 2,3,4,etc.. vc tem que por a resposta de acordo if string.find(msg, '(%a*)no(%a*)') and cid == focus then selfSay('Ok, is there something else you want? If so tell me.') itemid = 0 count = 0 cost = 0 talkcount = 0 end se o char falar no, ele fla: Ok, is there something else you want? If so tell me, e nao acontece nada,e nada parte final vc poe: _____________________________________________________- if string.find(msg, 'bye(%a*)') and cid == focus then selfSay('Farewell, ' .. creatureGetName(cid) .. '!') focus = 0 itemid = 0 talk_start = 0 talkcount = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 10 then if focus > 0 then selfSay('Next please!') talkcount = 0 end focus = 0 itemid = 0 talk_start = 0 end if focus == 0 then cx, cy, cz = selfGetPosition() randmove = math.random(1,50) if randmove == 1 then nx = cx + 1 end if randmove == 2 then nx = cx - 1 end if randmove == 3 then ny = cy + 1 end if randmove == 4 then ny = cy - 1 end if randmove >= 5 then nx = cx ny = cy end moveToPosition(nx, ny, cz) --summons = 30 --summons2 = 30 end end _______________________________________________ ficando assim o script: target = 0 following = false attacking = false focus = 0itemid = 0 count = 0payback = 0talkcount = 0talk_start = 0function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(id) if id == target then target = 0 attacking = false selfAttackCreature(0) following = false endfocus = 0itemid = 0 end function onCreatureTurn(creature) end function onCreatureSay(cid, type, msg)msg = string.lower(msg) dist = getDistanceToCreature(cid)if dist >= 8 thenreturnendtalk_start = os.clock() if string.find(msg, 'hi') and string.len(msg) == 2 thenif focus == cid thenselfSay('I am talking to you.')else if focus > 0 then selfSay('Wait.') endendif(focus == 0) thenselfSay('Hello ' .. creatureGetName(cid) .. '! .')focus = cidendtalk_start = os.clock()endif string.find(msg, '(%a*)offer(%a*)') and cid == focus thenselfSay('I am selling all types of rings!')endif string.find(msg, '(%a*)rings(%a*)') and cid == focus thenselfSay('I Sell Axe Ring,Club Ring,Crystal Ring,Dwarven Ring,Esmerald Bagle,Energy Ring,Gold Ring,Life Ring.Might Ring,Power Ring,Ring of Healing,Ring of the Skies,Stealth Ring,Sword Ring,Time Ring and Weding Ring.')talk_start = os.clock()returnendif string.find(msg, '(%a*)axe ring(%a*)') and cid == focus thenselfSay('Do You want to buy an Axe Ring for 400gps?')talk_start = os.clock()itemid = 2208count = 1cost = 400talkcount = 1returnendif string.find(msg, 'yes(%a*)') and cid == focus and talkcount == 1 then talkcount = 0buy(focus,itemid,count,cost)endif string.find(msg, '(%a*)no(%a*)') and cid == focus thenselfSay('Ok, is there something else you want? If so tell me.')itemid = 0count = 0cost = 0talkcount = 0end if string.find(msg, 'bye(%a*)') and cid == focus thenselfSay('Farewell, ' .. creatureGetName(cid) .. '!')focus = 0itemid = 0talk_start = 0talkcount = 0end endfunction onCreatureChangeOutfit(creature)endfunction onThink() if (os.clock() - talk_start) > 10 then if focus > 0 then selfSay('Next please!') talkcount = 0end focus = 0 itemid = 0talk_start = 0 end if focus == 0 thencx, cy, cz = selfGetPosition()randmove = math.random(1,50)if randmove == 1 thennx = cx + 1endif randmove == 2 thennx = cx - 1endif randmove == 3 thenny = cy + 1endif randmove == 4 thenny = cy - 1endif randmove >= 5 thennx = cxny = cyendmoveToPosition(nx, ny, cz)--summons = 30--summons2 = 30endend pronto vc fez um npc seller,pelo menos a base,se vc quiser adicionar comando para vender,comando de respostas,vendas etc... LEMBRE-SE:SEMPRE PULE DUAS LINHAS(APERTE ENTER DUAS VEZES) Script de comando: _________________________________________________________________ elseif talk_state == <number> then if msgcontains(msg, 'yes') then if pay(cid,10000) then selfSay('/premmy 15 ' .. creatureGetName(cid)) selfSay('Now this character have some days of premium account.') else selfSay('Sorry, you do not have enough money.') end end talk_state = 0 _________________________________________________________________ Significados: esse comando é como funciona a premmy,onde está /premmy...vc troca pelo comando,exemplo: /m XxXxXXxXx,/promote e o outro selfsay é o que ele vai falar e aqui acaba a parte dos NPC'S Espero que entenderam qualquer duvidas msg me Ah Um exercicio para garantir,Faça um Npc Com o Nome E-plate,e ponham ele para vender uma e-plate e depois me falem os resultados, me falem error,error de concordancia,dificuldade em tal lugar etc... agora próxima fase: SPELLS Vá em Data>Spells,Copie e cole qualquer um e ponha o nome de Fire apague tudo dentro e ponha isso: Explicando: Atack Type: Physical o que eu puis neste é o melhor pois o unico monstro imune é o diptrah e o ghost needDirection: É se precisa de direção,se voce colocar true,vc vai pricisar por 1,2,3,4 nas direções exemplo: se voce por direção,voce vai ter que por assim: exemplo exori flam ____________________________________________________________ area = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } _______________________________________________________________ e se voce por false,só poe o numero 1,que vai acertar em tal area INDENPENDETE DA Posição esses quatro é onde mudamos a animação... areaEffect: é o principal tipo,esse explosion que está ai,vai sai fire,igual uma ue,mais se pode mudar,para mudar vá em outras spells,exemplo quero por de sd, Vai na runa de sd vai em areaEffect e copie o que está lá e cole na magia hitEffect = NM_ME_EXPLOSION_DAMAGE quando vc hitar,acertar algum char ou monstro é o que vai ficar,nesse caso ae vai suir um fogo,para mudar é igual o primeiro,faça a mesma coisa só que no comando diferente(claro) os Outros deixe do jeito que está pois senão pode dar debug onde está assim: _____________________________________________________________ UltimateExplosionObject.minDmg = (level * 3 + maglv * 4) * 3.4 - 40 UltimateExplosionObject.maxDmg = (level * 3 + maglv * 4) * 4.0 end _____________________________________________________________ o dano vai causar,por 3x seu lv e 3.4x seu ml, vc pode diminui para fazer uma spell mais fraca, e aumentar para fazer uma spell exagerada, Você Pode encontrar diferentes tipos de atacks,modos,efeitos,na pasta Lib do seu OTServer Spells.xml <spell name="Nome" words="palavras magicas" maglv="ml" mana="<mana>" enabled="1"><vocation id="2" /><vocation id="1" /></spell> Signs: spell name = Nome da Spell words = Palavras magicas)o que voê fala para soltar a magia) maglv = ml para soltar a spell mana = mana para soltar a magis enabled = Se a Magia é promovida ou não vocation id = é a vocação que a usa 1= sorc, 2= druid , 3= pally , 4= kina E Aqui Já Acabou a Parte das Spell Exercicio faça uma magia que saia,4 traços pros lados de qualquer tipo, e uma que saia 4 areas na sua frente para o lado que voce virar... MONSTERS Os monstros sao uns dos mais facéis Começando: Os monstros sao facéis por causa da ordem olhe no começo bem facil de editar Explicando: Monster name = Nome do Monstro(lembre-se ele tem que ser renomeado por fora tambem, Level = Nao precisa nem falar né? quanto mais level mais forte MgLevel,quando mais ml mais forte as magias canpushitems,se o monstro pode mover objetos changetarget = indica a dificuldae,facilidade para o monster trocar de alvo combat targetdistance = a distancia de quantos sqm o monster deverá ficar do player runonhealth = A life em que o monstro irá fugir defenses = imunes do monter voices = voz dos monstros(aquelas alaranjadas) tudo quanto maior, mais forte o monstro... Atacks <attack type="melee" maxdamage="60"/> isso ele irá atacar com melee(fist somente) a o maximo de dano será 60 vc pode adicionar para ele tacar bolts> <attack type="distance" name="bolts" mindamage="<minimo>" maxdamage="<maximo>"/> arrows: <attack type="distance" name="arrows" maxdamage="60"/> em maxdamage vc altera o maximo que irá causar <atack type ="distance" Significa ataque do tipo distance(arrow,bolt,power bolt,spear,stones,entre outros) Danos Com Runas: <attack type="rune" name="nome da runa" exhaustion="exaustion do monstro" cycleticks="8000" probability="chances de acertar"/> Loot: <item id="3288" chance="6666"/> item id = id do item que vai cair, chance é a chance de cair maximo 10000,que cai sempre,no forum>downloads de scripts,outros, tem um topico falando as chances Summons: <summons maxSummons="Quantos Summons"> <summon name="Nome do Monstro" chance="Chance"/> </summons> para atacar Spells: <attack type="instant" name="Spell" exhaustion="500" cycleticks="20000" probability="40"/> e aqui termina os monstros <loot> <item id="3288" chance="6666"/> item id = id do item chance = chance do item cair aqui temos a lista de chances: --100000= all time----50000= each 2 time----33333= each 3 time----20000= each 5 time----10000= each 10 time----6666= each 15 time----5000 = each 20 time----4000 = each 25 time----3333 = each 30 time----2857 = each 35 time----2500 = each 40 time----2222 = each 45 time----2000 = each 50 time----1818 = each 55 time----1666 = each 60 time----1538 = each 65 time----1428 = each 70 time----1333 = each 75 time----1000 = each 100 time----909 = each 110 time----833 = each 120 time----800 = each 125 time--666 = each 150 time----588 = each 170 time----555 = each 180 time----500 = each 200 time----400 = each 250 time----333 = each 300 time-- Quests Quests é nas Actions, e na verdade nem é tão dificil ai vai crie um arquivo .lua chamado hmm - Hmm Questfunction onUse(cid, item, frompos, item2, topos) if item.uid == 5003 then queststatus = getPlayerStorageValue(cid,5003) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You Have Found 100 hmm's to Hunt.") doPlayerAddItem(cid,2311,100) setPlayerStorageValue(cid,5003,1) else doPlayerSendTextMessage(cid,22,"It is empty.") end elseif item.uid == 5004 then queststatus = getPlayerStorageValue(cid,5003) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have Found 100 uh to Hunt.") doPlayerAddItem(cid,2265,100) setPlayerStorageValue(cid,5003,1) else doPlayerSendTextMessage(cid,22,"It is empty.") endelseif item.uid == 5017 then queststatus = getPlayerStorageValue(cid,5003) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found 100 explosion to hunt.") doPlayerAddItem(cid,2305,1) setPlayerStorageValue(cid,5003,1) endelse return 0 end return 1end _______________________________________________________________ Explicando: ______________________________________________________________ if item.uid == <id> then queststatus = getPlayerStorageValue(cid,<id>) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You Have Found 100 hmm's to Hunt.") doPlayerAddItem(cid,2311,100) setPlayerStorageValue(cid,5003,1) else _____________________________________________________________ if item.uid == <id> then onde está escrito <id> é a continuação exemplo vc vai em chest .lua(que se localiza na pasta actions) o ultimo foi 5010 o proximo deve ser 5011 e assim por diante if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You Have Found 100 hmm's to Hunt.") _________________________________________________________ if quest status == 1 traduzindo: se status de quest ==1 , traduzindo: se o player nao fez a quest -_____________________________________________________________- doPlayerSendTextMessage(cid,22,"You Have Found 100 hmm's to Hunt.") ____________________________________________________________ Recebe esta msg e recebe o item doPlayerAddItem(cid,2311,100) setPlayerStorageValue(cid,<id>,1) doPlayerAddItem(cid,2311,100 2311 é o id do item que o char recebe se voce quiser por level na quest add o seguinte antes de: _________________________________________________________ else doPlayerSendTextMessage(cid,22,"It is empty.") ________________________________________________________ add isso: Não Necessariamente level,essa é a mensagem que ele recebe se não tiver Level e depois de: if queststatus == -1 then add isso: if getPlayerLevel(cid) >= 20 then significa Se o player tiver Level <lv> ele passa na quest mais se for inferior doPlayerSendTextMessage(cid,22,"You need level 20 to get prize.") e assim voce faz uma quest, depois é só ir no mapa editor,colocar o chets no lugar que vc quer,e clica com o direito e em uid add o numero da quest Lembre-se se a ultima foi 5010 a proxima é 5011 e assim por diante Próximo: e Ultimo (q demoro pakas heim muitos poukos devem estar lendo aki neh mais tudu bem) Lv Door ai vai: --Hmm function onUse(cid, item, frompos, item2, topos)doorpos = {x=frompos.x, y=frompos.y, z=frompos.z}playerpos = getPlayerPosition(cid)playerlevel = getPlayerLevel(cid)if item.itemid == 1234 and doorpos.x == 1 and doorpos.y == 1 and doorpos.z == 1 thenif playerlevel > 100 thendoTeleportThing(cid,doorpos)elseif playerlevel < 100 thendoPlayerSendTextMessage(cid,22,"Você precisa ser level 100 para passar.")endendreturn 1end __________________________________________________-- Explicando: Coisa que vc precisa Mudar: if item.itemid == <id> and doorpos.x == <xxx> and doorpos.y == <yyy> and doorpos.z == <z> then <id> = Id da porta doorpos.x,doorpos.y,doorpos.z, São as coordenadas da Porta,isso você vê no MapEditor você poe o mouse sobre o lugar,e embaixo,do lado direito aparecem as coordenadas. Ajuste Isso de acordo com o lugar de onde voce por a level door no ot Level if playerlevel > 100 then Onde Está Escrito 100 then <100> é o level necessario para passar na door voce poe o level que quiser doPlayerSendTextMessage(cid,22,"Você precisa ser level 100 para passar.") Mensagem que o Player Recebe ao nao ter Level para passar... Exemplo: if playerlevel > 200 then doPlayerSendTextMessage(cid,22,"Se acha que passa né?Ahhh Rapa!Pricisa de Level 200,Meia Volta.") ufa acabo ateh q enfim heim quase ngm deve ter vindo ateh aki se vc veio nossa como vc aguenta? hehe espero q tenhaum gostado Créditos: Dum amigo rl q axo na net na casa do primo dele dai ele sabia q eu ia volta aki e me deu pra eu posta e kramba demorei quase 2h pra escreve tudu issu hehe, e infelizmente os créditos não sao meus dinovu, mais eu to voltando agora e logo logo farei um como o meu ultimo q felizmente ao chegar aki fikei sabendo q ele foi fixado ainda num descobri onde neh hehe mais ele fo fixado! vlw ae comentem plz! Atenciosamente, Sir Picaralhos. :laughing:1 ponto -
Olá a todos, venho aqui lhes trazer o script de Zombie Event. Não tenho certeza se estou postando na areá correta, mais caso eu não esteja por favor movam o tópico. Mãos a obra. Zombie Events. Testado em: TFS 0.4 Se quiser testar em outro distro responsabilidade de vocês. Algumas informações sobre ele primeiramente, Quando o evento está começando você terá certos minutos em você para incorporar o teleport antes que desapareça. Quando o teleport desaparece mesmo acontece com zombie spawn após 20 segundos. Zombie iram aparece 1 de cada vez, a cada 20 segundos. Os players que morrerem no evento, serão teleportados para o templo. O vencedor do evento, recebe algumas recompensas e um cale-se dourado com seu nome. Lembrando a areá de evento tem que ser non-pvp para que os possam disputar la. Vamos la. Globalevents/scripts/zombie event.lua local config = {playerCount = 2001, -- Global storage for counting the players left/entered in the eventzombieCount = 2002, -- Global storage for counting the zombies in the eventteleportActionId = 2000, -- Action id of the teleport needed for the movement scriptteleportPosition = {x = 1135, y = 1077, z = 3, stackpos = 1}, -- Where the teleport will be createdteleportToPosition = {x = 1190, y = 1076, z = 7}, -- Where the teleport will take youteleportId = 1387, -- Id of the teleporttimeToStartEvent = 5, -- Minutes, after these minutes the teleport will be removed and the event will be declared startedtimeBetweenSpawns = 20, -- Seconds between each spawn of zombiezombieName = "event zombie", -- Name of the zombie that should be summonedplayersNeededToStartEvent = 5, -- Players needed before the zombies can spawn.-- Should be the same as in the creaturescript!-- The zombies will spawn randomly inside this areafromPosition = {x = 1186, y = 1072, z = 7}, -- top left cornor of the playgroundtoPosition = {x = 1195, y = 1081, z = 7}, -- bottom right cornor of the playground}function onTimer()local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition)doItemSetAttribute(tp, "aid", config.teleportActionId)doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)setGlobalStorageValue(config.playerCount, 0)setGlobalStorageValue(config.zombieCount, 0)addEvent(startEvent, config.timeToStartEvent * 1000 * 60)print(getGlobalStorageValue(2001))endfunction startEvent()local get = getThingfromPos(config.teleportPosition)if get.itemid == config.teleportId thendoRemoveItem(get.uid, 1)endlocal fromp, top = config.fromPosition, config.toPositionif getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent thenaddEvent(spawnZombie, config.timeBetweenSpawns * 1000)doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING)for x = fromp.x, top.x dofor y = fromp.y, top.y dofor z = fromp.z, top.z doareapos = {x = x, y = y, z = z, stackpos = 253}getPlayers = getThingfromPos(areapos)if isPlayer(getPlayers.uid) thendoPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!")endendendendelsedoBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING)for x = fromp.x, top.x dofor y = fromp.y, top.y dofor z = fromp.z, top.z doareapos = {x = x, y = y, z = z, stackpos = 253}getPlayers = getThingfromPos(areapos)if isPlayer(getPlayers.uid) thendoTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false)doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT)endendendendendendfunction spawnZombie()if getGlobalStorageValue(config.playerCount) >= 2 thenpos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)}doSummonCreature(config.zombieName, pos)doSendMagicEffect(pos, CONST_ME_MORTAREA)setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1)doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)addEvent(spawnZombie, config.timeBetweenSpawns * 1000)endend Movements/scripts/zombie event.lua local config = {playerCount = 2001, -- Global storage for counting the players in the eventmaxPlayers = 15, -- Max players who can participate}function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)if getGlobalStorageValue(config.playerCount) < config.maxPlayers thensetGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1)if getGlobalStorageValue(config.playerCount) == config.maxPlayers thendoBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.")elsedoBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)endelseaddEvent(tpBack, 1000, cid, fromPosition)doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.")return falseendprint(getStorage(config.playerCount) .. " Players in the zombie event.")return trueendfunction tpBack(cid, fromPosition)doTeleportThing(cid, fromPosition, true)doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)end Creaturescripts/scripts/zombie event.lua local config = {playerCount = 2001, -- Global storage for counting the players left/entered in the eventgoblet = 5805, -- id of the gold goblet you'll get when finishing the event.rewards = {2195, 2152, 2160}, -- You will get this + a gold goblet with your name on.-- {moneyId, count, using? 1 for using moneyReward, 0 for not using.}moneyReward = {2160, 10, 1},-- Should be same as in the globalevent!-- The zombies will spawn randomly inside this areafromPosition = {x = 1186, y = 1072, z = 7}, -- top left cornor of the playgroundtoPosition = {x = 1195, y = 1081, z = 7}, -- bottom right cornor of the playground}function onStatsChange(cid, attacker, type, combat, value)if isPlayer(cid) and isMonster(attacker) thenif isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) thenif getGlobalStorageValue(config.playerCount) >= 2 thendoBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)-1)elseif getGlobalStorageValue(config.playerCount) == 1 thenif isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) thendoBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING)local goblet = doPlayerAddItem(cid, config.goblet, 1)doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.")local corpse = doCreateItem(3058, 1, getPlayerPosition(cid))doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)for _,items in ipairs(config.rewards) dodoPlayerAddItem(cid, items, 1)endif config.moneyReward[3] == 1 thendoPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2])endendfor x = config.fromPosition.x, config.toPosition.x dofor y = config.fromPosition.y, config.toPosition.y dofor z = config.fromPosition.z, config.toPosition.z doareapos = {x = x, y = y, z = z, stackpos = 253}getMonsters = getThingfromPos(areapos)if isMonster(getMonsters.uid) thendoRemoveCreature(getMonsters.uid)endendendendendreturn falseendendreturn trueend Creaturescripts/scripts/login.lua poste a seguinte função. registerCreatureEvent(cid, "zombieevent") Globalevents.xml insira: <globalevent name="zombieevent" time="15:00" event="script" value="zombie event.lua"/> Movements.xml insira: <movevent type="StepIn" actionid="2000" event="script" value="zombie event.lua"/> Creaturescripts.xml insira: <event type="statschange" name="zombieevent" event="script" value="zombie event.lua"/> Esta parte e de grande importância. Na pasta Monster crie um arquivo chamado Event zombie.xml e insira isto dentro: <?xml version="1.0" encoding="UTF-8"?><monster name="Event Zombie" nameDescription="an event zombie" race="undead" experience="280" speed="100" manacost="0"><health now="500" max="500"/><look type="311" corpse="9875"/><targetchange interval="5000" chance="50"/><strategy attack="100" defense="0"/><flags><flag summonable="0"/><flag attackable="0"/><flag hostile="1"/><flag illusionable="0"/><flag convinceable="0"/><flag pushable="0"/><flag canpushitems="1"/><flag canpushcreatures="1"/><flag targetdistance="1"/><flag staticattack="90"/><flag runonhealth="0"/></flags><attacks><attack name="melee" interval="2000" min="-350" max="-350"/></attacks><defenses armor="15" defense="10"/><immunities><immunity paralyze="1"/></immunities><voices interval="5000" chance="10"><voice sentence="You wont last long!"/><voice sentence="Mmmmh.. braains!"/></voices><loot><item id="2148" countmax="1" chance="100000"/><!-- gold coin --></loot></monster> Depois em monstros.xml adicione a seguinte linha: <monster name="Event zombie" file="event zombie.xml"/> Por pedidos vai ai uma pagina para seu website. Vá ate "C:/xampp/htdcos/" crie um arquivo chamado Zombieevent.php dentro coloque isso. <?PHP$main_content .= '<h4 style="" id="pt"><br><center><h2><b> Zombie Event</b></h2></center><br><br><center><object height="350" width="425"><imgsrc="http://i52.tinypic.com/wjdth1.jpg" height="700"width="525"></object></center><br><br><br> </h4><b></b><center><b>O que é o Zombie Event?</b><br><br>É um evento que acontece todos os dias as 12:00, 18:30 e 21:30 hr noservidor.<br><br><br><b>Como funciona?<br></b><br>Quando estiver na hora irá abrir um teleport no mesmo lugar onde aparece oteleport da WoE, basta você entrar e aguardar o tempo para inicio do Evento,o objetivo do jogo é correr dos zombies, a cada 20 segundos irá nascer um novo emalguma área randomica, você deve correr pois se eles te tocarem vocêautomaticamente é retirado do evento e volta para o seu temple.O ultimo jogador que sobrar vivo vence o evento.<br><br><br><b>Quais são os prêmios?<br></b><br>O ganhador irá ganhar<b> 100k</b>, uma <b>Boots of Haste</b> e um <b>Globet com onome dele</b>.<br><br></center>';?> Depois abra o index.php em "C:/xampp/htdcos/". Depois de: case "buypoints":$topic = "Buy Points";$subtopic = "buypoints";include("buypoints.php");break; Cole isso: case "zombieevent":$topic = "Zombie event";$subtopic = "zombieevent";include("zombieevent.php");break; Agora vá em "C:/xampp/htdcos/layout/tibiacom/" abra o arquivo layout.php. Depois de: <a href='?subtopic=highscores'><div id='submenu_highscores' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'><div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div><div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div><div class='SubmenuitemLabel'>Highscores</div><div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div></div></a> Cole isso: <a href='?subtopic=zombieevent'><div id='submenu_zombieevent' class='Submenuitem'onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'><div class='LeftChain' style='background-image:url(<?PHP echo $layout_name;?>/images/general/chain.gif);'></div><div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon'style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div><div class='SubmenuitemLabel'>Zombie Event</div><div class='RightChain' style='background-image:url(<?PHP echo $layout_name;?>/images/general/chain.gif);'></div></div></a> Agora clique aqui e confira seu zombie events. Aqui vocês podem baixar o mapa para se usar com este evento: Download: Click aqui Scan: Clique aqui Prontinho espero que gostem. Créditos: Gostou? REP+ Arrumado Monster. Site Adicionado.1 ponto
-
O que esse bless tem de diferente dos outros, bom ele pra começar e pra exp baixa, e tbm ele faz o seguinte, pega o valor do bless e retorna + o valor do player em procentagem! Exe: o bless custa 1kk o player e lvl 20, então ele paga 20% do valor de 1kk function onSay(cid, words, param) bless = {1,2,3,4,5} for i = 1,#bless do if getPlayerBlessing(cid,bless[i]) then doPlayerSendCancel(cid,"You have all bless") end return TRUE end for i = 1,#bless do if doPlayerRemoveMoney(cid,(20000+getPlayerLevel(cid)-1)*100) then doPlayerAddBlessing(cid,bless[i]) doPlayerSendTextMessage(cid,27,"You Have now All Bless") doSendMagicEffect(getThingPos(cid),23) end return TRUE end end tag: <talkaction words="!bless" script="arquivo.lua"/> Creditos Mulizeu Se gostou + rep1 ponto
-
Assim remove-ra seu erro. Ele estava ocorrendo pois nas funções de adicionar a transformação ele não encontrava o creatureid valido, isso ocorre quando você se transforma e desloga ou morre. Agora esta arrumado. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_OUTFIT) setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000) addOutfitCondition(condition, 0, 71, 0, 0, 0, 0) setCombatCondition(combat, condition) -- // Goku TRANGokuSSJ = {lookType = 438} TRANGokuHSSJ = {lookType = 438} TRANGokuSSJ2 = {lookType = 439} TRANGokuSSJ3 = {lookType = 440} TRANBGoku = {lookType = 354} TRANBGokuSSJ = {lookType = 259} TRANRBGokuSSJ = {lookType = 138} TRANRBGokuSSJ2 = {lookType = 139} TRANRBGokuSSJ3 = {lookType = 140} TRANRBGokuSSJ4 = {lookType = 66} OXT = 500 EXT = 1000 -- // GOKU / ---- function EFGokuHSSJ(cid) if isPlayer(cid) then if getPlayerVocation(cid) == 403 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 234) addEvent(EFGokuHSSJ,EXT,cid) end end end end function EFGokuSSJ2(cid) if isPlayer(cid) then if getPlayerVocation(cid) == 404 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(EFGokuSSJ2,EXT,cid) end end end end function EFGokuSSJ3(cid) if isPlayer(cid) then if getPlayerVocation(cid) == 405 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 13) addEvent(EFGokuSSJ3,EXT,cid) end end end end function EFBGokuSSJ(cid) if isPlayer(cid) then if getPlayerVocation(cid) == 407 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 234) addEvent(EFBGokuSSJ,EXT,cid) end end end end function EFRBGokuSSJ2(cid) if isPlayer(cid) then if getPlayerVocation(cid) == 410 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 234) addEvent(EFRBGokuSSJ2,EXT,cid) end end end end function EFRBGokuSSJ3(cid) if isPlayer(cid) then if getPlayerVocation(cid) == 411 then if getPlayerMana(cid) >= 0 then doSendMagicEffect(getPlayerPosition(cid), 234) addEvent(EFRBGokuSSJ3,EXT,cid) end end end end -- // END function onCastSpell(cid, var) -- GOKU/ GOKU SSJ -- if getPlayerVocation(cid) == 400 then if getPlayerLevel(cid) >= 50 then doPlayerSetVocation(cid,402) doSetCreatureOutfit(cid, TRANGokuSSJ, -1) doSendMagicEffect(getPlayerPosition(cid), 56) else doPlayerSendCancel(cid, "You Need 50 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- GOKU SSJ/ GOKU HYPER SSJ -- elseif getPlayerVocation(cid) == 402 then if getPlayerLevel(cid) >= 75 then doPlayerSetVocation(cid,403) doSetCreatureOutfit(cid, TRANGokuHSSJ, -1) addEvent(EFGokuHSSJ,EXT,cid) doSendMagicEffect(getPlayerPosition(cid), 57) else doPlayerSendCancel(cid, "You Need 75 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- GOKU HYPER SSJ/ GOKU SSJ2 -- elseif getPlayerVocation(cid) == 403 then if getPlayerLevel(cid) >= 100 then doPlayerSetVocation(cid,404) doSetCreatureOutfit(cid, TRANGokuSSJ2, -1) addEvent(EFGokuSSJ2,EXT,cid) doSendMagicEffect(getPlayerPosition(cid), 58) else doPlayerSendCancel(cid, "You Need 100 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- GOKU SSJ2/ GOKU SSJ3 -- elseif getPlayerVocation(cid) == 404 then if getPlayerLevel(cid) >= 150 then doPlayerSetVocation(cid,405) doSetCreatureOutfit(cid, TRANGokuSSJ3, -1) addEvent(EFGokuSSJ3,EXT,cid) doSendMagicEffect(getPlayerPosition(cid), 59) else doPlayerSendCancel(cid, "You Need 150 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- GOKU SSJ3/ BIG GOKU -- elseif getPlayerVocation(cid) == 405 then if getPlayerLevel(cid) >= 180 then doPlayerSetVocation(cid,406) doSetCreatureOutfit(cid, TRANBGoku, -1) doSendMagicEffect(getPlayerPosition(cid), 8) else doPlayerSendCancel(cid, "You Need 180 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- BIG GOKU/ BIG GOKU SSJ -- elseif getPlayerVocation(cid) == 406 then if getPlayerLevel(cid) >= 200 then doPlayerSetVocation(cid,407) doSetCreatureOutfit(cid, TRANBGokuSSJ, -1) addEvent(EFBGokuSSJ,EXT,cid) doSendMagicEffect(getPlayerPosition(cid), 150) else doPlayerSendCancel(cid, "You Need 200 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- RB -- -- GOKU/ GOKU SSJ -- elseif getPlayerVocation(cid) == 408 then if getPlayerLevel(cid) >= 200 then doPlayerSetVocation(cid,413) doSetCreatureOutfit(cid, TRANRBGokuSSJ4, -1) doSendMagicEffect(getPlayerPosition(cid), 60) else if getPlayerLevel(cid) >= 50 then doPlayerSetVocation(cid,409) doSetCreatureOutfit(cid, TRANRBGokuSSJ, -1) doSendMagicEffect(getPlayerPosition(cid), 249) else doPlayerSendCancel(cid, "You Need 50 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end end -- GOKU/ GOKU SSJ -- elseif getPlayerVocation(cid) == 409 then if getPlayerLevel(cid) >= 100 then doPlayerSetVocation(cid,410) doSetCreatureOutfit(cid, TRANRBGokuSSJ2, -1) addEvent(EFRBGokuSSJ2,EXT,cid) doSendMagicEffect(getPlayerPosition(cid), 250) else doPlayerSendCancel(cid, "You Need 100 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- GOKU/ GOKU SSJ -- elseif getPlayerVocation(cid) == 410 then if getPlayerLevel(cid) >= 150 then doPlayerSetVocation(cid,411) doSetCreatureOutfit(cid, TRANRBGokuSSJ3, -1) addEvent(EFRBGokuSSJ3,EXT,cid) doSendMagicEffect(getPlayerPosition(cid), 251) else doPlayerSendCancel(cid, "You Need 150 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- GGOKU/ GOKU SSJ4 -- elseif getPlayerVocation(cid) == 412 then if getPlayerLevel(cid) >= 200 then doPlayerSetVocation(cid,413) doSetCreatureOutfit(cid, TRANRBGokuSSJ4, -1) doSendMagicEffect(getPlayerPosition(cid), 60) else doPlayerSendCancel(cid, "You Need 200 Level To First Transform.") doSendMagicEffect(getPlayerPosition(cid), 2) end -- // END else doPlayerSendCancel(cid, "You Cannot Be Stronger.") doSendMagicEffect(getPlayerPosition(cid), 2) end end1 ponto
-
Existe um botão no menu que salva, o botão é parecido com esse -> :button_ok:1 ponto
-
sim, ai você muda para as looktypes que vc fez ai no outifit1 ponto
-
Gesior Mudar A Pasta Do Ot
Vilden reagiu a JumentoCuzaum por um tópico no fórum
MUDE o Nome Do Post Para Tutorial PLEASE!1 ponto -
Difícil alguém criar um sistema de task só pra você, pois já existe e são bem legais. O forum tem um sistema de pesquisa la no topo, http://www.xtibia.co...simple-task-20/1 ponto
-
function onLogin(cid) local msg = { msg1 = "Você foi promovido por ser premium account!", msgerro = "Você precisa ser promotion para receber a vocação epic.", msg2 = "Acabou seus dias de premium account, sua promotion foi removida." } if isPremium(cid) == true and getPlayerVocation(cid) >= 5 then doPlayerSendTextMessage(cid,25,msg.msg1) doPlayerSetVocation(cid,(getPlayerVocation(cid)+4)) elseif isPremium(cid) == true and getPlayerVocation(cid) <= 4 then doPlayerSendTextMessage(cid,25,msg.msgerro) elseif isPremium(cid) == false and getPlayerVocation(cid) >= 9 then doPlayerSetVocation(cid,(getPlayerVocation(cid)-4)) doPlayerSendTextMessage(cid,25,msg.msg2) end end Sem mensagens: if (isPremium(cid) == true and getPlayerVocation(cid) >= 5) and doPlayerSetVocation(cid,(getPlayerVocation(cid)+4)) or doPlayerSetVocation(cid,(getPlayerVocation(cid)-4)) then1 ponto
-
da onde tu tiro esse pos? vc tem que afirmar uma varivel antes de usala id = 10134 --id do aol function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then if (getPlayerSlotItem(cid, 2).itemid == id) then pos = getCreaturePos(cid) doCreatureSetDropLoot(cid, false) doPlayerSetLossPercent(cid, experience, 0) doSendMagicEffect(pos, 49) end return TRUE end end1 ponto
-
[Resolvido] Cidade Natal Por Vocação
tharlanthebrave reagiu a bonazza por uma questão
em creaturescript/script/login.lua antes do return true adc: local voc = { [1] = 2, [2] = 5, [3] = 1, [4] = 4 } if getPlayerStorageValue(cid, 43434) <= 0 and voc[getPlayerVocation(cid)] then doPlayerSetTown(cid, voc[getPlayerVocation(cid)]) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) setPlayerStorageValue(cid, 43434, 1) end [iD DA VOC] = ID DA TOWN1 ponto -
[Gesior] Texto Em Movimento
alissonfgp reagiu a yasha por um tópico no fórum
Me desculpem pela inatividade no tópico, agora vou trazer novas coisas e darei suporte nas dúvidas. Obrigado.1 ponto -
Cave Entrance Uma coisa que eu percebi é que muita gente saber usar o ID 459 (Stair) para subir e decer andares, mas no caso das Entrances nas montanhas só isso nao basta, porque ficaria um "vazio" . Bom, vou explicar melhor para quem nao entendeu o raciocinio: Nesse caso, é diferente de colocar uma escada por exemplo, o player simplismente nao dece in-game, é como se a entrada fosse uma parede. Entao vamos aprender a usar corretamente: Lista de IDs: Agora vamos começar, Aonde for ficar a Entrance, coloque stair, assim: Agora o player ja pode decer, mas ainda nao está pronto, veja: Para nao ficar esse "buraco" in-game, vamos utilizar o ID 8260 por cima do Stair. Agora, como mostra a figura acima, arraste de volta a Cave Entrance. Fica assim: Está pronto galera, é realmente muito simples. Resumindo, vc coloca o ID 459 e o 8260 no mesmo SQM que for ficar a Cave Entrance, e pronto (: Espero ter ajudado aos iniciantes que nao sabiam disso. Abraços.1 ponto