Ir para conteúdo

SkyLigh

Lorde
  • Total de itens

    2183
  • Registro em

  • Última visita

  • Dias Ganhos

    23

Tudo que SkyLigh postou

  1. usa o talkaction assim function onSay(cid, item, position) if getPlayerStorageValue(cid,22451) >= 1 then return doPlayerSendCancel(cid,"Sorry you have vip") end doPlayerRemoveItem(cid,11192,9000) setPlayerStorageValue(cid,22451,1) doPlayerSendTextMessage(cid,27,"You received vip permanente") doSendMagicEffect(getPlayerPosition(cid),CONST_ME_POFF) return TRUE end local id = 1234 -- id do item if getPlayerItemCount(cid,id) then doPlayerSendTextMessage(cid,27,"Sorry , you no have item") return true end
  2. SkyLigh

    Lol Pic's

    ahuahuahuahuahuahua .. tinha que por em uma pic do piu - piu
  3. Local incorreto reportado Para um superior script . local bless = {1, 2, 3, 4, 5} local cost = 80000 function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless[i])) then doPlayerSendCancel(cid, "Voceja tem todas as bless.") return TRUE end end if(doPlayerRemoveMoney(cid, cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doCreatureSay(cid, "You are now blessed!" ,19) doSendMagicEffect(getPlayerPosition(cid), 49) else doPlayerSendCancel(cid, "Voce precisa de 80k para a bless.") end return TRUE end
  4. SkyLigh

    Entendendo .lua

    Olá galera do xtibia , hoje estou trazendo um tutorial para vocês que querem entender a linguagem.lua Como quase todos ja viram o topico do @LuckOake que e aprendendo a scriptear Link : http://www.xtibia.com/forum/topic/196714-aprendendo-a-scriptear/page__fromsearch__1 Entendendo A Linguagem.lua Então vamos aprender a linguagem . Abaixo irei amostrar todos os significado do ((if , end , else , elseif , then , and)) traduzido para o português if - Se then - Então end - Fim else - senão elseif - senãose and - e [/code] [size=6][color=#0000cd] Functions Iniciais De Um Script[/color][/size] Agora irei ensina-los qual e as functions certas para iniciar um script function onUse(cid, item, frompos, item2, topos) -- Action function onLogin(cid) -- so se for usa alguma tag no login.lua utilize essa function ela serve para creaturescripts. function onAdvance(cid, skill, oldLevel, newLevel) -- creaturescripts function onSay(cid, words, param) -- talkactions function onStepIn(cid, item, pos) -- movements Funções explicadas : http://www.xtibia.com/forum/topic/99662-pasta-data-funcoes-em-lua/ Funções não explicadas : http://www.xtibia.com/forum/topic/138081-lualista-de-funcoes/ Estudando Sobre If nossa primeira estrutura de controle e o if, como em todas as linguagens de programação, ela e uma estrutura que introduz um desvio condicional ou seja, um desvio de execução natural do programa Em outras palavras, se a condição dada pela expressão for satisfatória, será executado um bloco de comandos, caso a condição não seja satisfatória, o bloco de comando será ignorado. Alem do if temos seu complemento que e chamado de ELSE. Essa expressão complementa o if, fazendo com que seja executado caso a expressão seja a negação da expressão do if. No caso, caso a verificação seja falsa (quando lua não e 1) ele pulará o que tem depois do then mas irá parar no else e executara o que tem depois do else. Diferente do IF, o ELSE não pode ser colocado separado de um IF, ou seja, para usar um ELSE é necessário ter um IF anteriormente, podendo ser junto como um ELSEIF fazendo quem que outra expressão seja executada em caso de um retorno contrário à expressão. os ELSEIF fornecem um métodos mais conveniente para verificar muitas alternativas em uma instrução. Formalmente equivale aos comandos IF-THEN-ELSE-IF-THEN aninhados, mas somente necessita de um END, que serve para fechar o nosso "IF" Créditos Skyligh 90 % ( pela criação e postagem ) MrCarta 10 % ( pelo pedido do tutorial )
  5. duvida sanada reportado Para um superior
  6. Veja esse http://www.xtibia.com/forum/topic/189017-anti-account-manager-mage-bomb-crash/
  7. local FOODS = { ITEM_FOOD_MEAT, ITEM_HAM, ITEM_FOOD_GRAPE, ITEM_FOOD_APLE, ITEM_FOOD_BREAD, ITEM_FOOD_ROOL, ITEM_FOOD_CHEESE } function onCastSpell(cid, var) local size = table.maxn(FOODS) if (doPlayerAddItem(cid, FOODS[math.random(1, size)])) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) return false end if(math.random(1, 100) > 50) then doPlayerAddItem(cid, FOODS[math.random(1, size)]) end doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_GREEN) return true end
  8. SkyLigh

    Anti Magebomb

    http://www.xtibia.com/forum/topic/145582-anti-mass-login-anti-mage-bomb-860/
  9. use assim. local greatHealthPot = 7591 local greatManaPot = 7590 local strongHealthPot = 7588 local strongManaPot = 7589 local healthPot = 7618 local manaPot = 7620 local greatEmptyPot = 7635 local strongEmptyPot = 7634 local config={ removeOnUse = "no" -- remover quando usar ("yes" or "no") } function onUse(cid, item, frompos, item2, topos) if(item.itemid == healthPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 170, 230, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, emptyPot) elseif(item.itemid == manaPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatMana(0, cid, 170, 230, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, strongHealthPot) elseif(item.itemid == strongHealthPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 300, 500, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, strongEmptyPot) elseif(item.itemid == strongManaPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatMana(0, cid, 300, 500, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, greatHealthPot) elseif(item.itemid == greatHealthPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 500, 800, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end doTransformItem(item.uid, greatEmptyPot) elseif(item.itemid == greatManaPot) then doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE) if(doTargetCombatMana(0, cid, 500, 800, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then return FALSE end noTransformItem (item.uid, greatEmptyPot) return TRUE end if (config.removeOnUse == "no") then doRemoveItem(item.uid, 1) end end
  10. @CLEBERADM você posto o mesmo script do tópico ! tente assim . local bless = {1, 2, 3, 4, 5} local cost = 80000 function onSay(cid, words, param) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless[i])) then doPlayerSendCancel(cid, "Voceja tem todas as bless.") return TRUE end end if(doPlayerRemoveMoney(cid, cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doCreatureSay(cid, "You are now blessed!" ,19) doSendMagicEffect(getPlayerPosition(cid), 49) else doPlayerSendCancel(cid, "Voce precisa de 80k para a bless.") end return TRUE end
  11. va em data / talkactions / scripts / e procure por buypremium.lua
  12. Kamikashi reportado por flood e double post !
  13. SkyLigh

    Npc

    veja este tópico http://www.xtibia.com/forum/topic/190442-npc-guild-master/
  14. Pesquisas no google sempre sao boas
  15. SkyLigh

    Npc

    http://www.xtibia.com/forum/topic/103483-npc-guild-master-antigo/
  16. O Problema não e esse e que você não configuro aonde ele vai nascer vai na sua sql / aba players / data / e poem o mouse emcima do nome acc manager e clicka / dps clicka em form view / ai você vai descendo vai ter isso posx , posy , posz , ai la se poem as pos de onde ele vai nascer
  17. http://www.xtibia.com/forum/topic/197139-pedido-task-system-diferente/ Creio que funcione ! Não e necessário esse tipo de post
  18. SkyLigh

    Frags

    duvida sanada reportado Para um superior
  19. SkyLigh

    Frags

    Pronto . accountManager = yes namelockManager = true newPlayerChooseVoc = true newPlayerSpawnPosX = 160 newPlayerSpawnPosY = 54 newPlayerSpawnPosZ = 7 newPlayerTownId = 1 newPlayerLevel = 10 newPlayerMagicLevel = 0 generateAccountNumber = false generateAccountSalt = false paralyzeDelay = 1400 reportExhausted = 30 * 60 useFragHandler = true redSkullLength = 1 * 24 * 60 * 60 blackSkullLength = 2 * 24 * 60 * 60 dailyFragsToRedSkull = 36 weeklyFragsToRedSkull = 72 monthlyFragsToRedSkull = 108 dailyFragsToBlackSkull = 66 weeklyFragsToBlackSkull = 132 monthlyFragsToBlackSkull = 198 dailyFragsToBanishment = dailyFragsToRedSkull weeklyFragsToBanishment = weeklyFragsToRedSkull monthlyFragsToBanishment = monthlyFragsToRedSkull blackSkulledDeathHealth = 40 blackSkulledDeathMana = 0 useBlackSkull = true advancedFragList = false notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 7 * 24 * 60 * 60 killsBanLength = 7 * 24 * 60 * 60 finalBanLength = 30 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false worldType = "open" protectionLevel = 50 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 25 * 85 huntingDuration = 60 * 500 criticalHitChance = 7 criticalHitMultiplier = 1 displayCriticalHitNotify = false removeWeaponAmmunition = false removeWeaponCharges = true removeRuneCharges = false whiteSkullTime = 5 * 60 * 1000 noDamageToSameLookfeet = false showHealingDamage = false showHealingDamageForMonsters = false fieldOwnershipDuration = 5 * 1000 stopAttackingAtExit = false loginProtectionPeriod = 10 * 1000 deathLostPercent = 10 stairhopDelay = 2 * 1000 pushCreatureDelay = 2 * 1 deathContainerId = 1987 gainExperienceColor = 215 addManaSpentInPvPZone = true squareColor = 0 allowFightback = true fistBaseAttack = 7 worldId = 0 ip = "segredo" bindOnlyGlobalAddress = false loginPort = 7171 gamePort = 7172 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 1000 motd = "Welcome to Fortress baiak Ot !" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = true allowClones = false serverName = "Fortress" loginMessage = "Welcome to Fortress baiak !" statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false rsaPrime1 = "14299623962416399520070177382898895550795403345466153217470516082934737582776038882967213386204600674145392845853859217990626450972452084065728686565928113" rsaPrime2 = "7630979195970404721891201847792002125535401292779123937207447574596692788513647179235335529307251350570728407373705564708871762033017096809910315212884101" rsaPublic = "65537" rsaModulus = "109120132967399429278860960508995541528237502902798129123468757937266291492576446330739696001110603907230888610072655818825358503429057592827629436413108566029093628212635953836686562675849720620786279431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978566631413" rsaPrivate = "46730330223584118622160180015036832148732986808519344675210555262940258739805766860224610646919605860206328024326703361630109888417839241959507572247284807035235569619173792292786907845791904955103601652822519121908367187885509270025388641700821735345222087940578381210879116823013776808975766851829020659073" sqlType = "segredo" sqlHost = "segredo" sqlPort = segredo sqlUser = "segredo" sqlPass = "segredo" sqlDatabase = "segredo" sqlFile = "segredo" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "plain" deathListEnabled = true deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 5 ingameGuildManagement = true levelToFormGuild = 150 premiumDaysToFormGuild = 0 guildNameMinLength = 4 guildNameMaxLength = 20 highscoreDisplayPlayers = 15 updateHighscoresAfterMinutes = 60 buyableAndSellableHouses = true houseNeedPremium = false bedsRequirePremium = false levelToBuyHouse = 150 housesPerAccount = 0 houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 1000 houseRentPeriod = "never" houseCleanOld = 0 guildHalls = false timeBetweenActions = 200 timeBetweenExActions = 1000 hotkeyAimbotEnabled = true mapName = "Baiak Yurots.otbm" mapAuthor = "Equipe Fortress" randomizeTiles = true storeTrash = true cleanProtectedZones = true mailboxDisabledTowns = "" defaultPriority = "high" niceLevel = 5 coresUsed = "-1" startupDatabaseOptimization = false updatePremiumStateAtStartup = true confirmOutdatedVersion = false formulaLevel = 5.0 formulaMagic = 1.0 bufferMutedOnSpellFailure = false spellNameInsteadOfWords = false emoteSpells = false unifiedSpells = true allowChangeOutfit = true allowChangeColors = true allowChangeAddons = true disableOutfitsForPrivilegedPlayers = false addonsOnlyPremium = false dataDirectory = "data/" logsDirectory = "data/logs/" bankSystem = true displaySkillLevelOnAdvance = true promptExceptionTracerErrorBox = true maximumDoorLevel = 500 maxMessageBuffer = 4 tradeLimit = 100 separateVipListPerCharacter = false vipListDefaultLimit = 20 vipListDefaultPremiumLimit = 100 saveGlobalStorage = true useHouseDataStorage = false storePlayerDirection = false checkCorpseOwner = true monsterLootMessage = 3 monsterLootMessageType = 25 ghostModeInvisibleEffect = false ghostModeSpellEffects = true idleWarningTime = 200 * 200 * 1000 idleKickTime = 200 * 200 * 1000 reportsExpirationAfterReads = 1 playerQueryDeepness = 2 tileLimit = 0 protectionTileLimit = 0 houseTileLimit = 0 freePremium = false premiumForPromotion = false blessings = true blessingOnlyPremium = false blessingReductionBase = 30 blessingReductionDecrement = 5 eachBlessReduction = 8 experienceStages = true rateExperience = 350 rateExperienceFromPlayers = 0 rateSkill = 100 rateMagic = 80 rateLoot = 3 rateSpawn = 1 rateMonsterHealth = 1.0 rateMonsterMana = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 40 * 60 staminaRatingLimitBottom = 14 * 60 staminaLootLimit = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = false experienceShareRadiusX = 30 experienceShareRadiusY = 30 experienceShareRadiusZ = 1 experienceShareLevelDifference = 2 / 3 extraPartyExperienceLimit = 20 extraPartyExperiencePercent = 5 experienceShareActivity = 2 * 60 * 1000 globalSaveEnabled = false globalSaveHour = 8 globalSaveMinute = 0 shutdownAtGlobalSave = true cleanMapAtGlobalSave = false deSpawnRange = 2 deSpawnRadius = 50 maxPlayerSummons = 2 teleportAllSummons = false teleportPlayerSummons = false statusPort = 7171 ownerName = "Fortress" ownerEmail = "" url = "" location = "Brasil" displayGamemastersWithOnlineCommand = false displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outputLog = "" truncateLogOnStartup = false managerPort = 7171 managerLogs = true managerPassword = "" managerLocalhostOnly = true managerConnectionsLimit = 1 adminPort = 7171 adminLogs = true adminPassword = "" adminLocalhostOnly = true adminConnectionsLimit = 1 adminRequireLogin = true adminEncryption = "" adminEncryptionData = ""
  20. SkyLigh

    Frags

    posta o seu config.lua todo que so com essa parte n da pra configurar tudo.
  21. Local incorreto reportado Para um superior Certo seria em pedidos e duvidas de scripting.
  22. Duvida sanada reportado Para um superior
  23. SkyLigh

    Script Quest Vip

    o da quest http://www.xtibia.com/forum/topic/190384-vip-345-ajudem/ o script da action utilize assim function onUse(cid, item, frompos, item2, topos) if item.uid ==7522 then -- Aki e o uniqueid que fica no actions.xml sempre mude se for criar outra queststatus = getPlayerStorageValue(cid,7527) -- Aki Ponhe a mesma storage la de baixo if queststatus == 1 then doPlayerSendTextMessage(cid,22,"Msg de quando ja ter pego a vip e o item.") else doPlayerSendTextMessage(cid,22,"MSG DE QUANDO VIRAR VIP.") doSendMagicEffect(topos,35) coins_uid = doPlayerAddItem(cid,2160,100) -- Id do item que vai adicionar e a quantidade setPlayerStorageValue(cid,7527,1) -- Aki e A Storage da vip so mude aki se vo criar outra vip db.executeQuery("UPDATE `players` SET `name` = '(VIP)"..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") end return 0 end return 1 end
  24. Esta ótimo para iniciante em script vai em frente que você vai alto REPUTADO.
  25. duvida sanada reportado Para um superior
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...