Jump to content

Croqueta

Miembro
  • Contador contenido

    205
  • Ingreso

  • Última visita

  • Días ganados

    8

Actividad de reputación

  1. Me Gusta
    Croqueta got a reaction from xJinMori in [Q]Itemshop without Mysql   
    Informacion:
    Hola a todos aca les traigo una quest de una item shop en el juego. realizada en su totalidad por mi
    Contiene:
    -Historial de Compras(log)
    -Historial De Donaciones (log)
    -Ingreso Como administrador (Agregar artículos / y quitarlos)
    -Tienda: Lecto de coins (Este archivo ha de ser creado manualmente)
    -Imagenes:
     
    Importante:
     
    Dentro de la descarga hay un archivo llamado vnumUtype.txt este se le modifica la extencion a .lua
     
    pathti="/usr/home/game/share/locale/germany/quest/test/" <<-- en esta ruta la tabla de la item shop y el vnumUtype.lua
    pathtc="/usr/home/game/share/locale/germany/quest/coins/"
     
    Se crea una nueva carpeta en las rutas anteriores, que depende de usted.
    Más importante aún es un punto que hay que generar la tabla en el juego,
    como un ejemplo de la matriz que me queda, por lo que puede orientarse a la misma.
     
    special thx on stein20 for help to translate
     
    imagen
     
     
     
    Quest
     

    quest ingameshop begin state start begin when 20006.chat."recharge ccoins" begin say_title(mob_name(npc.get_race())) spenden() end when 20006.chat."generate table" with pc.is_gm() begin --if pc.get_gm_level()!=5 then return end say("really generate table?") if select("Yes","No")==2 then return end local ingameshop={ --[[ if you use this first time, push Yes ]] {--weapons {item1,item2},--ids {coins1,cois2}--coins }, {--armor {item1,item2},--ids {coins1,coins2}--coins }, {--special tems {item1,item2},--ids {coins1,item2}--coins } } table.save(ingameshop,pathti.."testtabelle.lua") end when 20006.chat."ItemShop" begin local name_items={} local ingameshop=table.load(pathti.."testtabelle.lua") say_title(mob_name(npc.get_race())) say() say("Choose your category") local auswahl=select3(itemshopk) for i=1,table.getn(ingameshop[auswahl][1]) do table.insert(name_items,tostring(item_name(ingameshop[auswahl][1][i]))) end say_title(mob_name(npc.get_race())) say() say("select the item ") say() local itemshop_i = select3(name_items) if itemshop_i == table.getn(name_items) then return end say_title(string.format("Coins :%d ", get_coins())) say() say("Would you really buy the item?") say() say_gold("it cost "..ingameshop[auswahl][2][itemshop_i].." Coins") say_item_vnum(ingameshop[auswahl][1][itemshop_i]) say("") if select("Yes","No") == 2 then return end if get_coins()<ingameshop[auswahl][2][itemshop_i] then say("not enough coins ") return end say_green("you have buy "..item_name(ingameshop[auswahl][1][itemshop_i]).." for- ") say_green(ingameshop[auswahl][2][itemshop_i].." Coins") say_item_vnum(ingameshop[auswahl][1][itemshop_i]) coins_write((get_coins()-ingameshop[auswahl][2][itemshop_i])) pc.give_item2(ingameshop[auswahl][1][itemshop_i]) write_log(ingameshop[auswahl][1][itemshop_i],ingameshop[auswahl][2][itemshop_i]) end when 20006.chat."Manage Itemshop" with pc.is_gm() begin local tabelle=table.load(pathti.."vnumUtype.lua") local i_shop=table.load(pathti.."testtabelle.lua") say_title(mob_name(npc.get_race())) say() say("Hello "..string.format("%s",pc.get_name())) say("What would you like do?") local s=select("add new items","removing Items","Nothig") if s==3 then return end if s==1 then say_title(mob_name(npc.get_race())) say() say("Choose a category") say("where you want to add the item") local auswahl=select3(itemshopk) say_title(mob_name(npc.get_race())) say() say(itemshopk[auswahl]..": insert into this category?") if select("Yes","No") == 2 then return end say_title(mob_name(npc.get_race())) say() say("Which item you wish to add?") say("Enter the vnum") local vnum= tonumber(input()) if vnum ==nil then say("You have to enter something") return end if auswahl== 1 then if tabelle[vnum][1] != 1 then say("This is not a weapon") return end elseif auswahl == 2 then if tabelle[vnum][1] != 2 then say("This is not a amor") return end elseif auswahl == 3 then if tabelle[vnum][1] == 1 or tabelle[vnum][1]==2 then say("only for special items") return end end say_title(mob_name(npc.get_race())) say() say("Give the price of that item") say() local money= tonumber(input()) if money==nil then say("You have to enter something") return end say_title(mob_name(npc.get_race())) say() say("keeping?") say() say("Item: "..item_name(vnum).." Price: "..money) say_item_vnum(vnum) if select("Yes","No") == 2 then return end i_shop[auswahl][1][table.getn(i_shop[auswahl][1])+1]=vnum i_shop[auswahl][2][table.getn(i_shop[auswahl][2])+1]=money --table.insert(i_shop[auswahl][1],vnum) --table.insert(i_shop[auswahl][2],money) table.save(i_shop,pathti.."testtabelle.lua") say("you have add "..item_name(vnum)) elseif s==2 then local auswahl_items={} say("Choose the item that you wish to remove") say() local a=select3(itemshopk) for i=1,table.getn(i_shop[a][1]) do table.insert(auswahl_items,tostring(item_name(i_shop[a][1][i]))) end say("Choose the item that you wish to remove") say() local itemshop_r = select3(auswahl_items) if itemshop_r==table.getn(auswahl_items) then return end table.remove(i_shop[a][1],i_shop[a][1][itemshop_r]) table.remove(i_shop[a][2],i_shop[a][2][itemshop_r]) table.save(i_shop,pathti.."testtabelle.lua") --[[for i= 1,table.getn(ingameshop[auswahl][1]) do say(i_shop[auswahl][1][i].."\t"..i_shop[auswahl][2][i]) end]] end end end end questlib.lua
     

    pathti="/usr/home/game/share/locale/germany/quest/test/"--ruta de la tabla pathtc="/usr/home/game/share/locale/germany/quest/coins/"--ruta de los coins itemshopk={"Waffe","Rüstungen","Sonstiges"} function write_log(vnum,coins) local i_name=item_name(vnum) datei = io.open(pathti.."shop_log.lua", "a+") if datei==nil then say("Error loading the file") return end datei:write("PLayerID:\t"..pc.get_player_id().."\tPlayerName:\t"..pc.get_name().."\tItemName:\t"..i_name.."\tDate/Time:\t"..os.date("%c").."\tCoins:\t"..coins.."\n") datei:close() end function get_coins() local file = io.open(pathtc..""..pc.get_player_id()..".txt",'r') if file==nil then return 0 end for line in file:lines() do return line end file:close() end function coins_write(coins) file = io.open(pathtc..""..pc.get_player_id()..".txt","w") file:write(coins) file:close() end function spenden() say() say("How much you want to donate?") say_reward("Online Paysafecard will not be accepted") say() s = select("10","25","50","100","cancel") wert = { 10 , 25 , 50 , 100} if s==table.getn(wert)+1 then return end say_title(mob_name(20006)) say() say("Now give the PSC numbers") say() eing2= input() if string.len(eing2)~=16 then say("Your input has no 16 numbers") return end if string.sub(eing2,0,1)=='1' or string.sub(eing2,0,2)=='00' then say("Online Paysafecard will not be accepted") return end say_title(mob_name(20006)) say() say('The PSC is protected with a password?') if select("Yes","No")==2 then eing3=0 else say("Enter the password") eing3 = input() if eing3=='' then say("You have to enter something") return end end say() say("Your input:") say("cash: "..wert[s]) say("PSC: "..eing2) if eing3 == 0 then say("PW: /") else say("PW: "..eing3) end say("Keeping?") say() if select("Yes","No") == 2 then return end say("your Coins will be credited to you after the control") file = io.open(pathti.."psc_log.lua","a+") --file:write("PlayerName:\t"..pc.get_name().."\tCash:\t"..wert[s].."\tPSC:\t"..eing2.."\tPW:\t"..eing3.."\tDate/Time:\t"..os.date("%c").."\n") file:write("ID:\t"..pc.get_player_id().."PlayerName:\t"..pc.get_name().."\tCash:\t"..wert[s].."\tPSC:\t"..eing2.."\tPW:\t"..eing3.."\tDate:\t"..os.date("%c").."\t\n") file:close() end function select3(...) arg.n = nil local tp,max = arg,5 if type(tp[1]) == 'number' then max = tp[1] if type(tp[2]) == 'table' then tp = tp[2] else table.remove(tp,1) end elseif type(tp[1]) == 'table' then if type(tp[1][1]) == 'number' then max = tp[1][1] table.remove(tp[1],1) tp = tp[1] end tp = tp[1] end local str = '{' local tablen,act,incit = table.getn(tp),0,0 table.foreach(tp,function(i,l) act = act + 1 if act == 1 then str = str .. '{'..string.format('%q',l) elseif act == max+1 and tablen > act+incit then if tablen ~= act+incit+1 then str = str..'},{'..string.format('%q',l) else str=str..','..string.format('%q',l) end incit = incit + max act = 1 else str=str..','..string.format('%q',l) end end) local px = loadstring('return '..str ..'}}')() local function copy_tab(t) local p= {} for i = 1,table.getn(t) do p[i] = t[i] end return p end local pe = {} for i = 1,table.getn(px) do pe [i] = copy_tab(px[i]) end local function init(i,ip) pe[i] = copy_tab(px[i]) local next,back,exit = 0,0,0 if i < table.getn(pe) and table.getn(pe) ~=1 then table.insert(pe[i],table.getn(pe[i])+1,'Para alante Pagina '..(i+1)); next = table.getn(pe[i]) end if i > 1 then table.insert(pe[i],table.getn(pe[i])+1,'Para atraz pagina '..(i-1)); back = table.getn(pe[i]) end table.insert(pe[i],table.getn(pe[i])+1,'Cerrar'); exit = table.getn(pe[i]) if table.getn(pe) > 1 then say('pagina '..i..' de '..table.getn(pe)) end local e = select_table(pe[i]) if e == next then return init(i+1,ip+max) elseif e == back then return init(i-1,ip-max) elseif e == exit then return -1 else return e+ip,pe[i][e] end end return init(1,0) or -1 end local function exportstring( s ) return string.format("%q", s) end function table.save( tbl,filename ) local charS,charE = " ","\n" local file,err = io.open( filename, "wb" ) if err then return err end local tables,lookup = { tbl },{ [tbl] = 1 } file:write( "return {"..charE ) for idx,t in ipairs( tables ) do file:write( "-- Table: {"..idx.."}"..charE ) file:write( "{"..charE ) local thandled = {} for i,v in ipairs( t ) do thandled[i] = true local stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables, v ) lookup[v] = table.getn(tables) end file:write( charS.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( charS..exportstring( v )..","..charE ) elseif stype == "number" then file:write( charS..tostring( v )..","..charE ) end end for i,v in pairs( t ) do if (not thandled[i]) then local str = "" local stype = type( i ) if stype == "table" then if not lookup[i] then table.insert( tables,i ) lookup[i] = table.getn(tables) end str = charS.."[{"..lookup[i].."}]=" elseif stype == "string" then str = charS.."["..exportstring( i ).."]=" elseif stype == "number" then str = charS.."["..tostring( i ).."]=" end if str ~= "" then stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables,v ) lookup[v] = table.getn(tables) end file:write( str.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( str..exportstring( v )..","..charE ) elseif stype == "number" then file:write( str..tostring( v )..","..charE ) end end end end file:write( "},"..charE ) end file:write( "}" ) file:close() end function table.load( sfile ) local ftables,err = loadfile( sfile ) if err then return _,err end local tables = ftables() for idx = 1,table.getn(tables) do local tolinki = {} for i,v in pairs( tables[idx] ) do if type( v ) == "table" then tables[idx][i] = tables[v[1]] end if type( i ) == "table" and tables[i[1]] then table.insert( tolinki,{ i,tables[i[1]] } ) end end for _,v in ipairs( tolinki ) do tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil end end return tables[1] end quest_function
     

    write_log get_coins coins_write spenden select3 table.save table.load
    http-~~-//www.youtube.com/watch?v=5avAKriuCTg

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  2. Me Gusta
    Croqueta got a reaction from Dextrok in memorizar tablas en un archivo y leer   
    do local function exportstring( s ) return string.format("%q", s) end function table.save( tbl,filename ) local charS,charE = " ","n" local file,err = io.open( filename, "wb" ) if err then return err end local tables,lookup = { tbl },{ [tbl] = 1 } file:write( "return {"..charE ) for idx,t in ipairs( tables ) do file:write( "-- Table: {"..idx.."}"..charE ) file:write( "{"..charE ) local thandled = {} for i,v in ipairs( t ) do thandled[i] = true local stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables, v ) lookup[v] = #tables end file:write( charS.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( charS..exportstring( v )..","..charE ) elseif stype == "number" then file:write( charS..tostring( v )..","..charE ) end end for i,v in pairs( t ) do if (not thandled[i]) then local str = "" local stype = type( i ) if stype == "table" then if not lookup[i] then table.insert( tables,i ) lookup[i] = #tables end str = charS.."[{"..lookup[i].."}]=" elseif stype == "string" then str = charS.."["..exportstring( i ).."]=" elseif stype == "number" then str = charS.."["..tostring( i ).."]=" end if str ~= "" then stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables,v ) lookup[v] = #tables end file:write( str.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( str..exportstring( v )..","..charE ) elseif stype == "number" then file:write( str..tostring( v )..","..charE ) end end end end file:write( "},"..charE ) end file:write( "}" ) file:close() end function table.load( sfile ) local ftables,err = loadfile( sfile ) if err then return _,err end local tables = ftables() for idx = 1,#tables do local tolinki = {} for i,v in pairs( tables[idx] ) do if type( v ) == "table" then tables[idx][i] = tables[v[1]] end if type( i ) == "table" and tables[i[1]] then table.insert( tolinki,{ i,tables[i[1]] } ) end end for _,v in ipairs( tolinki ) do tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil end end return tables[1] end end
     
    pro ejemplo

    tabla={ minombre='Noa', ano='23', pais='Alemania' } table.save(tabla,"mitabla.lua") local tabla=table.load("mitabla.lua") for _,i in next, tabla do say(i) end o say("mi nombre es "..tabla.minombre.." tengo "..tabla.ano.." anos y bivo en "..tabla.pais)
  3. Me Gusta
    Croqueta got a reaction from divnos77 in memorizar tablas en un archivo y leer   
    do local function exportstring( s ) return string.format("%q", s) end function table.save( tbl,filename ) local charS,charE = " ","n" local file,err = io.open( filename, "wb" ) if err then return err end local tables,lookup = { tbl },{ [tbl] = 1 } file:write( "return {"..charE ) for idx,t in ipairs( tables ) do file:write( "-- Table: {"..idx.."}"..charE ) file:write( "{"..charE ) local thandled = {} for i,v in ipairs( t ) do thandled[i] = true local stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables, v ) lookup[v] = #tables end file:write( charS.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( charS..exportstring( v )..","..charE ) elseif stype == "number" then file:write( charS..tostring( v )..","..charE ) end end for i,v in pairs( t ) do if (not thandled[i]) then local str = "" local stype = type( i ) if stype == "table" then if not lookup[i] then table.insert( tables,i ) lookup[i] = #tables end str = charS.."[{"..lookup[i].."}]=" elseif stype == "string" then str = charS.."["..exportstring( i ).."]=" elseif stype == "number" then str = charS.."["..tostring( i ).."]=" end if str ~= "" then stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables,v ) lookup[v] = #tables end file:write( str.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( str..exportstring( v )..","..charE ) elseif stype == "number" then file:write( str..tostring( v )..","..charE ) end end end end file:write( "},"..charE ) end file:write( "}" ) file:close() end function table.load( sfile ) local ftables,err = loadfile( sfile ) if err then return _,err end local tables = ftables() for idx = 1,#tables do local tolinki = {} for i,v in pairs( tables[idx] ) do if type( v ) == "table" then tables[idx][i] = tables[v[1]] end if type( i ) == "table" and tables[i[1]] then table.insert( tolinki,{ i,tables[i[1]] } ) end end for _,v in ipairs( tolinki ) do tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil end end return tables[1] end end
     
    pro ejemplo

    tabla={ minombre='Noa', ano='23', pais='Alemania' } table.save(tabla,"mitabla.lua") local tabla=table.load("mitabla.lua") for _,i in next, tabla do say(i) end o say("mi nombre es "..tabla.minombre.." tengo "..tabla.ano.." anos y bivo en "..tabla.pais)
  4. Me Gusta
    Croqueta got a reaction from Metin2.PedirAyuda in Quest Reload's desde un ítem o NPC.   
    las reload quest no se puede usar en quests
  5. Me Gusta
    Croqueta got a reaction from PACI in memorizar tablas en un archivo y leer   
    do local function exportstring( s ) return string.format("%q", s) end function table.save( tbl,filename ) local charS,charE = " ","n" local file,err = io.open( filename, "wb" ) if err then return err end local tables,lookup = { tbl },{ [tbl] = 1 } file:write( "return {"..charE ) for idx,t in ipairs( tables ) do file:write( "-- Table: {"..idx.."}"..charE ) file:write( "{"..charE ) local thandled = {} for i,v in ipairs( t ) do thandled[i] = true local stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables, v ) lookup[v] = #tables end file:write( charS.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( charS..exportstring( v )..","..charE ) elseif stype == "number" then file:write( charS..tostring( v )..","..charE ) end end for i,v in pairs( t ) do if (not thandled[i]) then local str = "" local stype = type( i ) if stype == "table" then if not lookup[i] then table.insert( tables,i ) lookup[i] = #tables end str = charS.."[{"..lookup[i].."}]=" elseif stype == "string" then str = charS.."["..exportstring( i ).."]=" elseif stype == "number" then str = charS.."["..tostring( i ).."]=" end if str ~= "" then stype = type( v ) if stype == "table" then if not lookup[v] then table.insert( tables,v ) lookup[v] = #tables end file:write( str.."{"..lookup[v].."},"..charE ) elseif stype == "string" then file:write( str..exportstring( v )..","..charE ) elseif stype == "number" then file:write( str..tostring( v )..","..charE ) end end end end file:write( "},"..charE ) end file:write( "}" ) file:close() end function table.load( sfile ) local ftables,err = loadfile( sfile ) if err then return _,err end local tables = ftables() for idx = 1,#tables do local tolinki = {} for i,v in pairs( tables[idx] ) do if type( v ) == "table" then tables[idx][i] = tables[v[1]] end if type( i ) == "table" and tables[i[1]] then table.insert( tolinki,{ i,tables[i[1]] } ) end end for _,v in ipairs( tolinki ) do tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil end end return tables[1] end end
     
    pro ejemplo

    tabla={ minombre='Noa', ano='23', pais='Alemania' } table.save(tabla,"mitabla.lua") local tabla=table.load("mitabla.lua") for _,i in next, tabla do say(i) end o say("mi nombre es "..tabla.minombre.." tengo "..tabla.ano.." anos y bivo en "..tabla.pais)
  6. Me Gusta
    Croqueta got a reaction from EzekielitohMercury in [PETICION]Quest   
    se puede escribir mejor, para eso no se nesesita cambiar el state

    quest teleportar begin state start begin when letter begin send_letter("Teleportar") end when info or button begin say("Donde quieres ir?") local b = select ("Ciudad 1 - Jinno", "Ciudad 2 - Jinno", "Ciudad 1 - Shinsoo", "Ciudad 2 - Shinsoo", "Ciudad 1 - Chunjo", "Ciudad 2 - Chunjo", "Salir") local tele={ {969600, 278400},--Ciudad 1 - Jinno {873100, 242600},--Ciudad 2 - Jinno {469300, 964200},--Ciudad 1 - Shinsoo {360800, 877600},--Ciudad 2 - Shinsoo {55700, 157900},--Ciudad 1 - Chunjo {138500, 234900}--Ciudad 2 - Chunjo } pc.warp(tele[b][1], tele[b][2]) end end end
  7. Me Gusta
    Croqueta got a reaction from PACI in [PETICION]Quest   
    se puede escribir mejor, para eso no se nesesita cambiar el state

    quest teleportar begin state start begin when letter begin send_letter("Teleportar") end when info or button begin say("Donde quieres ir?") local b = select ("Ciudad 1 - Jinno", "Ciudad 2 - Jinno", "Ciudad 1 - Shinsoo", "Ciudad 2 - Shinsoo", "Ciudad 1 - Chunjo", "Ciudad 2 - Chunjo", "Salir") local tele={ {969600, 278400},--Ciudad 1 - Jinno {873100, 242600},--Ciudad 2 - Jinno {469300, 964200},--Ciudad 1 - Shinsoo {360800, 877600},--Ciudad 2 - Shinsoo {55700, 157900},--Ciudad 1 - Chunjo {138500, 234900}--Ciudad 2 - Chunjo } pc.warp(tele[b][1], tele[b][2]) end end end
  8. Me Gusta
    Croqueta got a reaction from clanco365 in Funciones de Quests 90% de todos [español]   
    disculpanme por mi espanol, no e escrito mas que 11 anos :DD
    en espanol y para todos una data para cargar
     

    item.get_cell() no se tiene que escribir nada en las parentesis Beschreibung: -- gibt bei take und use das Aktuell benutzte Item aus. esplicasion: --para el "take" y "use" de el actual item volver: false wenn ein fehler aufgetreten ist ansonsten die Zellennumer im Inventar quando es false tienes que escojer un lugar del invantario item.select_cell(slot) selectiona el slot de el inventario esplicasion: --selectiona el item y ase que los comandos lo selectiona revolver: Boolean item.get_socket(socketid) sockel nummemero 0 asta 2 sockel0 hueco1 , sockel1 hueco2 ... asta 3 esplicasion: -- esa funcion qiere desir que te da el "id" del item que esta en el hueco revolver: false o el vnum del item item.remove(void) no se tiene que escribir nada en las parentesis esplicasion: -- borra el item selectionado revolver: nada item.get_id(void) no se tiene que escribir nada en las parentesis esplicasion: -- te da el id del item selectionado revolve: false o el id del item item.select(itemid) en las parentesis da el ID del item esplicasion: -- selectiona el item con el id y ase que los comandos lo selectiona revolve: Boolean item.get_count(void) no se tiene que escribir nada en las parentesis esplicasion: -- cuenta la cantidad de el selectionado item como 50 perlas revuelve: false o count item.get_level(void) no se tiene que escribir nada en las parentesis esplicasion: --te pregunta si el item es arma+1=1 devolver: +0= 0; +1=1 item.get_name(void) no se tiene que escribir nada en las parentesis revolver: nombre del item selectionado item.get_refine_vnum(void) no se tiene que escribir nada en las parentesis revolver: refined_vnum del item selectionado item.get_size(void) no se tiene que escribir nada en las parentesis revolver: tamaño del item selectionado -> en la database size item.get_sub_type(void) no se tiene que escribir nada en las parentesis revolver: subtype del item selectionado item.get_type(void) no se tiene que escribir nada en las parentesis revolver: type del item selectionado item.get_value(value) no se tiene que escribir nada en las parentesis revolver: el valor del item selectionado (value= value1 -> value5) item.get_vnum(void) no se tiene que escribir nada en las parentesis revolver: el vnum del item selectionado item.has_flag(flag) valor: flag esplicasion: -- chequa qual flag el item tiene revolver: Boolean item.set_socket(socketnum, value) valor: el numero del hueco y el valor que se qiera poner esplicasion: -- se pone en el hueco un item del selectionado item (sockelnum max =2) game.drop_item_with_ownership(item_vnum, anzahl) esplicasion: -- soltar objetos con su nombre ariba(el nombre se ve 10 segundos) game.drop_item(item_vnum, anzahl) esplicasion: -- solta un item __give_char_priv(rate_type, rate) esplicasion: -- le da el jugador selectionado un Bonus como yang, exp, caer objetos o yangbombas valor: rate_type = 1 asta 4 (YANG, DROP, YANGBOMB, EXP) rate= valor __get_empire_priv_string() esplicasion: -- le pregunta el actual bunus de un mondo en un string __give_empire_prive(empire, rate_type, rate, time) -- le da un mundo un bonus esplicasion: -- le da a 1 o a todo los mundos un bonus valor: rate_type= 1-4 (DROP, GOLD_DROP,TEN_GOLD_DROP, EXP) empire= 0-3 ; 0= todos los mundos __getnpcid(npc_name) esplicasion: -- te da el ID del npc si escribes el valor del npc is_test_server() esplicasion: -- te pregunta con un boolenvalor si es un testserver o no kill_all_in_map(mapindex) esplicasion: -- mata a todos los npc y monstros en la mapa puede ser que jugadores tambien valor: mapindex de la mapa bool_to_str() esplicasion: --transforma el boolinvalor en un string (si o no)("true" o "false") cmdchat(clientCMD) esplicasion: -- manda un comando en el chat channel del cliento se usa para abrir una tienda o para desir si el item fallo o esas cosas Wird genutzt für Sachen wie das öffnen eines Privaten Ladens oder die Meldungen beim Uppen command(cmd) esplicasion: -- como el comando "/" jugadores no pueden usar todos enable_over9refine(int, int) esplicasion: -- / valor: / regen_in_map(mapindex, path) esplicasion: -- carga la data de regen con el path y activa la en la mapindex de la mapa say_in_map(mapindex, text) esplicasion: -- como say pereo solo en la mapindex de la mapa (todos que esta en la mapa lo puede leer) set_quest_state(questname, state) esplicasion: -- pone en la quest un state y la activa(la quest con el nombre comienza) set_skin(skin_type) esplicasion: -- pone el estilo de la quest (como se ve en el juego) syschat(text) esplicasion: -- el texto que escribes se ve en el metin2 ventana para el jugador syserr(text) esplicasion: -- escribe en el chat algo falso de la quest si es un test_server time_to_str() esplicasion: -- da el actual tiempo en un string warp_all_to_village(mapindex, time) esplicasion: -- teleporta todo los jugadores en su mapa1 con el mapindex -- timer: da el tiempo que necesita para teleportar warp_to_village() esplicasion: -- teleporta el actual jugador en su mapa1 affect.add(applytype, applyvalue, time) esplicasion: -- te da un affect con el tipo 1000 asi se puede dar mas affect -- applytype son de 1 a 80 (los bonus ID) affect.remove() esplicasion: -- borra los affext type (223 no se puede borrar) Tip:210 = GM Stun 211 = GM Slow 203 = invisible 223 = chatbloc 500 asta 509 = EXP Bonus ... 514 = cabello 532 = caballo affect.remove_all_collect() esplicasion: -- borra todos los affect= bio quest affect affect.remove_bad() esplicasion: -- borra todos los negativos efectos como beneo, quemar ... affect.remove_good() esplicasion: --borry todos los positivos effectos como los buffs affect.remove_hair() esplicasion: -- borra el cabello building.get_land_id() -- te da el Id de el reino building.get_land_info() -- te da informasion de el reino building.has_land() -- tiene reino 0 o 1? building.set_land_owner() -- se pone el senor del reino char_log() -- escribe algo en el log tablo? clear_server_timer() -- borra el tiempo del server clearmapsignal() -- borra el punto de la map cleartimer() -- borrar el timer color(r,g,b) -- color rgb complete_quest() -- cierra la quest complete_quest_state() -- complete sate confirm() -- confirmar si no? sys_log() -- escribe algo en el system log? d.check_eliminated() -- controla si todos los monstros estan eliminados solo en los dungeons. d.clear_regen() -- para los respawns en los dungeons. d.count_monster() -- cuenta los monstros en el dungeon d.exit() -- jugador sale del dungeon d.exit_all() -- todos los jugadores salen del dungeon d.exit_all_to_start_position() -- todos enpiezan de start d.get_kill_mob_count() -- te da un numero de los eliminados monstros en el dungeon d.get_kill_stone_count() -- te da un numero de los eliminados metins en el dungeon d.get_map_index() -- Dungeon Map Index d.getf() -- Dungeon Flag d.is_unique_dead() -- se murio algien? d.is_use_potion() -- uso uno un pott? d.join() -- entrar un gruppo en el dungeon d.jump_all() -- teleportart todos a un punto de el Dungeon d.jump_all_local() -- teleporta todos local en el dungeon d.kill_unique() -- murio solo uno? d.new_jump() -- nuevo Warp d.new_jump_all() -- todos los jugadores teleportan de nuevo. d.purge() -- borrar todos los monstros en el dungeon como(/purge) d.purge_unique() -- uno o unos monstros borrarlo en el dungeon d.regen_file() -- cargar el regen file de monstros del dungeon d.revived() -- revivido d.select() -- selectionar el dungeon d.set_dest() -- pone un fin al dungeon d.set_exit_all_at_eliminate() -- cuando un enemigo murio todos salen del dungeon d.set_regen_file() -- pone el regen file del dungeon d.set_unique() -- pone solo uno en el Dungeon d.set_warp_at_eliminate() -- teleporta cuando enemigo murio d.setf() -- pone a el dungeon una flag d.spawn() -- llama un monstro en el dungeon d.spawn_goto_mob() -- llama un monstro en el dungeon y te teleportas donde el esta d.spawn_group() -- llama un grupo en el dungeon d.spawn_mob() -- llama un mostro en el grupo d.spawn_move_group() -- llama un grupo y move? d.spawn_move_unique() -- llama un monstro y move? d.spawn_name_mob() -- llama un monstro con nombre? d.spawn_stone_door() -- llama una puerta de piedra d.spawn_unique() -- llama uno d.spawn_wooden_door() -- llama una puerta de madera d.unique_get_hp_perc() -- te da el nombre de un monstro o jugador no se d.unique_set_def_grade() -- poner la defensa de un monstro o jugador d.unique_set_hp() -- poner la vida de un monstro o jugador no se d.unique_set_maxhp() -- poner maximal vida de un monstro o jugador no se delay() -- esperar find_npc_by_vnum() -- buscar un npc con el vnum find_pc_by_name() -- burca un jugador con el nombre find_pc_cond() -- buscar un jugador que tiene la condicion game.drop_item() -- soltar objetos game.get_event_flag() -- preguntas por el event_flag game.get_guild_name() -- preguntas por el nombre de gremio game.get_safebox_level() -- preguntas por el tamano de eö almacen game.get_warp_guild_war_list() -- te da la lista de gremio guerra game.open_mall() -- abrir el itemshop almacen game.open_safebox() -- abrir el almacen game.request_make_guild() -- te pregunta die qieres aser un gremio game.set_event_flag() -- pone el event_flag game.set_safebox_level() -- poner el tamano del almacen get_global_time() -- pone el global timepo get_locale() -- te da la selectionada locale get_server_timer_arg() -- te da el servertimer get_time() -- te da el tiempo guild.around_ranking_string() -- te da el guild ranking en uns string guild.get_any_war() -- te da todos los gremios que estan en guerra guild.get_ladder_point() -- te da los puntos del lider guild.get_name() -- te da el nombre del gremio guild.get_rank() -- te da el rank del gremio guild.get_reserve_war_table() -- lista de guerra guild.get_warp_war_list() -- liste de guerra warplist guild.high_ranking_string() -- Highscore al String (gremio) guild.is_bet() -- se aposto al el gremio? guild.is_war() -- preguntar si el gremio entra en guerra guild.level() -- pregunta qual nivel el gremio tiene guild.name() -- te da el nombre del gremio guild.war_bet() -- posta al gremio de guerra guild.war_enter() -- entrar en guerra con el gremio horse.advance() -- poner el caballo 1 lvlup horse.feed() -- darle el caballo algo de comer horse.get_grade() -- darle el rank del caballo horse.get_health() -- darle vida a el caballo horse.get_health_pct() -- vida de caballo en por cineto horse.get_hp() -- te da la vida de el caballo horse.get_level() -- te da el nivel del caballo horse.get_stamina() -- te da el sp del caballo (resistencia) horse.get_stamina_pct() -- t da el sp del caballo en por ciento horse.is_dead() -- el caballo esta muerto? horse.is_mine -- es mi caballo horse.is_riding() -- estoi ariba del caballo horse.revive() -- revivir el caballo horse.ride() -- monatar el caballo horse.set_level() -- poner el nivel de el caballo horse.summon() -- llamar el caballo horse.unride() -- decmontarse del caballo horse.unsummon() -- retirar el caballo input() -- input donde puedes escribir algo is_test_server() -- te pregunta soe es un testserver loop_timer() -- Loop Timer npc.is_quest() -- pregunta si un npc esta usado en una quest pc.change_gold() -- cambiar el yang pc.change_money() -- cambiar el yang pc.change_sp() -- cambiar el sp pc.changealignment() -- cambiar el rango pc.changegold() -- cambiar el yang pc.changemoney() -- cambiar el yang pc.clear_skill() -- borrar habilidad pc.clear_sub_skill() -- borrar sub habilidad pc.clear_one_skill() -- borrar una habilidad pc.count_item() -- contar un item del jugador pc.countitem()-- contar un item del jugador pc.delqf() -- borrar lo que esta en la quest tabale pc.destroy_guild() -- borrar el gremio pc.enough_inventory() -- controla si en el inventario ai espacio pc.forget_my_attacker() -- el monstro no te ataquea pc.get_armor() -- te da la armadura que usas pc.get_empire() -- te da el mundo en que estas pc.get_equip_refine_level() pc.get_exp() -- el exp que tienes en momento pc.get_gold() -- el yang que tienes en momento pc.get_guild() -- el gremio que estas en momento pc.get_horse_level() -- el nivel de tu caballo pc.get_hp() -- la vida que tienes en momento pc.get_job() -- tu categoria ninja, sura... pc.get_leadership() -- el lider pc.get_level() -- el nivel que tienes en momento pc.get_local_x() -- tu coordinacion x pc.get_local_y() -- tu coordinacion y pc.get_map_index() -- map index pc.get_max_hp() -- max hp del jugador pc.get_max_sp() -- max sp del jugador pc.get_money() -- el exp del jugador en momento pc.get_name() -- nombre del jugador pc.get_next_exp() -- cuanto exp para lvl up pc.get_part() pc.get_playtime() -- tiempo del jugador pc.get_sex() -- sexo del jugador pc.get_skill_level() -- habilidad nivel pc.get_sp() -- sp del jugador en momento pc.get_start_location() pc.get_vid() pc.get_war_map() pc.get_weapon() -- arma del jugador pc.get_x() pc.get_y() pc.getarmor() pc.getcurrentmapindex() pc.getempire() pc.getf() pc.getgold() pc.getguild() pc.gethp() pc.getleadership() pc.getmaxhp() pc.getmaxsp() pc.getmoney() pc.getname() pc.getplaytime() pc.getqf(name) pc.get_skill_group() pc.getsp() pc.getweapon() pc.getx() pc.gety() pc.give_exp(exp) pc.give_exp2(exp) pc.give_exp_perc(percent) pc.give_gold(gold) pc.give_item(vnum)-- te da el rango revuelvo pc.give_item2(vnum) -- le das un item (vnum) pc.give_item_from_special_item_group(is_item?) pc.give_lotto() pc.has_guild() -- es en un gremio si(1)o no(0) pc.has_master_skill() -- tienes algo en M1 si(1) o no(0) pc.hasguild() -- es en un gremio si(1)o no(0) pc.have_map_scroll() pc.have_pos_scroll() pc.in_dungeon() -- es en un dungeon si(1) o no(0) pc.is_guild_master() -- es el lider del gremio si(1) o no (2) pc.is_horse_alive() -- el caballo bive si(1) o no(0) pc.is_married() -- esta casado si(1) o no(0) pc.is_mount() -- esta monteado pc.is_polymorphed() -- transformado si(1) o no(0) pc.isguildmaster() -- es el lider del gremio si(1) o no (2) pc.mount(vnum,time) -- montar al caballo (vnum, tiempo) 60*60*24*.. (segundos*minutos*horas*dias*semanas*meses*anos) pc.pc_attract_ranger() -- distancia pc.polymorph(mob_vnum) -- transformar el jugador pc.refine_equip() -- mejorar el objectivo pc.remove_from_guild() -- borrar un jugador de gremio pc.remove_item(item_vnum) -- borrar un item del inventario pc.remove_polymorph() -- revolver la transformasion pc.removeitem() -- borrar un item del inventario pc.reset_point() -- borrar puntos de status? pc.revive_horse() -- revivir el caballo pc.select() -- selectional pc.set_part() -- poner un part como cabello pc.set_warp_location() pc.set_warp_location_local() pc.setf() -- lo mismo como setqf pc.setqf(name,value) pc.set_skill_group() --cambiar la clasificion pc.set_skill_level() -- cambiar la nivel de habilidad pc.unmount() -- demontarse pc.warp() -- teleportarse pc.warp_exit() -- teleportarse para salida pc.warp_local() -- teleportarse local como Tele-Hack pc.warp_to_guild_war_observer_position() -- teleportarse para el npc de gremio pc.is_clear_skill_group() pc_find_skill_teacher_vid() -- clasicasion de maestro pc_find_square_guard_vid() pc_get_exp_bonus() --te da el exp bonus pc_get_village_map_index() -- te da el mapindex de mapa1 pc_is_novice() -- si el jugador es principante no mas que 15 y no menos que 5 raw_script() restart_quest() -- se pone el state de la quest a start say() -- simple [sAY] say_npc_name() -- dise el nombre del npc say_pc_name() -- dise el normbre del jugador say_reward() -- dise un texto en rojo say_title() -- dise el titulo say_item() -- dise el nombre del item say_item_vnum()--ensena el item con imagine select() -- para selectionar optiones target.clear() target.delete() target.id() target.npc() target.pc() target.pos() target.vid() test_chat() time_hour_to_sec() time_min_to_sec() type() pc.is_engaged() -- esta el jugador casado string.format() pc.is_gm() -- es el jugador un gm si(1) no (2) pc.get_gm_level() -- qual nivel tiene el gm implemen.. pc.get_alignment() -- cambia el rango del jugador pc.get_real_alignment() -- cambia el rango a normal pc.learn_grand_master_skill() -- poner la habilidad a G1 o P (sube siempre a 1) pc.is_skill_book_no_delay() -- si el jugador uso una exxo si(1) no(2) pc.remove_skill_book_no_delay() -- borra el efecto de exxo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  9. Me Gusta
    Croqueta got a reaction from António Curva in [RELEASE]Gm_Online Rankin por mysql   
    La quest funciona completamente en Mysql para eso nesesitan una nueva tabla que tambien esta en el fichero
     
    para el Pw me tienen que escribir un PM

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  10. Me Gusta
    Croqueta got a reaction from PACI in Diferencia nivel.   
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  11. Me Gusta
    Croqueta reacted to tazbunny in Sistema de Traduccion de códigos By Noa   
    Hola metineros..
     
    Ahí les traigo un sistema de traducirán de códigos a nombres que lo a diseñado Noa y esta muy bien para que las quest te lo escriban automáticamente dependiendo del bono al que corresponda el código.
     
    Bueno para empezar debemos buscar en el questlib.lua esta linea:
     

    QUEST_SCROLL_TYPE_KILL_ANOTHER_EMPIRE = 2 y debajo de esa linea ponemos esto:
     

    bonus={} bonus.trans= { [1]="Maximo HP", [2]="Maximo SP", [3]="Vitalidad", [4]="Inteligencia", [5]="Fuerza", [6]="Dextresa", [7]="Velocidad de Ataque", [8]="Velocidad de Movimento", [9]="Velocidad de hechizo", [10]="Regeneracion HP", [11]="Regeneracion SP", [12]="Inmune a Apagon", [13]="Posibilidad de Envenenar", [14]="Posibilidad de Retardo", [15]="Fuerza Ataque Critico", [16]="Fuerza de penetracion", [17]="Fuerza contra Medio Humano", [18]="Fuerza contra animales", [19]="Fuerza contra Orcos", [20]="Fuerza contra Misticos", [21]="Fuerza contra NoMuerto", [22]="Fuerza contra Demonios", [23]="Daño absorbido por HP", [24]="Daño absorbido por SP", [25]="Posibilidad de robar el HP del enemigo", [26]="Posibilidad de robar el SP del enemigo", [27]="Bloquear Ataque directo al Cuerpo", [28]="Posibilidad para esquivar las flechas", [29]="Defensa Espada", [30]="Defensa dos manos", [31]="Defensa Daga", [32]="Defensa Campana", [33]="Defensa Fan", [34]="Defensa Flecha", [35]="Resistencia Fuego", [36]="Defensa Rayo", [37]="Defencia Magia", [38]="Resistencia Viento", [39]="Probabilidad para reflejar ataque al cuerpo ", [40]="Reflectar Maldicion", [41]="Resistencia Veneno", [42]="Posibilidad de restaurar SP", [43]="Posibilidad de bonus de EXP", [44]="Posibilidad de drop de Yang", [45]="Posibilidad de doble drop de objetos", [46]="Trank effekt zuwachs", [47]="Posibilidad de restaurar HP", [48]="Inmune contra Apagon", [49]="Inmune a retardo", [50]="Inmune a caida", [51]="Kill", [52]="Aumentar la puntería del arco", [53]="Aumento de valore de ataque", [54]="Aumento de defensa", [55]="Aumento de valore de ataque magico", [56]="Aumento de defensa mágica", [57]="Posibilidad de maldecir", [58]="Max resistencia", [59]="Fuerza contra Guerrero", [60]="Fuerza contra Ninja", [61]="Fuerza contra Sura", [62]="Fuerza contra Shamane", [63]="Fuerza contra Moustro", } guardamos y cerramos y abrimos el server...
     
    Paso a explicar como funciona y que hace en realidad..
     
    por ejemplo en el sistema de energía cuando cuando nos aplica un bonos en lugar de que salga solo un mensaje fijo o tener que escribir muchas lineas dependiendo del bono extra que nos da simplemente escribimos una y el resto lo hace el sistema de traducción.
     
    Ej, el sistema hace esto:

    chat("Has recibido 10% de fuerza contra Medio Humano") Y la linea que escribimos en nuestra quest seria esta:

    chat("Has recibido "..boni_list[anz][2].." de "..bonus.trans[boni_list[anz][1]]) El sistema recoge los datos de la tabla del questlib con este código :

    bonus.trans[index] y así seria la explicación de su función:

    bonus.trans[Nombre de la tabla][Código del bonus de la tabla] Con esta sistema nos ahorramos de escribir muchisimas lineas en vuestras quest y muchos quebraderos de cabeza..
     
    Quiero dejar bien claro que este sistema lo cuelgo aquí porque me lo a pedido Noa, los méritos y el trabajo es de el completamente... yo solo lo e ayudado un poco en la traducirán... pero el sistema es de By Noa
     
    espero que les valga para vosotros ya que a mi me va de maravilla y funciona estupendamente..
     
    Saludo para todos
  12. Me Gusta
    Croqueta got a reaction from siguaschristofer2332 in quest para el caballo   
    esta quest te entrena el caballo automatico de 1 -21 nivel ademas te da loslibros que nesesita para llamar el caballo
    el presio sube como el caballo su nivel
    lvl 1-10 = 50000 yang
    lvl 11- 20= 100000 yang
    lvl 21 = 200000 yang
    los niveles estan en la tabla ni escritos.
    pienso que les gusten.
    un saludo a todos, Noa

    quest test begin state start begin when 20349.chat."Entrenar el Caballo" begin local bild= {50051,50052,50053,50050,50000} local ni={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 } local lvl = horse.get_level() for p = 1,table.getn(ni) do while lvl <= p do if lvl == 1 then pc.give_item2(bild[1]) elseif lvl == 11 then bild[5]=bild[5]+bild[5] pc.give_item2(bild[2]) elseif lvl == 21 then bild[5]=bild[5]+bild[5] pc.give_item2(bild[3]) break end if pc.get_money()<= bild[5] and pc.count_item(bild[4]) < 1 then say("no tienes sufisiente cosas para entrenar el caballo") return end lvl=lvl+1 horse.set_level(lvl) pc.change_money(-bild[5]) pc.remove_item(bild[4]) chat(horse.get_level()) setskin(NOWINDOW) end end end end end
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  13. Me Gusta
    Croqueta got a reaction from KaOoS in warp quest esplicasion   
    es similar a la de Nova map_wap.quest pero con commentarios para que sepan que ase algo en la tabla y como creer algo asi

    when 9009.chat."select in table " begin local tab={ {469300,964200}, --mp1 1 {55700,157900}, --mp1 2 {969600,278400}, --mp1 3 {217800,627200}, --des 1 {221900,502700}, --des 2 {344000,502500}, --des 3 {352300,882700}, --mp2 1 {145700,239800}, --mp2 2 {863800,246000}, --mp2 3 } say() if select("teleportation","cansel")==1 then if pc.is_gm() then s= select("mp1 1","mp1 2","mp1 3","des1 1","des1 2","des1 3","next","cancel") if s==8 then return end if s== 7 then s= select("mp2 1","mp2 2","mp2 3","cancel")+3 end else return end else return end pc.warp(tab[s][1],tab[s][2]) end
  14. Me Gusta
    Croqueta got a reaction from LeyendasMt2 in Alguien me puede corregir ^^   
    when kill with npc.is_pc() and pc.get_empire() ~= npc.get_empire() begin
    mysql_query("UPDATE player.player SET kills=kills+1 WHERE name='"..pc.get_name().."';")
    end

  15. Me Gusta
    Croqueta got a reaction from izaviona in Todos los flags   
    Antiflag:

    Mujeres 1 Hombres 2 Guerrero 4 Ninja 8 Sura 16 Chamán 32 Negosiar 64 Caer 128 Vender 256 Reino Rojo 512 Reino Amarillo 1024 Reino Azul 2048 Save 4096 Entregar 8192 PKDrop 16384 Apilable 32768 Shop(PC) 65536 Almacen 131072
     
    flag:

    aumentar 1 Save 2 Apilable 4 CountPer1Gold 8 lento Query 16 Unused01 32 unico 64 contable 128 no borrable 256 confirmacion en uso 512 Quest usar 1024 Quest usar doble 2048 Quest GIVE 4096 Item logar 8192 Applicable 16384
     
    Wearflags:

    Cuerpo 1 Cabeza 2 Pies 4 Muñeca 8 Arma 16 Collar 32 Pendientes 64 Unico('Velocidad de Zapato') 128 Escudo 256 Flecha 512 Cabello 1024 Habilidad 2048
     
    Como se calcula?
    ejemplo: Antiflag-> Mujer= 1 + Hombre= 2 = Mujeres y Hombres= 3
     
    Para que tengan un item (flag)complejo tienen que sumar los flags o Antiflags...
  16. Me Gusta
    Croqueta got a reaction from Tow Metin2 in quest para el caballo   
    esta quest te entrena el caballo automatico de 1 -21 nivel ademas te da loslibros que nesesita para llamar el caballo
    el presio sube como el caballo su nivel
    lvl 1-10 = 50000 yang
    lvl 11- 20= 100000 yang
    lvl 21 = 200000 yang
    los niveles estan en la tabla ni escritos.
    pienso que les gusten.
    un saludo a todos, Noa

    quest test begin state start begin when 20349.chat."Entrenar el Caballo" begin local bild= {50051,50052,50053,50050,50000} local ni={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 } local lvl = horse.get_level() for p = 1,table.getn(ni) do while lvl <= p do if lvl == 1 then pc.give_item2(bild[1]) elseif lvl == 11 then bild[5]=bild[5]+bild[5] pc.give_item2(bild[2]) elseif lvl == 21 then bild[5]=bild[5]+bild[5] pc.give_item2(bild[3]) break end if pc.get_money()<= bild[5] and pc.count_item(bild[4]) < 1 then say("no tienes sufisiente cosas para entrenar el caballo") return end lvl=lvl+1 horse.set_level(lvl) pc.change_money(-bild[5]) pc.remove_item(bild[4]) chat(horse.get_level()) setskin(NOWINDOW) end end end end end
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  17. Me Gusta
    Croqueta reacted to KeKo in [Quest] Item para habs a P   
    Hola a todos, por peticion de Thanatos hice esta quest para subirte las habs a P, esta perfectamente probada y funciona perfectamente, solo ponedle la id del item que querais usar.
     
    Nueva quest by Noa, super reducida, detecta sola tu raza y profesion y te sube las habs a P:
     

    quest perfect begin state start begin when 30100.use begin table.foreachi(special.active_skill_list[pc.get_job()+1][pc.get_skill_group()],function(r,skill) pc.set_skill_level(skill,59) end) chat("Has recibido tus P") item.remove() end end end Y aqui la vieja en spoiler por si alguien la quiere seguir usando:
     
     
     
  18. Me Gusta
    Croqueta got a reaction from master24 in Función de deslogueo   
    cuando un jugador se desconecta, abajo en el chat se ve el tiempo que nesesita para cerrar y cuando el jugador toca a desconectar, el tiempo se apara y el puede jugar normal.
    si te refieres que el jugador se desconecta del cliente/servidor nesesitas un peqeno script de python
    te busce el link,
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    en la game.py
    buscas esto

    def __ServerCommand_Build(self): y editas esto como los otros
    "exit" : self.__exit, y abajo abajo pones esto
    # Start_EXIT def __exit(self): app.Exit() #END_EXIT y en la quest pones
     

    cmdchat("exit") para que se cierra el cliente(el cliente se cierra instantáneamente )
  19. Me Gusta
    Croqueta got a reaction from KeKo in Unas quest?   
    o se puede aser asi tambien

    local eitem={ {item1,cantidad1}, {item2,cantidad2}, {item3,cantidad3}, {y asi mas} } pc.give_item2(eitem[number(1, table.getn(eitem))][1],eitem[number(1, table.getn(eitem))][2]) y la quest _____________________________________
     

    quest mob begin state start begin when kill with npc.get_race() == id del monstro begin local eitem={ {item1,cantidad1}, {item2,cantidad2}, {item3,cantidad3}, {y asi mas} } notice_all(""..pc.get_name().." ha acabado con nombremob") game.drop_item(eitem[number(1, table.getn(eitem))][1],eitem[number(1, table.getn(eitem))][2]) end end end
  20. Me Gusta
    Croqueta got a reaction from elkumanes in [Release]Cubo de basura   
    aqi esta un cubo de basura con la quest
    un screen de el cubo de basura. mi amigo hiro iso el modello jo la quest.
    cuando el jugador pone el item que qiere borrar en el cubo, te da dos optiones, si qieres borrar el ite o no.
    cuando selectiones a si entonses el item con la cantidad se borra de du inventar.
     


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  21. Me Gusta
    Croqueta got a reaction from Dextrok in [Bonus]Power_Mount   
    escriben en quest_functions
    esto

    pc.is_riding()
    en la quest estan cosas escribido para ajudar a editar la quest.
    Con la quest se puede llamar los Caballos como el leon, tigre ... y los demas y te da tambien los bonus
    el nivel de los Mounts(Caballos) se pude cambiar aqi, un ejemplo
     

    [71114]={20110, 999999999, 75,
    el 75 es el Nivel que nesesita para montar el Caballo
     

    quest power_mount begin
    state start begin
    --: Items
    when 71114.use or 71116.use or 71118.use or 71120.use or 71124.use or 71125.use or
    71126.use or 71127.use or 71128.use or 52006.use or 52021.use or 52051.use or
    52036.use or 52011.use or 52026.use or 52056.use or 52041.use or 52066.use or 52071.use or
    52076.use or 52081.use or 52086.use begin
    -- Nuevos items se escribe arriba
    -- para pones mas bonus sige el esquema

    --: Bonus
    local mB = {
    [71114]={20110, 999999999, 75,{{apply.ATT_GRADE_BONUS, 100, 999999999},{apply.DEF_GRADE_BONUS, 50, 999999999}}},
    [71116]={20111, 999999999, 75,{{apply.ATT_GRADE_BONUS, 100, 999999999},{apply.DEF_GRADE_BONUS, 50, 999999999}}},
    [71118]={20112, 999999999, 75,{{apply.ATT_GRADE_BONUS, 100, 999999999},{apply.DEF_GRADE_BONUS, 50, 999999999}}},
    [71120]={20113, 999999999, 75,{{apply.ATT_GRADE_BONUS, 100, 999999999},{apply.DEF_GRADE_BONUS, 50, 999999999}}},
    [71124]={20114, 999999999, 80,{{apply.ATT_GRADE_BONUS, 150, 999999999},{apply.DEF_GRADE_BONUS, 80, 999999999}}},
    [71125]={20115, 999999999, 90,{{apply.ATT_GRADE_BONUS, 200, 999999999},{apply.MAX_HP, 2000, 999999999}}},
    [71126]={20116, 999999999, 90,{{apply.ATT_GRADE_BONUS, 200, 999999999},{apply.MAX_HP, 2000, 999999999}}},
    [71127]={20117, 999999999, 90,{{apply.ATT_GRADE_BONUS, 200, 999999999},{apply.MAX_HP, 2000, 999999999}}},
    [71128]={20118, 999999999, 90,{{apply.ATT_GRADE_BONUS, 200, 999999999},{apply.MAX_HP, 2000, 999999999}}},
    [52006]={20201, 999999999, 100,{{apply.ATT_GRADE_BONUS, 250, 999999999},{apply.MAX_HP, 2500, 999999999},{apply.BLOCK, 10, 999999999}}},
    [52021]={20202, 999999999, 100,{{apply.ATT_GRADE_BONUS, 250, 999999999},{apply.MAX_HP, 2500, 999999999},{apply.BLOCK, 10, 999999999}}},
    [52051]={20203, 999999999, 100,{{apply.ATT_GRADE_BONUS, 250, 999999999},{apply.MAX_HP, 2500, 999999999},{apply.BLOCK, 10, 999999999}}},
    [52036]={20204, 999999999, 100,{{apply.ATT_GRADE_BONUS, 250, 999999999},{apply.MAX_HP, 2500, 999999999},{apply.BLOCK, 10, 999999999}}},
    [52011]={20209, 999999999, 110,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.MAX_HP, 3000, 999999999},{apply.CRITICAL_PCT, 15, 999999999}}},
    [52026]={20210, 999999999, 110,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.MAX_HP, 3000, 999999999},{apply.CRITICAL_PCT, 15, 999999999}}},
    [52056]={20211, 999999999, 110,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.MAX_HP, 3000, 999999999},{apply.CRITICAL_PCT, 15, 999999999}}},
    [52041]={20212, 999999999, 110,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.MAX_HP, 3000, 999999999},{apply.CRITICAL_PCT, 15, 999999999}}},
    [52061]={20213, 999999999, 1,{{apply.ATT_GRADE_BONUS, 50, 999999999}}},
    [52066]={20214, 999999999, 120,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.ATTBONUS_MONSTER, 10, 999999999},{apply.CRITICAL_PCT, 25, 999999999}}},
    [52071]={20215, 999999999, 130,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.ATTBONUS_MONSTER, 15, 999999999},{apply.BLOCK, 15, 999999999},{apply.CRITICAL_PCT, 20, 999999999}}},
    [52076]={20216, 999999999, 1,{{apply.ATT_GRADE_BONUS, 50, 999999999}}},
    [52081]={20217, 999999999, 120,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.ATTBONUS_MONSTER, 10, 999999999},{apply.CRITICAL_PCT, 25, 999999999}}},
    [52086]={20218, 999999999, 130,{{apply.ATT_GRADE_BONUS, 300, 999999999},{apply.ATTBONUS_MONSTER, 15, 999999999},{apply.BLOCK, 15, 999999999},{apply.CRITICAL_PCT, 20, 999999999}}}
    }
    -- es mejor no editir nada que no tenga esto --> --cambiar
    local item = item.get_vnum()
    local lvl = pc.get_level()
    local mM = mB[item][1]
    local mTime = mB[item][2]
    local nlvl = mB[item][3]
    local bN = table.getn(mB[item][4])
    --Controllar
    if pc.is_mount() or pc.is_riding() or pc.is_polymorphed()==false then
    if lvl >= nlvl then
    chat("Cuando el Mount se llamo!") --cambiar
    pc.mount(mM, mTime)
    for i=1, bN do
    pc.mount_bonus(mB[item][4][i][1], mB[item][4][i][2], mB[item][4][i][3])
    end
    else
    syschat(string.format(" tienes que ser %d nivel", nlvl)) --cambiar
    end
    end
    end
    end
    end[/Php]
  22. Me Gusta
    Croqueta got a reaction from Santy!. in [Release]give_basic_weapons   
    esta quest la escribi ase tiempo, tego una aora mejor que esta, pero esta es tambien buena,
    ponen los items que estan en la table y cambia el numero en el for ... do.
    los items estan editado como en metin2.esp (creo que son los items, por que ase mucho tiempo que no e jugado)

    quest basic begin state start begin when login with pc.get_level()==1 begin local krieger={10,11200,12200,13000,14000,15000,16000,17000,72701} --guererro local ninja={1000,11400,12340,13000,14000,15000,16000,17000,72701} --ninja local sura={10,11600,12480,13000,14000,15000,16000,17000,72701} --sura local schami={7000,11800,12620,13000,14000,15000,16000,17000,72701} --schaman local tra={27001,27004,71050} -- if pc.get_job()==0 then --guererro for i= 1,9 do pc.give_item2(krieger[i]) pc.give_item2(tra[i],50) end elseif pc.get_job()==1 then --ninja for i= 1,9 do pc.give_item2(ninja[i]) pc.give_item2(tra[i],50) end elseif pc.get_job()==2 then --... for i= 1,9 do pc.give_item2(sura[i]) pc.give_item2(tra[i],50) end elseif pc.get_job()==3 then --... for i= 1,9 do pc.give_item2(schami[i]) pc.give_item2(tra[i],50) end end setstate(fin) end end state fin begin end end
  23. Me Gusta
    Croqueta got a reaction from stein20 in quest en proyecto mapa metines con temporizador   
    quest mapa_metines begin state start begin when 20093.chat."Mapa Metines" begin say_title("Guardian De Los metines:") say("Hola Joven aventurero te traigo un nuevo reto") say("quieres obtener los items para evolucionar tus.") say("accesorios? para poder lograrlo tienes que sacar.") say("tu mayor valentia soportar la fuerte lluvia de metines") say("que han enviado. a este lugar y en algunos de ellos") say("encontraras estos preciosos items para hacer las Evos") say("estas listo? aver si tienes lo necesario?") if select("Tengo lo Necesario" , "no tengo lo necesario")== 1 then local i1,i2,i3 = 22010,70010,70302 say_title("Guardian De Los metines") say("") say_reward("Alto alli ! No puede pasar!") say_reward("Tienes Un Item Prohibido.") if pc.count_item(i1)~=0 then say_item_vnum(i1) elseif pc.count_item(i2)~=0 then say_item_vnum(i2) elseif pc.count_item(i3)~=0 then say_item_vnum(i3) end say_reward("Para entrar En Este Mapa.") say_reward("Desaste de el para poder entrar.") if pc.get_level() < 95 then say_title("Guardian De Los metines") say("") say("Tu nivel no es suficiente") say("vuelve cuando seas 95") return end wait() say_title("Guardian De Los metines:") say("") say("Bueno, veo que reunes los requisitos") say("para poder viajar al mapa de metines") say("") say("Elige el mapa al que quieres ir") say("y alli te llevare ahora mismo") say("") if select ("Mapa metines" , "Salir")== 1 then if pc.get_level() < 95 then say_reward("Usted debe ser nivel 95 para poder entrar¡"); elseif pc.count_item(50150) < 1 then say_title("Teletransportador Especial") say("") say_reward("Alto ahi ! No puede pasar!") say_reward("No tienes la Llave Para Ingresar") say_item_vnum("50150") say("") return end pc.remove_item(50150,1) if party.is_leader() then notice_all(pc.get_name().." Ha Entrado Al Mapa Del los metines") -- cual seria para colocar el líder del party? end pc.warp ( 1284700 , 1289800 ) end end end when login with pc.get_map_index() == 8 begin timer("pafuera", 7200) --2 horas end when pafuera.timer begin warp_to_village() end end end
  24. Me Gusta
    Croqueta got a reaction from stein20 in Quest Limitadores para entrar a un mapa   
    perdona se me olbido

    quest limit_map100 begin state start begin when login with pc.get_map_index() == 13 and pc.get_level() < 100 begin --si el jugador es menor de 100 (warp to village) local item = { 22010, 22011, 70010} --los items de table for _, stf in next,item do local zahl = pc.count_item(stf) if zahl > 0 then --si todos los items en la table son mas de 0 se borran todo pc.remove_item(stf, zahl) elseif pc.count_item(70302) > 0 then -- si el jugador tiene el anillo (warp to village) warp_to_village() end end warp_to_village() end end end
  25. Me Gusta
    Croqueta got a reaction from stein20 in Quest Limitadores para entrar a un mapa   
    te la escribi mejor y corta

    quest limit_map100 begin state start begin when login with pc.get_map_index() == 13 and pc.get_level() < 100 begin local item = { 70302, 22010, 22011, 70010} for _, stf in next,item do local zahl = pc.count_item(stf) if zahl > 0 then pc.remove_item(stf, zahl) end end warp_to_village() end end end
×
×
  • Crear nuevo...