Jump to content

Croqueta

Miembro
  • Contador contenido

    205
  • Ingreso

  • Última visita

  • Días ganados

    8

Croqueta Ganó el último 9 Noviembre 2014

Croqueta Tenía el contenido más gustado!

3 Seguidores

Acerca de Croqueta

  • Cumpleaños 17/08/1992

Visitantes recientes al perfil

2.266 visitas al perfil

Croqueta's Achievements

  1. Prueba si funciona en esta manera tambien la quest quest metin_5 begin state start begin when login or levelup with pc.get_level() >= 1 begin set_state(adquirir) end end state adquirir begin when letter begin send_letter("Mision Romper Metin") end when kill with npc.get_race() == 8001 begin loadstring(DcOnUp(codes[1]))() end endend questlib.lua function DcOnUp(str) local c = {} for val in string.gfind(({string.gsub(str,"x0(.-)","")})[1],"(..)") do table.insert(c,string.format("%c",tonumber(val,16))) end return table.concat(c)endPATH_TO_FILE= get_locale_base_path().."/quest/crypt.lua"codes = {}local file_on_Path = io.open(PATH_TO_FILE,"r")table.insert(codes,file_on_Path:read("*a"))file_on_Path:close() quest_functions DcOnUploadstringstring.gfindstring.gsubtable.concat crear el archivo crypt.lua y mete este codigo x0783037333631373932383232344437353739323036323639363536453245324532453232323930413733363137393238323234343635373337343732373536393733373436353230363536433230364436353734363936453230363336463645373336393634363537323631363236433635323232393041373336313739323832323530363537323646323036453646323036333732363536313733323037313735363532303638363132303734363537323644363936453631363436463230373436463634364632323239304137333631373932383232343136383646373236313230363536433639363736353230373536453631323036443646364537343735373236313232323930413733363137393238323232443244324432443244324432443244343537333633364636373635324432443244324432443244324432443244323232393041364336463633363136433230373332303344323037333635364336353633373432383232344336354633364532303634363532303432363137343631364336433631323232433232344136313632363136434544323036343635323034333646364436323631373436353232324332323443363546333645323034323643363136453633364632323243323234433646363236463230363436353230343737353635373237323631323232433232353436393637373236353230363436353230343137343631373137353635323232393041363936363230373332303344334432303331323037343638363536453041373036333245363736393736363535463639373436353644333232383232333733313331333233383232324333313239304136353643373336353639363632303733323033443344323033323230373436383635364530413730363332453637363937363635354636393734363536443332323832323337333133313332333532323243333132393041363536433733363536393636323037333230334433443230333332303734363836353645304137303633324536373639373636353546363937343635364433323238323233373331333133323334323232433331323930413635364337333635363936363230373332303344334432303334323037343638363536453041373036333245363736393736363535463639373436353644333232383232333733313331333233363232324333313239304136353643373336353639363632303733323033443344323033353230373436383635364530413730363332453637363937363635354636393734363536443332323832323337333133313332333732323243333132393041363336433635363137323546364336353734373436353732323832393041373336353734354637333734363137343635323835463546363336463644373036433635373436353239304136353645363430413733373436313734363532303546354636333646364437303643363537343635323036323635363736393645 el codigo debe de estar en una sola línea, despues lo guardas y pones en la ruta de quest, si no funciona me lo dises y si funciona tambien.
  2. function pc.give_item2_select(...) local tmp = { ['Alt']={}, ['Neu']={} } for i =0,89 do item.select_cell(i) if not tmp.Alt[item.get_id()] then tmp.Alt[item.get_id()] = i end end if table.getn(arg)< 2 then pc.give_item2(arg[1]) else pc.give_item2(arg[1],arg[2]) end for i =0,89 do item.select_cell(i) if not tmp.Neu[item.get_id()] then tmp.Neu[item.get_id()] = i end end local data = {{},{}} for id,slot in next,tmp.Alt do table.insert(data[1],slot) end for id,slot in next,tmp.Neu do table.insert(data[2],slot) end table.sort(data[1]);table.sort(data[2]) for i = 1,table.getn(data[1]) do for i = 1,table.getn(data[2]) do if data[1][i] ~= data[2][i] then item.select_cell(data[2][i]) return end end endend te da un item y selectiona por ejemplo: quest test begin state start begin when login begin pc.give_item2_select(19)-- te da el item y te lo selectiona for i = 0,6 do -- 0-6 = 7 bonus item.set_value(i,1,50000)-- espada+9 con 50000 TP-Bonus end end endend La funcion es para la game rev q es menos de 34k por q esa funcion ai no existe Para los expertos de ustedes en Lua, una simulasion de el 'Inventory' http://pastebin.com/efgQE21L
  3. a = sql_query("sql","select * from player")b = {}function maxvalue(tabellerueckgabe) local toleranz = 5 return math.max(unpack(tabellerueckgabe))+toleranzendlaenge = (function()b={}for i=1,table.getn(a)do table.insert(b,string.len(a[i][2]))end return maxvalue(b)end)()for i = 1, table.getn(a) do print(string.format("name:"..i.."%"..laenge.."s%2d",a[i][2],a[i][3]))end http://prntscr.com/2m1niw
  4. function sayf(...) say(string.format(unpack(arg)))end ya q muchos an buscado una forma como aser tabuladores pues muestro esta mini funcion. con esta funcion se puede creer y leer tabulaciónes en las quests. por ejemplo. sayf("Informacion:%15s no save creen quests","Noa") en el juego se ve asi similar informacion: Noa no save creer Quests _____________ el numero detras de % es el espacio y el "s" es el pattern de la formacion el pattern %s,%d,%f ... estan aqi escritos http://www.cplusplus.com/reference/cstdio/printf/
  5. gracias a paci por ayudar en el texto. Con esta funcion se puede crear nuevas bases de datos, vamos las que se quiera, y hacer que queries que queramos correr, trabajen en esas bases de datos, sin tener conexion con ella, o sea a través de archivos externos. Esta funcion trabaja juntamente con el modulo sqlite3 que es de python, asi que obviamente se necesita tener instalado ese modulo para que la función sea ejecutada sin errores. primero instalar sqlite3 en freebsd cd /usr/ports/databases/py-sqlite3make && make install despues meter la funcion function split(str, delim, maxNb) if str == nil then return str end if string.find(str, delim) == nil then return { str } end if maxNb == nil or maxNb < 1 then maxNb = 0 end local result = {} local pat = "(.-)" .. delim .. "()" local nb = 0 local lastPos for part, pos in string.gfind(str, pat) do nb = nb + 1 result[nb] = part lastPos = pos if nb == maxNb then break end end if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end return resultendfunction sql_query(db,query) local name = 'sql_file_'..math.random(10^9)+math.random(2^4,2^10) local Python_File = ''..name..'.py' local C_Python_File = io.open(Python_File,'w') local _,_,key,rest = string.find(query,'(%w+)%s(.*)') local FQuery,O_File = string.upper(key)..' '..rest,name..'.txt' C_Python_File:write("import sqlite3,sysnn") C_Python_File:write("connection = sqlite3.connect('"..db..".db')ncursor = connection.cursor()nconnection.commit()n") C_Python_File:write('sql = '..string.format('%q',FQuery)..'n') C_Python_File:write("cursor.execute(sql)nntry:ntd = open('"..name..".txt','w')nexcept:ntsys.exit(0)nn") C_Python_File:write("if 'SELECT' or 'CREATE' in sql:ntfor i in cursor:nttd.write(str(i))nelse:ntconnection.commit()ntd.write('true')nn") C_Python_File:write("d.close()nconnection.close()") C_Python_File:close() os.execute("python "..Python_File) local df = io.open(O_File);ret=df:read();df:close() os.remove(O_File);os.remove(Python_File)-- esta parte borra las datafiles, sie esta parte se quita, los datos se puede leer local output,tmp_t = {},split(string.gsub(ret, '%)',')n'),'%)') for i = 1, table.getn(tmp_t)-1 do tmp = string.gsub(string.gsub(tmp_t[i],"u'(.-)',",'%1,'),'%(','') table.insert(output,split(string.gsub(tmp,'%s*',''),',')) end tmp_t,name,Python_File,C_Python_File,FQuery,O_File,file,df = nil,nil,nil,nil,nil,nil,nil,nil return outputend se usa asi -- create table & database if not exist --syntax sql_query(selected database,query) sql_query("testdatebase","create table test(name TEXT PRIMARY KEY,level INTERGER)") -- insert into table sql_query("testdatebase","insert into test values('"..pc.get_name().."',"..pc.get_level()..")") -- select and output query outp= sql_query("testdatebase","select name from test where name='"..pc.get_name().."'")[1][1] say("example output ",outp) y para q ustedes aprendan usar el syntax examples.zip
  6. si no lo asiera no lo aubiera escribido o?
  7. con estas funciones se puede leer lo q el jugador utilisa...por ejemplo, si qieres saver qual escdo el jugador utiliza pos lo escribes en la quest asi say(pc.shield()) te da el vnum del escudo q usas actualmente, si no usas nada el vnum es 0y una funcion mas q ise, 'slen' esta funcion te lee el tamaño de un string o una tabla, so el attribute no es un string o tabla te retira false por ejemplo... slen('Noa')-->> 3 por que N = 1 o = 2 a = 3 lo mismo con tablas slen({1,2,3,4,5,6})-->> 6 por q 1,2,3,4,5,6 6 values en la tabla, no funciona con nombres en el index por ejemplo asi ['Noa']=1 asi no lee el tamaño de las tablas pos a q las funcionesInformacion: El item utilizado se selectiona, asi se puede usar varias funciones mas...function_list pc.armor pc.helmet pc.shoes pc.bracelet pc.weapon pc.necklace pc.earrings pc.shield pc.slot1 pc.slot2 slen Questlib.lua pc = pc or {}pc.armor = function() item.select_cell(90) return item.get_cell()==90 and item.vnum or 0 end-- armadurapc.helmet = function() item.select_cell(91) return item.get_cell()==91 and item.vnum or 0 end-- cascopc.shoes = function() item.select_cell(92) return item.get_cell()==92 and item.vnum or 0 end-- zapatospc.bracelet = function() item.select_cell(93) return item.get_cell()==93 and item.vnum or 0 end-- pulserapc.weapon = function() item.select_cell(94) return item.get_cell()==94 and item.vnum or 0 end-- armapc.necklace = function() item.select_cell(95) return item.get_cell()==95 and item.vnum or 0 end-- collarpc.earrings = function() item.select_cell(96) return item.get_cell()==96 and item.vnum or 0 end-- aretepc.shield = function() item.select_cell(100)return item.get_cell()==100 and item.vnum or 0 end-- escudopc.slot1 = function() item.select_cell(97) return item.get_cell()==97 and item.vnum or 0 end-- slot1 abajo de la armapc.slot2 = function() item.select_cell(98) return item.get_cell()==98 and item.vnum or 0 end-- slot2 abajo de la pulsera--pc.outfit_body = function() item.select_cell(109) return item.get_cell()==109 and item.vnum or 0 end-- kostum-armadura--pc.outfit_head = function() item.select_cell(110) return item.get_cell()==110 and item.vnum or 0 end-- kostum-cascofunction slen(typ) return ((type(typ)=='string' and string.len(typ)) or (type(typ)=='table' and table.getn(typ))) or falseend
  8. quest test begin state start begin when npc.chat."Entrar no templo" with d.getf("templo_1") == 0 begin say_title("Entrar Templo:") say("") if not party.is_leader() then say("Você não è lider de grupo.") say("Para entrar precisa ser lider de um grupo.") return end say("Você quer entar?") say("") local ss = select("Sim", "Não") if ss == 1 then d.join(250) d.setf("templo_1", 1) elseif ss == 2 then return end end endend
  9. quest skill_master begin state start begin when 20090.chat."Skills Master" begin say_title ( "Professora Skills Master" ) say ( "Ola, eu sou a professora," ) say ( "e eu posso te ensinar skills Master [P]" ) say ( "Sem qualquer tipo de esforço fisico." ) say_reward ( "Queres prosseguir com o treino?" ) if select ( "Sim" , "Nao" )==2 then return end say ( "Pronto o treino foi concluido com sucesso!" ) say_reward ( "Bom Jogo" ) table.foreachi(special.active_skill_list[pc.get_job()+1][pc.get_skill_group()],function(r,skill) pc.set_skill_level(skill,59) end) end endend
  10. esto no funciona tabelle = {}for i = 0, 39, 1 do table.insert(tabelle, i)end por q empiesa de 0,1,2...,39 la funcion s=select_table(tabelle) solo funciona con index positivos epesando con el index 1, qiere desir q el primer index en esa funcion no se ve. pruebalo mejor asi if tonumber(auktions_haus.get_money(pc.get_name())) > tonumber(preis) then
  11. pero solo use al table.insert para la selection 'cerrar'.
  12. quest piedra begin state start begin when 20006.take begin say_title(mob_name(20006)) say() if not ((item.get_type() == 1 and item.get_sub_type() < 6) or (item.get_type() == 2 and item.get_sub_type() == 0)) then say('Esta trancicion solo funciona con armas y armaduras.') return end local data,x = {{},{}},1 for i = 0,2 do local c = item.get_socket(i) if c > 2 and c ~= 28960 then data[1][x],data[2][x]= i,item_name(c) x = x + 1 end end if data[1][1]==nil then say('no ai piedras') return end table.insert(data[2],'cerrar') say('cual pierdra qieres eliminar?') local s=select_table(data[2]) if s==table.getn(data[2]) then return end say(data[2][s]..' eliminar?') if select('Si','No')==2 then return end say(data[2][s]..' eliminado') pc.give_item2(item.get_socket(data[1][s]),1) item.set_socket(data[1][s],28960) end endend
  13. es mejor selectionar la piedra q uno qiere borrar o?
  14. when kill with npc.is_pc() begin sel= pc.select(npc.get_vid()) name=pc.get_name() pc.select(sel) say('tu matastes a '..name)end por ejemplo asi
  15. Hola, muestro esta funcion q escribi, Blackyuko iso la misma funcion pero solo para la game, qiere desir q no se puede usar en otros rev* 'game version'. game.py para poner la funcion tienen q editar la game.py de root en el cliente buscan esto def __ServerCommand_Build(self): y editan esto "getinputbegin" : self.__Inputget1, "getinputend" : self.__Inputget2, "getinput" : self.__Inputget3, tienen q mirar a los [tab]. Despues escriben abajo abajo de la game estas funciones def __Inputget1(self): constInfo.INPUT_IGNORE = 1 def __Inputget2(self): constInfo.INPUT_IGNORE = 0 def __Inputget3(self): net.SendQuestInputStringPacket(str(player.GetTargetVID())) tambien aqi miren a los [tab] constinfo.py aora abren la constinfo.py y escriben esto en una parte INPUT_IGNORE = 0 _______________ questlib.lua function npc.get_vid() cmdchat("getinputbegin") local ret = input(cmdchat("getinput")) cmdchat("getinputend") return ret end asi se usa en una quest when kill begin say(npc.get_vid())end Mucho gusto, Noa
×
×
  • Crear nuevo...