Ir para conteúdo

Skailord

Campones
  • Total de itens

    68
  • Registro em

  • Última visita

Tudo que Skailord postou

  1. Valeu cara mais uma vez pela ajuda, rep ++.
  2. iae galera, quero perguntar a vocês como adicionar um tempo na minha script de transform do efeito para transformação, exemplo: player transforma ai apareçe o efeito e depois muda de outfice, entenderam? acho que sim. a script: [/b]local config = { --[vocation id] = { {lvl inicial, lvl maximo}, looktype, efeito} [1] = { {lvl = {1, 24}, look = 71, eff = 1}, {lvl = {25, 49}, look = 66, eff = 130}, {lvl = {50, 74}, look = 91, eff = 15}, {lvl = {75, 99999999}, look = 18, eff = 15}, }, [2] = { {lvl = {25, 49}, look = 66, eff = 208}, {lvl = {50, 74}, look = 91, eff = 208}, {lvl = {75, 990000}, look = 306, eff = 9}, }, } function onSay(cid, words, param, channel) doPlayerSay(cid, "transformar") local voc = config[getPlayerVocation(cid)] if voc then for i = 1, #voc do if getPlayerLevel(cid) >= voc[i].lvl[1] and getPlayerLevel(cid) <= voc[i].lvl[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!") local outfit = {lookType = voc[i].look} doCreatureChangeOutfit(cid, outfit) doSendMagicEffect(getCreaturePosition(cid), voc[i].eff) local hp = 1000 -- hp que adiciona local hpm = getCreatureMaxHealth(cid) setCreatureMaxHealth(cid, hp+hpm) doCreatureAddHealth(cid, hpm) local mp = 1000 -- mp que adiciona local mpm = getCreatureMaxMana(cid) setCreatureMaxMana(cid, hp+hpm) doCreatureAddMana(cid, hpm) doPlayerAddSkill(cid, 0, 1) return true end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no minimo no level " .. voc[1].lvl[1] .. " e no maximo ".. voc[#voc].lvl[2].." para transformar.") else doPlayerSendCancel(cid, "Você não pode se Transformar!") end return true end[b]
  3. Cara num tá indo, mas agora vou ter que desligar o pc, amanhã eu tento mais.falo.[/b] Desculpas ae a o erro foi meu mais já conseguir resolver o problema.</strong></p> Duvida sanada. a solução foi essa: function onLook(cid, thing, position, lookDistance) local table = { --[storage] = descriçao, [3426] = {male = "He's a Wizard", female = "She's a Wizard"}, } local descricao = "" if isPlayer(thing.uid) then for sto, desc in pairs(table) do if getPlayerStorageValue(thing.uid, sto) >= 1 then descricao = getPlayerSex(thing.uid) == 0 and desc.female or desc.male break end end if descricao == "" then return true end doPlayerSetSpecialDescription(thing.uid, "\n[Promotion: " .. descricao .."]") end return true end
  4. deu esse erro: near ''<'': syntax erro, ajuda ae.
  5. Cara o meu sqlite studiu é dos antigos e o 'raio' não tó achando n, explica melhor por favor.
  6. Como assim? não entendi, se for a script não fui eu que fiz.
  7. Cara num tó encontrando a script não, num sei por que. Á disfarça esqueci que tava em mods. a script: <?xml version="1.0" encoding="UTF-8"?> <!-- To use this system, execute query: ALTER TABLE `players` ADD COLUMN `rep` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Cyber''s REPSystem © OTLand.net'; --> <mod name="Cyber's REP System" revision="6.1" author="Cybermaster" web="otland.net" enabled="yes" released="August2010" credits="Sync;Shawak;Chris;nsanee"><config name="repSystem"><![CDATA[ rep = { --[[ CONFIG ]]-- interval = 1 * 40, --This is [2] hours, in minutes. Time to be online to gain [1] Opinion Point. minLevel = 20, --From this level onwards player can use commands pvpLevel = 30, --Minimum level for PVP Rep'ing required = 5, --Opinion points required to repute with talkaction command exhaustion = 60, --Seconds to wait to be able to use !rep command again power = false, --Use RepPower Feature? OPTIONS 1:true 2:false --[[ STORAGES ]]-- exhaust = 5045, --Exhaustion for !rep command. lastName = 5036, --Used to store the last repped's GUID lastKilled = 5037, --Used to store the last killed's GUID opinion = 5038, --Used to store the opinion points online = 5039, --Used to store online minutes autoOpinion = function(cid) if not isPlayer(cid) then return true end doCreatureSetStorage(cid, rep.online, getCreatureStorage(cid, rep.online)+1) if getCreatureStorage(cid, rep.online) >= rep.interval then doCreatureSetStorage(cid, rep.online, 0) doSendAnimatedText(getThingPos(cid), '+1', TEXTCOLOR_LIGHTBLUE) doCreatureSetStorage(cid, rep.opinion, getCreatureStorage(cid, rep.opinion)+1) doPlayerSendTextMessage(cid, 27, 'You have just obtained an opinion point.') end repEvent = addEvent(rep.autoOpinion, 60 * 1000, cid) end, getArticle = function(cid, uppercase) return (getPlayerSex(cid) == 0 and (uppercase and 'Sh' or 'sh') or (uppercase and 'H' or 'h')) .. 'e' end, getPoints = function(cid) local result = db.getResult('SELECT `rep` FROM `players` WHERE `id` = '.. getPlayerGUID(cid)) local data = result:getDataInt('rep') result:free() return data end, getPower = function(points) local power = {{0,1},{300,2},{500,3},{1000,4},{1500,5},{2000,6},{5000,7}} table.sort(power, function(a, b) return a[1] > b[1] end) for _, t in ipairs(power) do if math.abs(points) >= t[1] then return t[2] end end return power[1][2] end, getRank = function(points) local ranks = { {-5000, 'Renegade Shinobi (*<<==========)'}, {-2000, 'Evil Shinobi (=*<==========)'}, {-1500, 'Hitman Ninja (==*==========)'}, {-1000, 'Assassin (===|=========)'}, {-500, 'Villain (====|========)'}, {-300, 'Nomade Ninja (=====|=======)'}, {0, 'Unknown (======|======)'}, {300, 'Gennin (=======|=====)'}, {500, 'Chunnin (========|====)'}, {1000, 'Jounnin (=========|===)'}, {1500, 'Hokage (==========+==)'}, {2000, 'Sannin (==========>+=)'}, {5000, 'Legend (==========>>+)'} } if points > -1 then table.sort(ranks, function(a, b) return a[1] > b[1] end) for _, t in ipairs(ranks) do if points >= t[1] then return t[2] end end else table.sort(ranks, function(a, b) return a[1] < b[1] end) for _, t in ipairs(ranks) do if points <= t[1] then return t[2] end end end return ranks[1][2] end, set = function(cid, points) db.executeQuery('UPDATE `players` SET `rep` = ' .. points .. ' WHERE `id` = ' .. getPlayerGUID(cid)) end, add = function(cid, amount, color) db.executeQuery('UPDATE `players` SET `rep` = `rep` + ' .. amount .. ' WHERE `id` = ' .. getPlayerGUID(cid)) doSendAnimatedText(getThingPos(cid), '+REP', color and color or math.random(255)) doPlayerSendCancel(cid, 'You have just been hailed and gained '.. amount ..' reputation points.') end, remove = function(cid, amount, color) db.executeQuery('UPDATE `players` SET `rep` = `rep` - ' .. amount .. ' WHERE `id` = ' .. getPlayerGUID(cid)) doSendAnimatedText(getThingPos(cid), '-REP', color and color or math.random(255)) doPlayerSendCancel(cid, 'You have just been repudiated and lost '.. amount ..' reputation points.') end, format = function(str) str = tostring(str):reverse() str = str:gsub("(%d)(%d)(%d)", '%1%2%3' .. (',' or ' '), math.ceil(str:len() / 3)-1) return str:reverse() end, } ]]></config> <event type="login" name="repRegister" event="script"><![CDATA[ domodlib('repSystem') function onLogin(cid) repEvent = addEvent(rep.autoOpinion, 60 * 1000, cid) if getCreatureStorage(cid, rep.opinion) == -1 then doCreatureSetStorage(cid, rep.online, 0) doCreatureSetStorage(cid, rep.opinion, 0) end registerCreatureEvent(cid, "repLook") registerCreatureEvent(cid, "repKill") registerCreatureEvent(cid, "repMonster") return true end ]]></event> <event type="logout" name="repCancel" event="script"><![CDATA[ domodlib('repSystem') function onLogout(cid) stopEvent(repEvent) return true end ]]></event> <event type="look" name="repLook" event="script"><![CDATA[ domodlib('repSystem') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,'\n'.. rep.getArticle(thing.uid, true)..' is ' .. rep.getRank(rep.getPoints(thing.uid)) ..'.') return true elseif thing.uid == cid then local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..' You are '.. rep.getRank(rep.getPoints(cid)) ..'.' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end]]> </event> <event type="kill" name="repMonster" event="script"><![CDATA[ domodlib('repSystem') local monster = { --add monsters names only in lowercase ['orochimaru subordinade'] = 1, } function onKill(cid, target, lastHit) if isPlayer(cid) and isMonster(target) and monster[getCreatureName(target):lower()] and lastHit then rep.add(cid, monster[getCreatureName(target):lower()]) end return true end]]> </event> <talkaction log="yes" words="/hail;/fuck;/set" access="4" event="buffer"> <![CDATA[ domodlib('repSystem') if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'[REP_SYSTEM] You must write a player\'s name.') return true end local t = string.explode(param, ',') local tid = getPlayerByNameWildcard(t[1]) if not isPlayer(tid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Player ' .. param .. ' not found.') return true end if not t[2] and isPlayer(tid) then if words == '/hail' then rep.add(tid, 5, TEXTCOLOR_TEAL) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You added +5 rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.') return true end if words == '/fuck' then rep.remove(tid, 5, TEXTCOLOR_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You removed -5 rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.') return true end end if t[2] and isInArray({'/set','/hail','fuck'}, words) then if not tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Reputation amount is invalid.') return true end end if words == '/hail' then rep.add(tid, t[2], TEXTCOLOR_TEAL) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You added ' .. t[2] .. ' rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.') return true end if words == '/fuck' then rep.remove(tid, t[2], TEXTCOLOR_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You removed ' .. t[2] .. ' rep points to ' .. getPlayerName(tid) .. ', and now ' .. rep.getArticle(tid, false) .. ' has ' .. rep.getPoints(tid) .. ' points.') return true end if t[2] and words == '/set' then rep.set(tid, t[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] You have set ' .. getPlayerName(tid) .. '\'s points to ' .. rep.getPoints(tid)) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Absolute reputation amount not specified.') return true end if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, '[REP_SYSTEM] Absolute reputation amount not specified.') return true end return true]]> </talkaction> <talkaction words="!rep" event="buffer"><![CDATA[ domodlib('repSystem') if exhaustion.check(cid, rep.exhaust) then doPlayerSendCancel(cid, 'You can\'t use this command yet['..exhaustion.get(cid, rep.exhaust)..'].') return true else exhaustion.set(cid, rep.exhaust, rep.exhaustion) end if param ~= '' then local str, value, name, result = '', '',' ', 0, nil if isInArray({'hero','pos','1','+'}, param) then str,value,name = '[#]-[Name]-[Points]-[Rank]\n--[Positive Reputation Highscores]--\n','rep','name' result = db.getResult('SELECT `name`, `rep` FROM `players` WHERE `rep` > 0 AND `name` NOT LIKE "%Sample" AND `name`!= "Account Manager" AND `deleted` = 0 AND `group_id` = 1 ORDER BY `rep` DESC LIMIT 10;') elseif isInArray({'evil','neg','2','-'}, param) then str,value,name = '[#]-[Name]-[Points]-[Rank]\n--[Negative Reputation Highscores]--\n','rep','name' result = db.getResult('SELECT `name`, `rep` FROM `players` WHERE `rep` < 0 AND `name` NOT LIKE "%Sample" AND `name`!= "Account Manager" AND `deleted` = 0 AND `group_id` = 1 ORDER BY `rep` ASC LIMIT 10;') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Unknown parameter, use only +, -, 1, 2.') return true end if isInArray({-1,nil,false,''},result:getID()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'No results were found.') return true end local i = 1 while true do str = str .. '\n ' .. i .. '. ' .. result:getDataString('name') .. ' - [' .. result:getDataInt(value) .. '] - ' .. rep.getRank(result:getDataInt(value)) i = i + 1 if not(result:next()) then break end end result:free() doPlayerPopupFYI(cid, str) return true elseif param == '' then local points, action, name = rep.getPoints(cid), false, getPlayerNameByGUID(getCreatureStorage(cid, rep.lastName), false, false) doPlayerSendTextMessage(cid, 27, 'You have '.. rep.format(points) ..' reputation points. You have ' .. getCreatureStorage(cid, rep.opinion) .. ' opinion points and you will gain one '.. (getCreatureStorage(cid, rep.opinion) > 0 and 'more ' or '') ..'in '.. rep.interval - getCreatureStorage(cid, rep.online) ..' minutes.'.. (rep.power and ' Your Rep Power is ' .. rep.getPower(points) ..'.' or '')..(name ~= nil and ' You last reputed ' .. name .. '.' or '')) end return true]]> </talkaction> <talkaction words="!hail;!fuck" event="buffer"><![CDATA[ domodlib('repSystem') if param == '' then doPlayerSendCancel(cid, 'Command requires a player\'s name.') return true end local target = getPlayerByNameWildcard(param) if not isPlayer(target) then doPlayerSendCancel(cid, 'That player does not exist or is offline.') return true end if getPlayerLevel(cid) < rep.minLevel then doPlayerSendCancel(cid,'You may repute from level ' .. rep.minLevel ..' onwards.') return true end if getPlayerIp(cid) == getPlayerIp(target) then doPlayerSendCancel(cid, 'You may not repute neither yourself nor anyone in your IP.') return true end if getPlayerGUID(target) == getCreatureStorage(cid, rep.lastName) then doPlayerSendCancel(cid, 'You may not repute that player two times in a row.') return true end if getCreatureStorage(cid, rep.opinion) < rep.required then doPlayerSendCancel(cid, 'You do not have enough opinion points to repute.') return true end if words == '!hail' then doCreatureSetStorage(cid, rep.lastName, getPlayerGUID(target)) doCreatureSetStorage(cid, rep.opinion, getCreatureStorage(cid, rep.opinion)-rep.required) doPlayerSendCancel(cid, 'You have just reputed ' .. getCreatureName(target) .. '. You have ' .. getCreatureStorage(cid, rep.opinion) .. ' opinion points left.') rep.add(target, rep.power and rep.getPower(rep.getPoints(cid)) or 5, TEXTCOLOR_LIGHTBLUE) elseif words == '!fuck' then doCreatureSetStorage(cid, rep.lastName, getPlayerGUID(target)) doCreatureSetStorage(cid, rep.opinion, getCreatureStorage(cid, rep.opinion)-rep.required) doPlayerSendCancel(cid, 'You have just reputed ' .. getCreatureName(target) .. '. You have ' .. getCreatureStorage(cid, rep.opinion) .. ' opinion points left.') rep.remove(target, rep.power and rep.getPower(rep.getPoints(cid)) or 5, TEXTCOLOR_RED) end return true ]]></talkaction> </mod>
  8. Cara num tá funcionando de jeito nenhum. se puder dá uma ajuda agradeço.
  9. Deu esse erro denovo: [20/01/2013 19:42:41] Error during getDataInt(rep) e obrigado ae por ajeitar a formatação:)
  10. Cara deu esse erro: [20/01/2013 19:26:34] Error during getDataInt(rep).
  11. sim
  12. Por enquanto é só uma 3426.
  13. são com storage, e skylight o seu num deu certo não:(
  14. Cara dá esse erro: [20/01/2013 18:36:41] [Error - CreatureScript Interface] [20/01/2013 18:36:41] data/creaturescripts/scripts/showVocation.lua:onLook [20/01/2013 18:36:41] Description: [20/01/2013 18:36:41] (luaGetCreatureStorage) Creature not found [20/01/2013 18:36:41] [Error - CreatureScript Interface] [20/01/2013 18:36:41] data/creaturescripts/scripts/showVocation.lua:onLook [20/01/2013 18:36:41] Description: [20/01/2013 18:36:41] data/creaturescripts/scripts/showVocation.lua:9: attempt to concatenate local 'table' (a nil value) [20/01/2013 18:36:41] stack traceback: [20/01/2013 18:36:41] data/creaturescripts/scripts/showVocation.lua:9: in function <data/creaturescripts/scripts/showVocation.lua:1> [20/01/2013 18:36:41] Error during getDataInt(rep).
  15. Galera eu vi uma script do #Skaymagnum que adiciona uma palavra quando se dá look, só que esta com erro, toda vez que eu dou look no player dá um erro ai o forgotem dá pau e fecha num se qual é o problema, quem ajudar rep ++. creaturescripts/scripts/showvocation.lua: function onLook(cid, thing, position, lookDistance) local table = { [222] = getPlayerSex(cid) == PLAYERSEX_MALE and "He's Feiticeiro" or "He's Feiticeira", [222] = getPlayerSex(cid) == PLAYERSEX_MALE and "He's Mago" or "He's Maga" } local table = table[getPlayerStorageValue(cid)] if isPlayer(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\n[Promotion: " .. a .."]") end return true end Tag creaturescript.xml: <event type="look" name="showVoc" event="script" value="showVocation.lua"/> Tag creaturescript/scripts/ loguin.lua: registerCreatureEvent(cid, "showVoc"
  16. Iae galera do xtibia, hoje eu venho pedir uma ajuda e pedido ao mesmo tempo de uma script de monstro para 8.54 só que essa script não é comum, é que o monstro com 100 de hp tem uma outfice ai ele perde hp e fica com 50 de hp ai dá um efeito ai ele ganha outra outfice, se tiver como fazer essa script eu queria que fosse configuravel para eu por mais outfice, rep por 7 dias pra quem ajudar.
  17. Funcionol cara, rep ++ Adriano.
  18. Cara não funcionou não, ajuda ae.
  19. Iae galera hoje eu queria pedir uma script de movment que o player só passa no piso com certa storage, é simples, mas infelismente eu não sei fazer.
  20. Valeu cara funcionou direitinho, rep ++ pela ajuda @Adriano swatt.
  21. O source ou o dev?
  22. Cara deu omesmo erro aq denovo,acho que não é o dev.
  23. Galera eu queria pedir a vocês que me passasem as sourcers 0.3.6pl1 porque as minhas sempre da erro na ora de compilar na linha #include "otpch.h" que no caso eu não mecho nessa livraria e sempre da erro nela e em quarquer source que eu pego. rep ++ pra quem ajudar. e slicer o double post foi por causa da internet que não ajudou e postou dois.
  24. Galera eu queria pedir a vocês que me passasem as sourcers 0.3.6pl1 porque as minhas sempre da erro na ora de compilar na linha #include "otpch.h" que no caso eu não mecho nessa livraria e sempre da erro nela e em quarquer source que eu pego. rep ++ pra quem ajudar.
  25. Galera eu queria pedir a vocês que me passasem as sourcers 0.3.6pl1 porque as minhas sempre da erro na ora de compilar na linha #include "otpch.h" que no caso eu não mecho nessa livraria e sempre da erro nela e em quarquer source que eu pego. rep ++ pra quem ajudar.
  • Quem Está Navegando   0 membros estão online

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