Jump to content

luizragna

Members
  • Content Count

    114
  • Joined

  • Last visited

  • Days Won

    6

Reputation Activity

  1. Upvote
    luizragna got a reaction from Senos in Ajuda - mcache Files   
    Amigo, eu estava com o mesmo problema que você, e fiz o seguinte:
    Segue este tutorial: http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC
    Onde ele diz YourPlugin (ou movespeed como mostra nas imagens), você troca por mapcache.
    Basicamente você só vai trocando os sample por mapcache.
    Então depois de compilar (como mostra no tutorial), vai funcionar
  2. Upvote
    luizragna reacted to bWolfie in Custom Unit HP Bar System   
    nice idea good work
  3. Upvote
    luizragna reacted to Habilis in Custom Unit HP Bar System   
    Combining, Thx for idea!
  4. Upvote
    luizragna reacted to AnnieRuru in Custom Unit HP Bar System   
    Move to Script Release
    nice idea !! if combine this with World Boss system I can see a lot of potential in this
  5. Like
    luizragna got a reaction from jasonch in Custom Unit HP Bar System   
    Hello guys, i'm making a custom hp bar system for mob units.
    The command show the HP of the mob for all players in the map.
     
    I am using the cutin command, the problem is that I do not think so many files are necessary. In the case 1 image for each percentage of hp I would like your opnion and help to improve this system and make it lighter.
    Test yourselves :).
     
    HP Bar System:
    payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == 0) { .HP_Bar = 1; .mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UDT_MAXHP,4000; setunitdata .mobGID,UDT_HP,4000; .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); } end; OnDie: .HP_Bar = 0; end; OnHPBar: .U_MAXHP = getunitdata (.mobGID,UDT_MAXHP); while (.HP_Bar != 0) { .U_HP = getunitdata (.mobGID,UDT_HP); .P_HP = (.U_HP*100)/.U_MAXHP; cutin(""+.P_HP+"", 1); sleep2 100; } cutin("0", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; }  







     
    Donwload of the data folder files: HP Bar System (2018-06-26).rar
  6. Like
    luizragna got a reaction from Megazord in Custom Unit HP Bar System   
    Hello guys, i'm making a custom hp bar system for mob units.
    The command show the HP of the mob for all players in the map.
     
    I am using the cutin command, the problem is that I do not think so many files are necessary. In the case 1 image for each percentage of hp I would like your opnion and help to improve this system and make it lighter.
    Test yourselves :).
     
    HP Bar System:
    payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == 0) { .HP_Bar = 1; .mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UDT_MAXHP,4000; setunitdata .mobGID,UDT_HP,4000; .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); } end; OnDie: .HP_Bar = 0; end; OnHPBar: .U_MAXHP = getunitdata (.mobGID,UDT_MAXHP); while (.HP_Bar != 0) { .U_HP = getunitdata (.mobGID,UDT_HP); .P_HP = (.U_HP*100)/.U_MAXHP; cutin(""+.P_HP+"", 1); sleep2 100; } cutin("0", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; }  







     
    Donwload of the data folder files: HP Bar System (2018-06-26).rar
  7. Like
    luizragna got a reaction from CDER in Custom Unit HP Bar System   
    Hello guys, i'm making a custom hp bar system for mob units.
    The command show the HP of the mob for all players in the map.
     
    I am using the cutin command, the problem is that I do not think so many files are necessary. In the case 1 image for each percentage of hp I would like your opnion and help to improve this system and make it lighter.
    Test yourselves :).
     
    HP Bar System:
    payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == 0) { .HP_Bar = 1; .mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UDT_MAXHP,4000; setunitdata .mobGID,UDT_HP,4000; .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); } end; OnDie: .HP_Bar = 0; end; OnHPBar: .U_MAXHP = getunitdata (.mobGID,UDT_MAXHP); while (.HP_Bar != 0) { .U_HP = getunitdata (.mobGID,UDT_HP); .P_HP = (.U_HP*100)/.U_MAXHP; cutin(""+.P_HP+"", 1); sleep2 100; } cutin("0", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; }  







     
    Donwload of the data folder files: HP Bar System (2018-06-26).rar
  8. Like
    luizragna got a reaction from zikoziz in Custom Unit HP Bar System   
    Hello guys, i'm making a custom hp bar system for mob units.
    The command show the HP of the mob for all players in the map.
     
    I am using the cutin command, the problem is that I do not think so many files are necessary. In the case 1 image for each percentage of hp I would like your opnion and help to improve this system and make it lighter.
    Test yourselves :).
     
    HP Bar System:
    payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == 0) { .HP_Bar = 1; .mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UDT_MAXHP,4000; setunitdata .mobGID,UDT_HP,4000; .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); } end; OnDie: .HP_Bar = 0; end; OnHPBar: .U_MAXHP = getunitdata (.mobGID,UDT_MAXHP); while (.HP_Bar != 0) { .U_HP = getunitdata (.mobGID,UDT_HP); .P_HP = (.U_HP*100)/.U_MAXHP; cutin(""+.P_HP+"", 1); sleep2 100; } cutin("0", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; }  







     
    Donwload of the data folder files: HP Bar System (2018-06-26).rar
  9. Upvote
    luizragna reacted to Habilis in Custom Unit HP Bar System   
    Very nice, but I think it would be annoying to do that for every single mob?
    Could be a nice feature for Boss mobs though. 
  10. Upvote
    luizragna got a reaction from Quazi in Custom Unit HP Bar System   
    Hello guys, i'm making a custom hp bar system for mob units.
    The command show the HP of the mob for all players in the map.
     
    I am using the cutin command, the problem is that I do not think so many files are necessary. In the case 1 image for each percentage of hp I would like your opnion and help to improve this system and make it lighter.
    Test yourselves :).
     
    HP Bar System:
    payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == 0) { .HP_Bar = 1; .mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UDT_MAXHP,4000; setunitdata .mobGID,UDT_HP,4000; .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); } end; OnDie: .HP_Bar = 0; end; OnHPBar: .U_MAXHP = getunitdata (.mobGID,UDT_MAXHP); while (.HP_Bar != 0) { .U_HP = getunitdata (.mobGID,UDT_HP); .P_HP = (.U_HP*100)/.U_MAXHP; cutin(""+.P_HP+"", 1); sleep2 100; } cutin("0", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; }  







     
    Donwload of the data folder files: HP Bar System (2018-06-26).rar
  11. Upvote
    luizragna reacted to AnnieRuru in Error when getunitdata from died unit   
    yeah we don't have *unitexists script command like rathena
    although I am also not sure want to implement or not
    because since the monster is set with a variable
    upon the monster died, the event label can reset the variable back to 0
     
    EDIT: ... maybe implement it then,
    with *unitexists script command maybe the .mobid there can become .@mobid
    PS: the script command setunitdata/getunitdata has more than 70% are not functioning,
    https://github.com/HerculesWS/Hercules/compare/stable...AnnieRuru:34-setunitdata
    and its not yet complete
     
  12. Upvote
    luizragna reacted to happles in Ajuda - mcache Files   
    Resolvido pessoal, podem fechar!
    Solução:
    Fora a falta do final do tutorial bem explicado que o @luizragna deu, o prompt não aceita o comando sendo feito se a pasta estiver em outro HD.
    É necessário utilizar primeiro o comando D: (ou qualquer letra da unidade que estiver o servidor) para que ele mude de diretório. As vezes depois eu faço um Guia em pt explicando melhor caso o povo tenha dificuldade Obrigado Luiz!
  13. Upvote
    luizragna reacted to w0wZukuBg in [Showcase] Arena R4   
    Check out my first release - a map with trains for routes 
    between Einbroch and Lighthalzen here:
     
  14. Upvote
    luizragna reacted to w0wZukuBg in [Showcase] Arena R4   
    Hello, I found this object at 1 @ rev when I looked through the list of
    of kRO locations. I liked it, it's more like an effect. This barrier on
    my map is marked by cells through which you can only shoot.
    And you can enter the zone only from the north side.

    Hi, I decided to support the section a little 
  15. Upvote
    luizragna reacted to w0wZukuBg in [Showcase] Arena R4   
    Hello and Hi!) I'm new here!)
    And I just want to show you my first map made in BrowEdit <3
    This map was created for my server, but it was closed, because nobody played it :С
    P.S. Feel free to comment/ask or let me know what you need to correct.
    .•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.•°'°•.
    arena_r4

    Please rate it  if the map is good enough
  16. Upvote
    luizragna reacted to bWolfie in [Guide] Mapcache Generation 2018   
    As of Release v2018.03.13, the method to generate mapcache for Hercules has changed. A lot of people. myself included, were confused as to how it works. In this thread, I will do my best to explain the new way to generate your cache. This guide is intended to help people using the old system, not to aid new people (i.e. never generated mapcache before), so if you are new, some of it may seem like alien talk.
    Old (your source predates [is older than] Feb 18, 2018)
    In the old system, there were two ways to generate mapcache
    You could run the mapcache executable in Hercules root folder. Or use a program such as WeeMapCache to edit in your required mapcache. These two methods would generate or alter your required mapcache located in db/[pre-re or re]/map_cache.dat. However, they are no longer supported.
    New (your source is using Release v2018.03.13 or newer)
    The new system involves the use of the new 'mapcache' plugin to generate files. Some quick points:
    db/[pre-re or re]/map_cache.dat has been dropped (no longer supported). In its place are individual .mcache files for every map located in maps/[pre-re or re]/ Mapcache executable has been removed. Replaced with the mapcache plugin (src/plugins/mapcache.c). How to generate the mapcache?
    Same as before, check conf/map/maps.conf and db/map_index.txt have all the maps you want to cache. Your maps need to exist somewhere in your repository! There are two ways for the plugin to find them:
    a. Place all your maps, including resnametable.txt, inside the data folder of your Hercules repo. I.e. Hercules/data/prontera.gat/gnd/gnd/rsw (note: I forget if all three files are needed).
    b. OR Configure your conf/grf-files.txt to tell it where to find your GRF(s) which contains your maps. Build the mapcache plugin. On linux, this can be done by running the following command:
    make plugin.mapcache
    If using MSVC, compile as you would any other plugin. Execute plugin. This can be done using the following command:
    ./map-server --load-plugin mapcache [param]
    In windows, just remove the './' and run the commands in your command prompt. The params:
    The first thing you should do is run
    ./map-server --load-plugin mapcache --help
    A list of usable parameters will appear. Here are the ones you need to know for mapcache:
    [Info]:   --convert-old-mapcache         Converts an old db/pre-re/map_cache.dat file to the new format. [Mapcache] [Info]:   --rebuild-mapcache             Rebuilds the entire mapcache folder (maps/pre-re/), using db/map_index.txt as index. [Mapcache] [Info]:   --map <name>                   Rebuilds an individual map's cache into maps/pre-re/ (usage: --map <map_name_without_extension>). [Mapcache] [Info]:   --fix-md5                      Updates the checksum for the files in maps/pre-re/, using db/map_index.txt as index (see PR #1981). [Mapcache] ./map-server --load-plugin mapcache --convert-old-mapcache
    Rebuild all the .mcache files using your old db/[pre-re or re]map_cache.dat file.
    NOTE: You should only run this command when you have an old map_cache.dat file you need to convert.
    ./map-server --load-plugin mapcache --rebuild-mapcache
    Rebuild all the .mcache files using your map files specified in step 2 of generation.
    NOTE: You should only run this command in special circumstances. This erases ALL the existing mapcache and rebuilds it with whatever files you provide it. If you don't have the required files, the build will fail and you will be left with missing mapcache files, meaning you won't be able to access those particular maps.
    ./map-server --load-plugin mapcache --map <name>
    Rebuild the .mcache file for the map name you specify. E.g. if you replace <name> with prontera, the maps/[pre-re or re]/prontera.mcache file will be rebuilt.
    NOTE: This is the best command to run, as it only caches a single map at a time.
    ./map-server --load-plugin mapcache --fix-md5
    I don't know what checksum is for.
    The End
    Feel free to ask for help here. I'll try to answer questions re: mapcache if possible. And if you think anything needs correcting or added, let me know.
    Hope this helps!
  17. Upvote
    luizragna reacted to AnnieRuru in Help Learning Instance and how it works. <3   
    similar topic appear in rathena forum
    prontera,155,180,0 script Test Instance 1_F_MARIA,{ if ( has_instance2("guild_vs2") >= 0 ) { // dispbottom has_instance2("guild_vs2") +" destroy"; instance_destroy has_instance2("guild_vs2"); } if ( ( .@ins = instance_create( "Test Instance", getcharid(CHAR_ID_ACCOUNT), IOT_CHAR ) ) < 0 ) { mes "error : "+ .@ins; close; } if ( !getstrlen( instance_attachmap( "guild_vs2", .@ins, true, ( getcharid(CHAR_ID_ACCOUNT) )+"INST" ) ) ) { mes "error : 5"; instance_destroy .@ins; close; } instance_set_timeout 3600, 15, .@ins; instance_init .@ins; warp has_instance("guild_vs2"), 49,49; end; } guild_vs2,49,49,5 script test dialog 1_F_MARIA,{ dispbottom strnpcinfo(NPC_MAP); mesf "%d monsters on this map", 'amount; next; select "Destroy"; instance_destroy; end; OnInstanceInit: monster has_instance("guild_vs2"), 49,49, "--ja--", PORING, 10, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead"; 'amount = 10; end; OnMobDead: --'amount; if ( !'amount ) instance_announce -1, "all monster killed", bc_map; end; } few things noted for hercules ones
    1. hercules has more instance related script commands, but also make this more flexible to write once you learn them all
    a. hercules has *instance_attach script command, make sure this script command is added before trying do anything instance related in the register npc
    b. hercules has to emulate the map name with *instance_attachmap if the map name doesn't follow the syntax <number>@<5 string limit>
    2. hercules instance ID start from 0, rathena instance ID start from 1
    a. make sure the instance_announce is set to -1
    3. hercules seems cannot *instance_destroy inside the instance map itself ... has to rely on *instance_set_timeout of the timeout value
  18. Upvote
    luizragna got a reaction from IndieRO in Script command execute for all players in the map   
    Thank you, guys!
     
    The full script:
    universe,40,40,4 script Tester#OP 4_M_REINDEER,{ .@count = getunits(BL_PC, .@units, false, "universe"); // Adds all BL_PC on prontera type to the array .@units for (.@i = 0; .@i < .@count; .@i++) addtimer(0, "Tester#OP::OnMyEvent", .@units[.@i]); end; OnMyEvent: mes "Hello"; close; }  
  19. Upvote
    luizragna reacted to meko in Script command execute for all players in the map   
    you could either use maptimer() or make your own function with getunits() and a for() loop
    EDIT: oops, @Myriad replied while I was writing this
  20. Upvote
    luizragna reacted to meko in Script command execute for all players in the map   
    @luizragna this because mes() and most commands only run for the attached player. If you want to run it for another player you will have to attachrid(.@units[.@i]); or addtimer(0, "MyNPC::MyEvent", .@units[.@i]);
    If you go for the timer approach you might as well just use maptimer()
  21. Upvote
    luizragna reacted to bWolfie in Script command execute for all players in the map   
    First use getunits() to capture all players on the map in an array.
    Then loop through the array using the for() function.
    Sample:
    .@count = getunits(BL_PC, .@units, false, "prontera"); // Adds all BL_PC on prontera type to the array .@units for (.@i = 0; .@i < .@count; .@i++) debugmes(sprintf("%s", rid2name(.@units[.@i]))); // Prints a debug msg in console of the player name It's returning their Account ID btw.
  22. Upvote
    luizragna reacted to JulioCF in Jogo desfigurado.   
    A, isso acontece comigo também. É o jogo muito antigo com pc muito novo. Se não me engano usando /lightmap resolve isso, ou isso é no setup
    Inclusive acontece comigo nos oficiais.. pessoalmente nem ligo kk
  23. Upvote
    luizragna got a reaction from JulioCF in Jogo desfigurado.   
    Acredito que se o problema fosse dll, ele nem abriria.
  24. Upvote
    luizragna reacted to XtriC in Credit to Zeny changer   
    +10 @luizragna thank you for your kind help
  25. Upvote
    luizragna got a reaction from XtriC in Credit to Zeny changer   
    Try now:
    I changed the coin to item ID 26080
    NPC Trader:
    prontera,136,217,4 script Coin Trader 4_M_MANAGER,{ .@npc$ = "[Coin Trader]"; //NPC Name mes .@npc$; mes "Hello. I'm the Coin Trader"; mes "I can trade Zeny for Coin and vice versa"; mes "(1 Coin = 10.000.000z)"; mes "What you want trade?"; next; menu "Zeny for Coins",zc,"Coins for Zeny",cz,"Close",cl; cl: close; zc: mes .@npc$; mes "How many Coins do you want purchase?"; mes "(1 Coin = 10.000.000z)"; input @zc; @qnt = @zc*10000000; if (Zeny - @qnt < 0){ mes "Do you not have zeny"; close; } getitem 26080,@zc; set Zeny,Zeny - @qnt; mes " "; mes "Thank You!"; mes "(Now do you have "+countitem(26080)+" Coin(s) )"; close; cz: mes .@npc$; mes "How many Coins you want sell?"; mes "Do you have "+countitem(26080)+" Coin(s)"; mes "(1 Coin = 10.000.000z)"; input @cz; @qnt = @cz*10000000; if (countitem(26080) - @cz < 0) { mes "Do you not have sufficient Coins"; close; } if (Zeny + @qnt > 2000000000){ mes "Do you can't stay more than 2b Zeny"; close; } delitem 26080,@zc; set Zeny,Zeny + @qnt; mes " "; mes "Thank You!"; mes "(Now do you have "+countitem(26080)+" Coin(s) )"; close; }  
    Coin Shop:
    prontera,141,217,4 script Coin Shop 4_F_TELEPORTER,{ mes "[Coin Shop]"; mes "Hello. Why do you want buy with yours Coins?"; mes "(Do you have "+countitem(26080)+" Coin(s) )"; menu "Red Potion (3 Coins)",rp,"Knife[4] (7 Coins)",kn,"Cancell",cl; cl: close; rp: if (countitem(26080) - 3 < 0) { mes "Do you not have sufficient Coins"; close; } delitem 26080,3; getitem 501,1; mes " "; mes "Thank You!"; mes "(Now do you have "+countitem(26080)+" Coin(s) )"; close; kn: if (countitem(26080) - 7 < 0) { mes "Do you not have sufficient Coins"; close; } delitem 26080,7; getitem 1202,1; mes " "; mes "Thank You!"; mes "(Now do you have "+countitem(26080)+" Coin(s) )"; close; }  
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.