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 Lexuslx570 in [HowTo] como meter las quests en el Foro(con tabs)   
    1.paso copia la quest

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 2.paso

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 3.paso escribe el codigo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 4.paso pone la quest en el codigo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 5.paso la resulta

    quests croquetatest begin state start begin when login begin say("hola, soi la croqueta, bien tostaita y calientita.") end end end
  2. Me Gusta
    Croqueta got a reaction from Marcos Pinheiro in [Release]Matar los Jugadores   
    la quest dise lo que ase

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  3. Me Gusta
    Croqueta got a reaction from clocki in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  4. Me Gusta
    Croqueta got a reaction from Ícaro Quin in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  5. 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.
  6. Me Gusta
    Croqueta got a reaction from Anime Channel 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.
  7. Me Gusta
    Croqueta got a reaction from Lincoln in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  8. Me Gusta
    Croqueta got a reaction from iM_ EnVyy in [HowTo] como meter las quests en el Foro(con tabs)   
    1.paso copia la quest

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 2.paso

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 3.paso escribe el codigo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 4.paso pone la quest en el codigo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 5.paso la resulta

    quests croquetatest begin state start begin when login begin say("hola, soi la croqueta, bien tostaita y calientita.") end end end
  9. 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.
  10. Me Gusta
    Croqueta got a reaction from Marcos Pinheiro in [Mini-R]Editor para lua   
    Holla,
    para la gente que qiera un editor de lua
     

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. es un direkt link.
     
    el Programm se llama SciTe y es mi favorido para trabajar con tablas en lua, con ese editor ise por ejemplo el itemshop completo en lua despues, lo escribi en Metin.
  11. Me Gusta
    Croqueta got a reaction from FlyAndFail in Creador de Items   
    la Quest funciona basica a mysql ella ase items y te lo pone en el Inventario(se tiene que desconectar despues para que el item aparesca)
    lo ise en una hora no me critican mucho por que no la tradusi jeje^^
     
    INFORMASION!!
    *************************************************
    TODOS LOS SAYS SE PUEDEN EDITAR
    *************************************************

    --© by Noa quest crate_item begin state start begin when 9009.chat."Item Herstellen" begin local iex= mysql_query("SELECT vnum FROM player.item_proto;") local name = pc.get_name() say("Hallo ud Willkommen im Item-Laden") say() say("Da du eine besondere Person bist kannst du dir ein item nach") say("Wunsch Herstellen.") local s=select("Waffe","Rüstung","Standard-Items","Abbrechen") if s==4 then return end if s==1 or s==2 then say("Gib die vnum des items ein") local iexi= input() say() say("gib die Position des items ein wo es im itemshoplager auftauchen soll") say() local pos= input() say() say("Gib die Steine ein, in platz 1-3") say() say("Slot1") say() local put1=input() say() say("Slot2") say() local put2=input() say() say("Slot3") say() local put3=input() say() -----------------------boni1------------------------------- say("Boni 1 (ID Findest du in der liste)") local boni0 = input() --boni say() say("menge für boni1") --menge local menge0= input() -----------------------boni2------------------------------- say("Boni 2 (ID Findest du in der liste)") local boni1 = input() --boni say() say("menge für boni2") --menge local menge1= input() -----------------------boni3------------------------------- say("Boni 3 (ID Findest du in der liste)") local boni2 = input() --boni say() say("menge für boni3") --menge local menge2= input() -----------------------boni4------------------------------- say("Boni 4 (ID Findest du in der liste)") local boni3 = input() --boni say() say("menge für boni4") --menge local menge3= input() -----------------------boni5------------------------------- say("Boni 5 (ID Findest du in der liste)") local boni4 = input() --boni say() say("menge für boni5") local menge4= input() ---------------------Spezialboni6------------------------------- say("Spezialboni 6 (ID Findest du in der liste)") local boni5 = input() --boni say() say("menge für boni6") local menge5= input() ---------------------Spezialboni7------------------------------- say("Spezialboni 7 (ID Findest du in der liste)") local boni6 = input() --boni say() say("menge für boni7") local menge6= input() say() say("Dieses item erstellen?") say_item_vnum(iexi) say("Stein 1: "..item_name(put1)) say("Stein 2: "..item_name(put2)) say("Stein 3: "..item_name(put3)) say("Boni 1: "..boni0.." Menge : "..menge0) say("Boni 2: "..boni1.." Menge : "..menge1) say("Boni 3: "..boni2.." Menge : "..menge2) say("Boni 4: "..boni3.." Menge : "..menge3) say("Boni 5: "..boni4.." Menge : "..menge4) say("Boni 6: "..boni5.." Menge : "..menge5) say("Boni 7: "..boni6.." Menge : "..menge6) if select("Herstellen","Abbrechen")==1 then mysql_query("INSERT INTO player.item SET id= id+1 ,owner_id= (SELECT id FROM player.player WHERE name = '" ..name.. "'),window= 'INVENTORY', pos= '"..pos.."', count= '1', vnum= '"..iexi.."', socket0= '"..put1.."',socket1= '"..put2.."',socket2= '"..put3.."',socket3= '0',socket4= '0',socket5= '0', attrtype0= '"..boni0.."',attrvalue0='"..menge0.."', attrtype1= '"..boni1.."',attrvalue1= '"..menge1.."',attrtype2= '"..boni2.."',attrvalue2= '"..menge2.."',attrtype3= '"..boni3.."',attrvalue3= '"..menge3.."',attrtype4= '"..boni4.."',attrvalue4= '"..menge4.."',attrtype5= '"..boni5.."',attrvalue5= '"..menge5.."',attrtype6= '"..boni6.."',attrvalue6= '"..menge6.."';") else return end end end end end
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  12. Me Gusta
    Croqueta got a reaction from Lord Ahriman - 3D Modeler in [Release]Matar los Jugadores   
    la quest dise lo que ase

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  13. Me Gusta
    Croqueta got a reaction from Ícaro Quin in [Release]Matar los Jugadores   
    la quest dise lo que ase

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  14. Me Gusta
    Croqueta got a reaction from ChuchoGamer in [Release]Matar los Jugadores   
    la quest dise lo que ase

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  15. Me Gusta
    Croqueta got a reaction from Teo García in Warp Quest (especial)   
    nivel:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. selection con el nivel:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    otro nivel:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. selection con ese nivel:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación.  
    para cambiar las mapas, editen la tabla

    quest tele begin state start begin function warp_tab(warp) local a,lvl={},pc.get_level() table.foreach(warp,function(val,i) if lvl >= val then table.insert(a,val) end end) return a end function local_table(warp) local tabelle,main_menu,sel_table = tele.warp_tab(warp),{},{} table.sort(tabelle) table.foreach(tabelle,function(i,n) main_menu[i]={warp[n][1],warp[n][2]} sel_table[i]=warp[n][3] end) return main_menu,sel_table end when 9009.chat."Teleport pro" begin local warp={ --[lvl]={x,y,"Map_name"}, [30]={105,106,"Cuba"}, [50]={109,110,"Spain"}, [20]={103,104,"Miami"}, [10]={101,102,"USA"}, [40]={107,108,"London"}, } say_title("Teleport:") say() say("if your level is rising, more maps unlocked.") say("where you like want to go?") local ports,map_auswahl=tele.local_table(warp) table.insert(map_auswahl,locale.cancel) local auswahl=select_table(map_auswahl)--select2(map_auswahl) if auswahl==table.getn(map_auswahl) then return end pc.warp(ports[auswahl][1],ports[auswahl][2]) --say(ports[auswahl][1].."x , "..ports[auswahl][2].." y") end end end
  16. Haha
    Croqueta got a reaction from iancu dumitrache in [Release]mesaje para el jugador   
    cuando el jugador entra al server la quest le da un texto
    para las otras cosas creo que se ve que ace
    esta quest se puede editar, el jugador nunca le da el mismo texto 2 veses solo si ustedes ponen 2 optiones
     

    quest player_msg begin state start begin function send_msg(a) local wDo = a or "login" local wN = { ["login"] = 1, ["levelup"] = 2, ["logout"] = 3, } local mToSend = { --para escribir mas que 1 texto tienes que separar los textos con unna "," { {"System: bienvenidos en nuestro Server Nombe de Server"}, {"System: Nuestra pagina encuentras en Debes iniciar sesión para ver el contenido del enlace en esta publicación. puedes meter aqi Debes iniciar sesión para ver el contenido del enlace en esta publicación. {"System: GM's nunca preguntan a tus datos ","un gm siempre tiene [GM] alante del nombre"}, }, -- texto cuando Levelup { {"LvlUp felicitación"}, }, -- texto cuando Logout { {"nada"} }, } --- aqi no cambian nada local mR = number(1, table.getn(mToSend[wN[wDo]])) for i = 1, table.getn(mToSend[wN[wDo]][mR]) do chat(mToSend[wN[wDo]][mR][i]) end end when login begin player_msg.send_msg("login") end when levelup begin player_msg.send_msg("levelup") end when logout begin player_msg.send_msg("logout") end end end
  17. Me Gusta
    Croqueta got a reaction from ChuchoGamer in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  18. Me Gusta
    Croqueta got a reaction from Cantimploras Strm in [PETICION]Quest Individuales para Caballo ^^,   
    esta quest es para todos los caballos
    una imagen, para ver como se ve en el juego
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. questlib.lua:

    pferd_quest_table={ [25]={50051,1,100000,101,20}, [35]={50052,11,250000,102,50}, [50]={50053,21,400000,103,100} }
    {50051,1,100000,101,20},
    Todo es editable:
     
    50051: es el libro para llamar el caballo
    1: es el nivel de el caballo
    100000: es el dinero q gana por la quest
    101: es el bicho q nesesita matar
    20: es cantidad q tiene q matar para q la quest se termine
     
    Quest:
     

    quest pferd_quest begin state start begin when levelup with type(pferd_quest_table[pc.get_level()])=='table' begin q.set_counter("kills",pferd_quest_table[pc.get_level()][5]) pc.setqf("kills",pferd_quest_table[pc.get_level()][5]) setstate(status) end end state status begin when letter begin send_letter("Caballo quest") end when button or info begin say_title("Caballo quest") say() say("Para la quest del Caballo "..pferd_quest_table[pc.get_level()][2]) say("tienes q matar "..pferd_quest_table[pc.get_level()][5].."x "..mob_name(pferd_quest_table[pc.get_level()][4])) say() say_reward("tienes q matar "..pc.getqf("kills").."x "..mob_name(pferd_quest_table[pc.get_level()][4])) end when kill with not npc.is_pc() and npc.get_race()==pferd_quest_table[pc.get_level()][4] begin local count = pc.getqf("kills") - 1 if count <= pferd_quest_table[pc.get_level()][5] then pc.setqf("kills", count) q.set_counter("kills", count) end if count == 0 then say("Felicidades") say_reward("nivel de caballo "..pferd_quest_table[pc.get_level()][2]) pc.give_item2(pferd_quest_table[pc.get_level()][1], 1) horse.set_level(pferd_quest_table[pc.get_level()][2]) pc.change_money(pferd_quest_table[pc.get_level()][3]) clear_letter() restart_quest() end end end end
  19. Me Gusta
    Croqueta got a reaction from andercitox in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  20. Me Gusta
    Croqueta got a reaction from litachi1995l 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 n1njutsu in [R]Multishining   
    playersettingsmodule.py
    en emotions, escriben esto, los numeros
    "EMOTICON+25" se tiene que corregir a el cliente de ustedes, por que si tienen 25-29 no pueden usar los mismos numeros.
    los "[TAB]" no se escriben, es solo una ayuda para que pongan los tabuladores.
    screen:http://prntscr.com/17jbx9
     
     
    game.py
    screen de commandlist:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. screen de la funcion abajo:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. buscan a esto
    def __ServerCommand_Build(self):
    serverCommandList={
    y pongan abajo de eso, esto
     
     
    uichat.py
    screen:
    Debes iniciar sesión para ver el contenido del enlace en esta publicación. buscan a esto
    def __SendChatPacket(self, text, type):
    y escriben a bajo esto
     
     
    para usar el shining como en mi video
    tienen q cargar el pack archivo, y ponerlo en el cliente de ustedes, en el pack ruta.
    despues tienen que editar el index a
    *
    shining
    como se ve en el screen aqi

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. lo que falta es la quest aqi esta
    1 rojo
    2 azul
    3 orage
    4 amarillo
    5 verde
    para que tenga una armadura ese shining, solo nesesitan editar la tabla,
     
    [vnumdelaarmadura]={shiningnumero,vnumdelaarmadura},
     

    quest testshining begin state start begin when login begin loop_timer("check",1) end when check.timer begin local items={ [11200]={1,11200},--los items que qiera tener un shining, lo pongan aqi [11201]={2,11201}, [11202]={3,11202} } pc.setqf("check",pc.get_armor()) if pc.get_armor()==0 then pc.setqf("use",0) pc.setqf("check",1) pc.setqf("last",2) end if pc.getqf("check")!= pc.getqf("last") then pc.setqf("use",0) pc.setqf("last",2) end if pc.getqf("check")!= pc.getqf("last") and pc.getqf("use")==0 then if pc.get_armor() == items[pc.get_armor()][2] then pc.setqf("last",pc.get_armor()) cmdchat("peng "..items[pc.get_armor()][1].."") pc.setqf("use",1) end end end end end

    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  22. Me Gusta
    Croqueta got a reaction from [email protected] in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
  23. Me Gusta
    Croqueta got a reaction from Tiburon 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.
  24. Me Gusta
    Croqueta got a reaction from litachi1995l in [HowTo] como meter las quests en el Foro(con tabs)   
    1.paso copia la quest

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 2.paso

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 3.paso escribe el codigo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 4.paso pone la quest en el codigo

    Debes iniciar sesión para ver el contenido del enlace en esta publicación. 5.paso la resulta

    quests croquetatest begin state start begin when login begin say("hola, soi la croqueta, bien tostaita y calientita.") end end end
  25. Me Gusta
    Croqueta got a reaction from N3tr0Z in [Release]Killcount   
    Contador de muertes:
     
    Cuenta cuando matas a los jugadores del reino amarillo, azul, rojo, monstruos o los jugadores de tu reino.
    Cuando matas a un jugador de tu reino se baja 1 punto del los puntos en el reino en el que esteas.


    Debes iniciar sesión para ver el contenido del enlace en esta publicación.
×
×
  • Crear nuevo...