Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 05/13/12 em %

  1. Mulizeu

    New Marriage System

    Na sua db execute: CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) ); Mods MarriageSystem.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod> Configuração: CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
    3 pontos
  2. Valentine

    [Creaturescripts] Resurrection

    Explicação: O Player tem um Item na Bag, que ao ser usado salva como Respawn a posição em que ele se encontra, o Item desaparece. Agora, o Player tem outro Item diferente na Bag, este não pode ser usado. Quando o Player morrer, será imediatamente teleportado para a posição de Respawn. Caso o Player tenha salvado a posição, e não tenha o segundo Item (que faz renascer), será teleportado para uma posição fixa (o real Templo). O Script: Será dividido em duas partes, o CreatureScript, que vai verificar se o Player possui o Item, caso verdadeiro, ressucitará: local item_id = 999 local count = 1 local temple = {x=999, y=999, z=9} function onDeath(cid, corpse, deathList) if isPlayer(cid) then if getPlayerItemCount(cid,item_id) >= 1 then if doPlayerRemoveItem(cid,item_id,count) then doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid, 23, "Reborn from the ashes.") end else doPlayerSetMasterPos(cid, temple) doTeleportThing(cid,c) doSendMagicEffect(getPlayerPosition(cid), 10) end end end E a Tag: <event type="death" name="Resurrection" event="script" value="resurrection.lua"> E a segunda parte, Action que salva a posição do Player atravéz de um Item: function onUse(cid, item, pos) newpos = getPlayerPosition(cid) if doPlayerRemoveItem(cid,8888,1) then doPlayerSetMasterPos(cid, newpos) end end E sua Tag: <action itemid="8888" event="script" value="savepos.lua"> Sugestão de nomes e IDs: Position Map - ID 5091 - (Treasure Map) Resurrection Heart - ID 2353 - (Burning Heart) Configurando o Script: local item_id = 999 ID do Item que será consumido para renascer. Como exemplo, o ID 2353. local count = 1 Quantidade do Item que será consumida. local temple = {x=999, y=999, z=9} Aqui deve ser dada a posição do Templo real. doPlayerSendTextMessage(cid, 23, "Reborn from the ashes.") Mensagem para caso o Player renascer. <event type="death" name="Resurrection" event="script" value="resurrection.lua"> A Tag pode ter o nome editado e o nome do Script também. if doPlayerRemoveItem(cid,8888,1) then O ID do Item que salva a posição atual do Player, aconselho a não utilizar o mesmo Item que vai ressucitar para evitar erros. Como exemplo, o ID 5091. <action itemid="8888" event="script" value="savepos.lua"> Editar na Tag o ID do Item, deve ser o mesmo utilizado na linha acima. O nome do Script também pode ser editado. Obrigado por lerem, o Script ainda não foi testado e está em uma versão "beta", pois ainda pode ser melhorado.
    1 ponto
  3. Delaks

    Subwat Kamikaze V13 Atualizado

    ATUALIZAÇÔES DO SUBWAT KAMIKAZE V10 -Adicionada novas houses pelos mapas. -Mudado a cor da parede do temple. -Adicionada Àrea de Duvidas. -Adicionado o item Really Shield na Super VIP e o comando !reallyshield -Novo baú na Super Vip dando 1000 Vip Coins -Novos teleports adicionados na Super Vip -Separados Sets e Itens no temple. -Adicionado houses na área de houses na Super Vip. -Retirado bug da WAR. -Nova quest dando os itens: super e mega itens absolute e absolute uh e absolute mana -Nova quest dando os itens: exp potion,infinity exp potion e super absolute uh -Adicionada a Àrea de Reuniões no teto -Novas hunts na área de Teleports. ATUALIZAÇÔES NOVAS DO SUBWAT KAMIKAZE V13 -Retirado o bug das Houses -Adicionado vila de houses na city principal -Adicionado super mana,super uh e super bow.Comandos:!superuh,!supermana e !superbow -Adicionado 12 Hunt's novas na área Free -Adicionado 5 Hunt's novas na área Super Vip -Novas houses colocadas na city principal -Dois monsters novos:Bruxa do 71 e Satanas -Retirado bugs de varias hunts -Arrumado o bug da war -Retirado o Sex System -Nova quest adicionada de life scrolls e mana scrolls -Adicionado área para as hunts free Temple Teleports Super Vip Download 4shared: http://www.4shared.c...mikaze_V13.html Download Speedy Share: http://speedy.sh/5Qa...amikaze-V13.rar Scan: https://www.virustot...sis/1336780401/ Créditos: Subwat,Adm Kamikaze e Nadotti. Mapa editado por Delaks. De um Rep+.Comentem e avaliem.Obrigado. Adicionado download para Speedy Share. SUBWAT KAMIKAZE V25: http://www.xtibia.com/forum/topic/206099-subwat-kamikaze-v25-atualizacao/
    1 ponto
  4. saulos

    Modificando Weapons

    E ai pessoal tudo bem? Hoje eu estarei aqui para encinar a voces como criar weapons editadas para maior inovaçao de armas no ot vamos la: va na pasta do seu ot/data/weapons/script e crie um arquivo.lua e coloke dentro depois de feito feche e salve e va em weapon.xml e coloke o seguinte la: salve e feche aki esta a explikaçao do arquivo.lua o de verde e o efeito da wepon para vc saber qual efeito escolher fale /z 0,/z 1 ate si eu nao me engano /z 64 o de vermelho e o dano ali no caso e death mas voce pode escolher o seu tipo:holy,ice,fire e etc o de amarelo e a area de combate ali no caso e sem area attack mas se vc quiser colokar area iria fikar assim: {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 3, 1, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } ow caso voce quira aumentar a area e bem simples so coloka o numero 1 envolta do 3 o de laranja e e a condiçao que acontecera exemplo paralyze o player fikara paralyzado caso voce quira mudar coloke outras condiçoes no momento so lembro o nome de uma freeze o de roxo e a velocidade e a ticks perdida pois ali no caso peguei de modelo a sword paralzye mas caso vc nao queira uma sword que paralyze so tirar o que ta de roxo Entao e isso ai pessoal espero que tenham gostado esse escript e bem modificavel quem gosto da rep++ ai hehe ^^!!!
    1 ponto
  5. facil, é um bug no "doCreatureSay" coloque esse script no lugar desse ai: local config = { bosses={---aid of portal, position where it sends, value it sets, text it shows [1001] = {pos={x=33069, y=31783, z=13, stackpos=1}, value=1, text="Entering The Crystal Caves"}, [1002] = {pos={x=33371, y=31613, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"}, [1003] = {pos={x=33153, y=31781, z=12, stackpos=1}, value=3, text="Entering The Vats"}, [1004] = {pos={x=33038, y=31753, z=15, stackpos=1}, value=4, text="Entering The Arcanum"}, [1005] = {pos={x=33199, y=31686, z=12, stackpos=1}, value=5, text="Entering The Hive"}, [1006] = {pos={x=33111, y=31682, z=12, stackpos=1}, value=6, text="Entering The Shadow Nexus"} }, mainroom={---aid, position, lowest value that can use this portal, text [2001] = {pos={x=33069, y=31783, z=13, stackpos=1}, value=1, text="Entering The Crystal Caves"}, [2002] = {pos={x=33371, y=31613, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"}, [2003] = {pos={x=33153, y=31781, z=12, stackpos=1}, value=3, text="Entering The Vats"}, [2004] = {pos={x=33038, y=31753, z=15, stackpos=1}, value=4, text="Entering The Arcanum"}, [2005] = {pos={x=33199, y=31686, z=12, stackpos=1}, value=5, text="Entering The Hive"} }, portals={---aid, position, text [3000] = {pos={x=33163, y=31708, z=14}, text="Entering Inquisition Portals Room"}, [3001] = {pos={x=33158, y=31728, z=11}, text="Entering The Ward of Ushuriel"}, [3002] = {pos={x=33169, y=31755, z=13}, text="Entering The Undersea Kingdom"}, [3003] = {pos={x=33124, y=31692, z=11}, text="Entering The Ward of Zugurosh"}, [3004] = {pos={x=33356, y=31590, z=11}, text="Entering The Foundry"}, [3005] = {pos={x=33197, y=31767, z=11}, text="Entering The Ward of Madareth"}, [3006] = {pos={x=33250, y=31632, z=13}, text="Entering The Battlefield"}, [3007] = {pos={x=33232, y=31733, z=11}, text="Entering The Ward of The Demon Twins"}, [3008] = {pos={x=33094, y=31575, z=11}, text="Entering The Soul Wells"}, [3009] = {pos={x=33197, y=31703, z=11}, text="Entering The Ward of Annihilon"}, [3010] = {pos={x=33105, y=31734, z=11}, text="Entering The Ward of Hellgorak"} }, storage=56123,---storage used in boss and mainroom portals e={} }----dunno whats this but have to be like this to make doCreatureSayWithDelay working, DON'T TOUCH} function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) == TRUE then if(config.bosses[item.actionid]) then local t= config.bosses[item.actionid] if getPlayerStorageValue(cid, config.storage)< t.value then setPlayerStorageValue(cid, config.storage, t.value) end doTeleportThing(cid, t.pos) doSendMagicEffect(getCreaturePosition(cid),10) elseif(config.mainroom[item.actionid]) then local t= config.mainroom[item.actionid] if getPlayerStorageValue(cid, config.storage)>=t.value then doTeleportThing(cid, t.pos) doSendMagicEffect(getCreaturePosition(cid),10) else doTeleportThing(cid, fromPosition) doSendMagicEffect(getCreaturePosition(cid),10) doCreatureSay(cid, 'You don\'t have enough energy to enter this portal', TALKTYPE_ORANGE_1) end elseif(config.portals[item.actionid]) then local t= config.portals[item.actionid] doTeleportThing(cid, t.pos) doSendMagicEffect(getCreaturePosition(cid),10) end end end certamente ira funcionar.. o bug da poi, talves seja poruqe vc tem qe passar em cima do trono 2x passe 2x em cima de cada trono, e me fala se funciona (: ajudei rep++ ae (:
    1 ponto
  6. http://www.xtibia.co...xp-por-hit-v20/ Esse seria um com Stages? Se não for, te dou a solução, esse é o Script feito pelo comedinhasss. rateExp = 50 -- 0 a 20 rateExp1 = 40 -- 21 a 50 rateExp2 = 30 -- 51 a 100 rateExp3 = 15 -- 101 a 200 rateExp4 = 7 -- 201 a 300 rateExp5 = 5 -- 301 a 350 rateExp6 = 3 -- 351 em diante bonus = 1 -- Bonus por estar com exp ring expringid = 1000 -- Id do exp ring ------------------------------ function CalculeExp(monsterhp, exptotal, hit) local x = hit <= monsterhp and math.ceil(exptotal * hit / monsterhp) or 0 local x2 = x - 20 + math.random(20) return x2 > 0 and x2 or 0 end function isSummon(uid) return uid ~= getCreatureMaster(uid) or false end function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then if isMonster(cid) then if isCreature(attacker) then local sid = isSummon(attacker) == true and getCreatureMaster(attacker) or attacker if isPlayer(sid) and getPlayerLevel(sid) <= 20 then local expg = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg.." exp.") doPlayerAddExp(sid, expg) elseif isPlayer(sid) and getPlayerLevel(sid) > 20 and getPlayerLevel(sid) <= 50 then local expg1 = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp1, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg1.." exp.") doPlayerAddExp(sid, expg1) elseif isPlayer(sid) and getPlayerLevel(sid) > 50 and getPlayerLevel(sid) <= 100 then local expg2 = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp2, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg2.." exp.") doPlayerAddExp(sid, expg2) elseif isPlayer(sid) and getPlayerLevel(sid) > 100 and getPlayerLevel(sid) <= 200 then local expg3 = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp3, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg3.." exp.") doPlayerAddExp(sid, expg3) elseif isPlayer(sid) and getPlayerLevel(sid) > 200 and getPlayerLevel(sid) <= 300 then local expg4 = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp4, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg4.." exp.") doPlayerAddExp(sid, expg4) elseif isPlayer(sid) and getPlayerLevel(sid) > 300 and getPlayerLevel(sid) <= 350 then local expg5 = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp5, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg5.." exp.") doPlayerAddExp(sid, expg5) elseif isPlayer(sid) and getPlayerLevel(sid) > 350 then local expg6 = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * rateExp6, value) doPlayerSendTextMessage(sid, 23, "Você Ganhou "..expg6.." exp.") doPlayerAddExp(sid, expg6) elseif isPlayer(sid) and item.itemid = expringid then local expbonus = CalculeExp(getCreatureMaxHealth(cid), getMonsterExperience(getCreatureName(cid)) * expbonus, value) doPlayerSendTextMessage(sid, 23, "You gain "..expbonus.." bonus exp.") doPlayerAddExp(sid, expbonus) end end end elseif type == STATSCHANGE_HEALTHGAIN then return false end return true end function onCombat(cid, target) if isMonster(target) and not isSummon(target) and not isPlayer(target) then registerCreatureEvent(target, "ExpGain") end return true end
    1 ponto
  7. jhon992

    House Clean (Player Inativo)

    by VodKart: local requiredTime = 15 -- dias pra executar. function onThink(interval, lastExecution) doSaveServer() local result_plr = db.getResult("SELECT * FROM `houses`;") if(result_plr:getID() ~= -1) then while(true) do local owner = tonumber(result_plr:getDataInt("owner")) local hid = tonumber(result_plr:getDataInt("id")) local lastlogin = 0 local result = db.getResult("SELECT * FROM `players` WHERE `id` = ".. owner ..";") if(result:getID() ~= -1) then while(true) do lastlogin = tonumber(result:getDataInt("lastlogin")) if not(result:next()) then break end end result:free() end if lastlogin < os.time() - requiredTime * 60 *60 * 24 then setHouseOwner(hid, 0, true) end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
    1 ponto
  8. se não funcionar, usa esse: local temp = { exhausted = 30, -- tempo em segundos storage = 58589 } function onStepIn(cid, item, position, fromPosition) if(getPlayerStorageValue(cid, temp.storage) > os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Volte após "..(getPlayerStorageValue(cid, temp.storage) - os.time()).." segundos.") doTeleportThing(cid,fromPosition) else setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) end return true end
    1 ponto
  9. Vamos la então estarei postando esse que eu tenho aqui não sei quanto tempo faz que o tenho (pra mais de 6 meses) era de um antigo pda porem eu acho que ele não paga mais se o pokemon for lv mais alto. Outra coisa os preços dos pokemons ja estão de acordo com o pxg (só tem os da 1º geração) Vai em data/npc crie um arquivo .xml com o nome de : PokemonSeller e cole isso dentro. Agora va em data/npc/scripts e crie um arquivo .lua com o nome de pokemon seller e cole isso dentro: Explicando a parte para adicionar mais pokemons : elseif (msgcontains(msg, 'dragonite') and talkState[talkUser] == 1 and focus == cid) then selfSay('Are you sure you want to sell me a dragonite? I can buy it for 120000 dollars.') talkState[talkUser] = "dragonite" elseif (msgcontains(msg, 'yes') and talkState[talkUser] == "dragonite" and focus == cid) then sellPokemon(cid, "dragonite", 12000000) talkState[talkUser] = 1 O dragonite é o ultimo então basta copiar essa parte que eu postei e adicionar o novo pokemon exemplo : elseif (msgcontains(msg, 'nome do pokemon') and talkState[talkUser] == 1 and focus == cid) then selfSay('Are you sure you want to sell me a dragonite? I can buy it for 120000 dollars.') mensagen do npc trocar nome do poke e dolares. talkState[talkUser] = "dragonite" < -- nome do pokemon elseif (msgcontains(msg, 'yes') and talkState[talkUser] == "dragonite" and focus == cid) then <-- nome do pokemon novamente. sellPokemon(cid, "dragonite", 12000000) <-- nome do pokemon e quanto ele custará 12000000 acho que é 120k isso ae. \o/ talkState[talkUser] = 1 Blz agora só tu testar aqui funciona e so falta mesmo adicionar os kanto e os shinys caso você queira. Flw.
    1 ponto
  10. 1 ponto
  11. Nunca ouvi falar deste erro mais vo recriar um usando Onthink assim ele acredito vai curar enquanto ele anda eu fiz ele bem rapido qualquer coisa estou aqui. Vamu que vamos no script modifique assim: O seu potion coloca isso: local RemoveOnUse,storage,exausted = true,98762,1 function onUse(cid, item, fromPosition, itemEx, toPosition) doCreatureSay(cid, "Cool!", 19) setPlayerStorageValue(cid, 80962, 1) doRemoveItem(item.uid, 1) setPlayerStorageValue(cid, storage, os.time()+exausted) return true end Agora va em creaturescripts/scripts e adicione um arquivo lua chamado healwalk.lua agora a tag em creaturescripts.xml a tag seria a tag seria <event type="think" name="healwalk" event="script" value="healwalk.lua"/> e nao se esqueça de registar o evento em login.lua coloque isto antes do return true registerCreatureEvent(cid, "healwalk")
    1 ponto
  12. caotic

    (Urgente) Erro Com Zombie Event

    A troca de executavel nao e dificil desde que o seu executavel nao seja editado com alguma funçao que voce ultilize Se seu servidor so usar funçoes TFS e que seja da sua versão nao tem segredo E so procurar um executavel da sua versão E as dlls
    1 ponto
  13. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 30) local area = createCombatArea(AREA_SQUARE1X1) setCombatArea(combat, area) function onCastSpell(cid, var) doPlayerAddItem(cid,8858,1) return doCombat(cid, combat, var) end
    1 ponto
  14. Lucaswc15

    Action De Cortar Arvores

    Ae nbb147, voce leu a mensagem que te mandei? Aqui vai o script, testa ae, aqui funcionou.
    1 ponto
  15. eddyhavoc

    Pokeclock

    Em primeiro lugar, vai aprender a escrever correto, sabe nem escrever e quer criar OT. Em segundo lugar, OT Via Hamachi nunca vai lotar. Em terceiro lugar, imagina um OT que o ADM num sabe nem liberar as portas do modem ¬¬ Erros de português óbvios: "muintas","muintos" E Novos Pokemons, SnowBord ? que isso ia ser uma prancha ? ou você não sabe escrever SlowBro que seria: HeyTwo, que porra é essa...? Podosky que porra é essa...?² se é fã do Lucas Podolski, jogador alemão ? Greodude que porra é essa...?³ sem idéia e quer fazer um pokemon estilo geodude, aff man, você não sabe nem escrever, vai fazer Sprite ? Ou só vai criar um pokemon com a mesma sprite e trocar o nome, osso ein. Pedtygey, que porra é essa...? não sabe escrever Pidgey ou ta sem idéias e quer criar um Pedtygey que seria um Pidgey diferente ? sei lá ou um Pidgey GAY por isso Pedtygey OMG véio desiste de criar OT. Magnamaite, caralho velho se não sabe escrever Magnemite, TNC mano vo fala mais nada. se for pra por pokemon novo tem os das 3° e 4° gerações para por. Post feito por: EddyHavoc Trollando no XTibia.
    1 ponto
  16. tyuahoi

    [Gesior Aac] Efeitos Para Seu Website

    Olá Vim Trazer Um Script Para Ficar Mais Agradavel o Seu Site. 1º Efeito De Texto Ficar Ao Redor Da Seta Do seu Mouse. Basta adicionar isso em seu <head> da layout.php <style type="text/css"> /* Circle Text Styles */ #outerCircleText { /* Optional - DO NOT SET FONT-SIZE HERE, SET IT IN THE SCRIPT */ font-style: italic; font-weight: bold; font-family: 'comic sans ms', verdana, arial; color: #000; /* End Optional */ /* Start Required - Do Not Edit */ position: absolute;top: 0;left: 0;z-index: 3000;cursor: default;} #outerCircleText div {position: relative;} #outerCircleText div div {position: absolute;top: 0;left: 0;text-align: center;} /* End Required */ /* End Circle Text Styles */ </style> <script type="text/javascript"> /* Circling text trail- Tim Tilton Website: http://www.tempermedia.com/ Visit: http://www.dynamicdrive.com/ for Original Source and tons of scripts Modified Here for more flexibility and modern browser support Modifications as first seen in http://www.dynamicdrive.com/forums/ username:jscheuer1 - This notice must remain for legal use */ ;(function(){ // Your message here (QUOTED STRING) var msg = "Real Server!"; /* THE REST OF THE EDITABLE VALUES BELOW ARE ALL UNQUOTED NUMBERS */ // Set font's style size for calculating dimensions // Set to number of desired pixels font size (decimal and negative numbers not allowed) var size = 24; // Set both to 1 for plain circle, set one of them to 2 for oval // Other numbers & decimals can have interesting effects, keep these low (0 to 3) var circleY = 0.75; var circleX = 2; // The larger this divisor, the smaller the spaces between letters // (decimals allowed, not negative numbers) var letter_spacing = 5; // The larger this multiplier, the bigger the circle/oval // (decimals allowed, not negative numbers, some rounding is applied) var diameter = 10; // Rotation speed, set it negative if you want it to spin clockwise (decimals allowed) var rotation = 0.4; // This is not the rotation speed, its the reaction speed, keep low! // Set this to 1 or a decimal less than one (decimals allowed, not negative numbers) var speed = 0.3; ////////////////////// Stop Editing ////////////////////// if (!window.addEventListener && !window.attachEvent || !document.createElement) return; msg = msg.split(''); var n = msg.length - 1, a = Math.round(size * diameter * 0.208333), currStep = 20, ymouse = a * circleY + 20, xmouse = a * circleX + 20, y = [], x = [], Y = [], X = [], o = document.createElement('div'), oi = document.createElement('div'), b = document.compatMode && document.compatMode != "BackCompat"? document.documentElement : document.body, mouse = function(e){ e = e || window.event; ymouse = !isNaN(e.pageY)? e.pageY : e.clientY; // y-position xmouse = !isNaN(e.pageX)? e.pageX : e.clientX; // x-position }, makecircle = function(){ // rotation/positioning if(init.nopy){ o.style.top = (b || document.body).scrollTop + 'px'; o.style.left = (b || document.body).scrollLeft + 'px'; }; currStep -= rotation; for (var d, i = n; i > -1; --i){ // makes the circle d = document.getElementById('iemsg' + i).style; d.top = Math.round(y[i] + a * Math.sin((currStep + i) / letter_spacing) * circleY - 15) + 'px'; d.left = Math.round(x[i] + a * Math.cos((currStep + i) / letter_spacing) * circleX) + 'px'; }; }, drag = function(){ // makes the resistance y[0] = Y[0] += (ymouse - Y[0]) * speed; x[0] = X[0] += (xmouse - 20 - X[0]) * speed; for (var i = n; i > 0; --i){ y[i] = Y[i] += (y[i-1] - Y[i]) * speed; x[i] = X[i] += (x[i-1] - X[i]) * speed; }; makecircle(); }, init = function(){ // appends message divs, & sets initial values for positioning arrays if(!isNaN(window.pageYOffset)){ ymouse += window.pageYOffset; xmouse += window.pageXOffset; } else init.nopy = true; for (var d, i = n; i > -1; --i){ d = document.createElement('div'); d.id = 'iemsg' + i; d.style.height = d.style.width = a + 'px'; d.appendChild(document.createTextNode(msg[i])); oi.appendChild(d); y[i] = x[i] = Y[i] = X[i] = 0; }; o.appendChild(oi); document.body.appendChild(o); setInterval(drag, 25); }, ascroll = function(){ ymouse += window.pageYOffset; xmouse += window.pageXOffset; window.removeEventListener('scroll', ascroll, false); }; o.id = 'outerCircleText'; o.style.fontSize = size + 'px'; if (window.addEventListener){ window.addEventListener('load', init, false); document.addEventListener('mouseover', mouse, false); document.addEventListener('mousemove', mouse, false); if (/Apple/.test(navigator.vendor)) window.addEventListener('scroll', ascroll, false); } else if (window.attachEvent){ window.attachEvent('onload', init); document.attachEvent('onmousemove', mouse); }; })(); </script> Aonde Esta Escrito Real Server Voçe Muda Para A Mensagem Que Voçe Quiser. Imagem De Como Ira Ficar. Simples Mais Util. 2º Efeito De Neve Em Seu Web Site Acresente Isso Em layout.php <script type="text/javascript"> /* Snow Fall 1 - no images - Java Script Visit http://rainbow.arch.scriptmania.com/scripts/ for this script and many more */ // Set the number of snowflakes (more than 30 - 40 not recommended) var snowmax=35 // Set the colors for the snow. Add as many colors as you like var snowcolor=new Array("#AAAACC","#DDDDFF","#CCCCDD","#F3F3F3","#F0FFFF") // Set the fonts, that create the snowflakes. Add as many fonts as you like var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS") // Set the letter that creates your snowflake (recommended: * ) var snowletter="*" // Set the speed of sinking (recommended values range from 0.3 to 2) var sinkspeed=0.6 // Set the maximum-size of your snowflakes var snowmaxsize=22 // Set the minimal-size of your snowflakes var snowminsize=8 // Set the snowing-zone // Set 1 for all-over-snowing, set 2 for left-side-snowing // Set 3 for center-snowing, set 4 for right-side-snowing var snowingzone=1 /* // * NO CONFIGURATION BELOW HERE * */ // Do not edit below this line var snow=new Array() var marginbottom var marginright var timer var i_snow=0 var x_mv=new Array(); var crds=new Array(); var lftrght=new Array(); var browserinfos=navigator.userAgent var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/) var ns6=document.getElementById&&!document.all var opera=browserinfos.match(/Opera/) var browserok=ie5||ns6||opera function randommaker(range) { rand=Math.floor(range*Math.random()) return rand } function initsnow() { if (ie5 || opera) { marginbottom = document.body.clientHeight marginright = document.body.clientWidth } else if (ns6) { marginbottom = window.innerHeight marginright = window.innerWidth } var snowsizerange=snowmaxsize-snowminsize for (i=0;i<=snowmax;i++) { crds[i] = 0; lftrght[i] = Math.random()*15; x_mv[i] = 0.03 + Math.random()/10; snow[i]=document.getElementById("s"+i) snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)] snow[i].size=randommaker(snowsizerange)+snowminsize snow[i].style.fontSize=snow[i].size snow[i].style.color=snowcolor[randommaker(snowcolor.length)] snow[i].sink=sinkspeed*snow[i].size/5 if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)} if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)} if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4} if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2} snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size) snow[i].style.left=snow[i].posx snow[i].style.top=snow[i].posy } movesnow() } function movesnow() { for (i=0;i<=snowmax;i++) { crds[i] += x_mv[i]; snow[i].posy+=snow[i].sink snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]); snow[i].style.top=snow[i].posy if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){ if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)} if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)} if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4} if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2} snow[i].posy=0 } } var timer=setTimeout("movesnow()",50) } for (i=0;i<=snowmax;i++) { document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>") } if (browserok) { window.onload=initsnow } </SCRIPT> Imagem De Como Ira Ficar. Simples Mais Util.
    1 ponto
  17. guixap

    [Tutorial] Criando Arquivos .lua

    Quem aprovou essa merda?
    1 ponto
  18. @Dudefully tenho quase certeza que precisa de algum scripts pra hooka dll no seu cliente usa "Stud_PE" só coloca dll no cliente não vai funcionar 100% precisa de mais algo Te Ajudei Rep +
    1 ponto
  19. HunterHero

    [Básico] Monstro Sobre A Lava

    Bem, venho aqui apresentar um tutorial bastante simples. Não sei se já há na secção, acredito que muitos saibam fazer isto, mas também o contrário. Sem mais demoras... O objectivo será por uma criatura a andar sobre a lava, que consiga atacar o player de long range. 1º Passo: Use o ID 598 e encha de lava a sua zona. Seguidamente use algum piso walkable para o player andar, o que mais se adapta penso ser o ID 103. De o formato que quiser, eu fiz uma linha para ser simplificado. 2º Passo: Use o ID 9883 – Lava Walkable, e faça um seguimento perto da area do player. Trace da maneira que mais lhe agradar. Atenção: Se houver um sitio onde toque no piso do player o monstro poderá passar para o piso e o player para a lava (coisa que neste tutorial não pretendemos) 3º Passo: Ponha um spawn e coloque uma criatura na lava walkable. Eu pus o Fire Elemental pois penso ser o que mais se adapta. 4º Passo: Decore a sua maneira. Coloque rochas, diferentes tipos de piso, mais monstros.. Até obter um resultado agradável. Se gostou, REP +
    1 ponto
  20. É simples brother: No map editor, selecione o tile de PZ e vá passando em cima da onde você quer retirar a PZ segurando CTRL.
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...