-
Content Count
75 -
Joined
-
Last visited
-
Days Won
11
Posts posted by Cretino
-
-
35 minutes ago, celeron0134 said:Problem of the script
.@n = getareausers("quiz_02", 246, 372, 246, 372);
1) if player A is on .@n and player B is not on .@n ~ Player B can talk to the NPC
what to do:
1) if Player A is on .@n (talking or not talking to the NPC) Player B will not be able to talk to the NPC
for example .. on a soda machine.. only 1 person at a time can use the soda machine
if ((.@n == 1) && (strcharinfo(0) is not on .@n)) mes "someone is on front of me"; mes "and i am waiting for him/her to talk to me"; mes "wait till the player leave the cell"; end;
if ((.@n == 1) && (strcharinfo(0) is not on .@n)) mes "someone is on front of me"; mes "and i am waiting for him/her to talk to me"; mes "wait till the player leave the cell"; end;
You can use this command:
Spoiler*getunits(<type>, <variable>, <limit>{, "<map>"{, <x1>, <y1>, <x2>, <y2>}}) This function searches a whole map or area for units and adds their GID to the provided <variable> array. It filters units by <type> and stops searching after <limit> units have been found. Set <limit> to false (0) if you wish to disable the limit altogether. If <map> is omitted, this command will search on the whole server (slow). Returns the number of units added to the array. Type is the type of unit to search for: BL_PC - Character object BL_MOB - Monster object BL_PET - Pet object BL_HOM - Homunculus object BL_MER - Mercenary object BL_ITEM - Item object (item drops) BL_SKILL - Skill object (skill fx & sfx) BL_NPC - NPC object BL_CHAT - Chat object BL_ELEM - Elemental object BL_CHAR - Shorthand for (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM) BL_ALL - Any kind of object ** Do NOT use UNITTYPE_ constants here, they have different values. ** If battle_config.dynamic_mobs is enabled and no player has entered the map yet, the mobs will not have spawned in the map yet, so getunits() will be unable to find them when searching for BL_MOB. Example: .@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera"); The above example would search the map "prontera" for all PC and NPC units and add them to the .@units array, while setting .@count to the amount of units added to the array (useful in for() loops).
-
9 hours ago, Tio Akima said:guys
Hi guys
with the change of maximum level and maximum status (str, int, luk, etc ...)
do I need to set the maximum weight too?sometimes it happens that the char gets heavy with only 20% of objects in the warehouse
I figured that maybe the weight would adapt to the size of the force (whatever it is, str stats custom or not)
@EDIT doubt
I think the 'problem' is the character inventory size.
The client send the message 'You're overweight', but really you don't have space in your inventory.
-
5 hours ago, Tio Akima said:oh nice... I tested it with OnPCLogoutEvent:
but... he warned that the player gave up, but did not trigger the label OnArenaEvntCheck; LOL
he stopped for here:
I made some changes, now is working fine.
OnPCDieEvent part:
SpoilerOnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ ARENA_CHECK: if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { deletearray(.@units); .@count = getunits(BL_PC, .@units, false, "fight_05"); if (.@count == 1) { if (attachrid(.@units[0])) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } } end;
OnPCLogoutEvent part:
SpoilerOnPCLogoutEvent: if (strcharinfo(PC_MAP) == "fight_05" && @enter_arena == true) { @enter_arena = false; if ($arenaon && !$aberto) { announce "[Arena da Destruição]: "+strcharinfo(0)+" fugiu da batalha!",bc_all; $@qnton--; warp "kame_house",174,177; goto ARENA_CHECK; } } end;
-
4 hours ago, Tio Akima said:yeah, now it's great. LOL
Thanks for your help.
do you think the logic used to decremented the variable when a player dies, is good?
Because I just thought about a future error ... if a player quits, the variable will not be decremented, and this can cause a failure.
I thought about using "getmapusers" but, maybe he can make a mistake in counting, if he also counts the dead player on the map. o/'getmapusers' only will count a 'dead player' if he still in the map... but you already added this:
Spoilerif(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; }
When a player die, it send back to 'kame_house',
Now about the the quit players you can do this:
Add:
SpoilerOnPCLogoutEvent: if (strcharinfo(PC_MAP) == "fight_05" && @enter_arena == true) { announce "[Arena da Destruição]: "+strcharinfo(0)+" fugiu da batalha!",bc_all; @enter_arena = false; $@qnton--; sleep2 2000; warp "kame_house",174,177; goto OnArenaEvntCheck; } end;
And change these:
OnPCDieEvent part:
SpoilerOnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ OnArenaEvntCheck: if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { deletearray(.@units); .@count = getunits(BL_PC, .@units, false, "fight_05"); if (.@count == 1) { if (attachrid(.@units[0])) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } } end;
Enter arena part:
Spoilerentrar: announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all; percentheal 100,100; @enter_arena = true; warp "fight_05",0,0; end;
I think is it, not tested.
-
8 hours ago, Tio Akima said:hi Cretino, Thanks for the answer..
I did a test with two fighters ... And when one of them dies, the prize label is not triggered.
the console error
[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: strcharinfo (1 parameter):
[Debug]: Data: number value=0I made a little mistake, now is tested and working:
Spoiler//===== Arena de Combate ========================================== kame_house,196,151,3 script [RR] Tenente 4_EP16_STOLZ,{ mes $npc$; mes "Olá "+strcharinfo(0)+"!"; mes "Deseja entrar na Arena de Combate da Destruição?"; next; switch(select("Entrar:Informações:Não, obrigado")){ case 1: mes $npc$; if($aberto == 1) goto entrar; if($aberto == 0) mes "As porta para a Arena de Combate estão fechadas. Evento abre a cada 3 horas..."; close; end; case 2: mes $npc$; mes "Na Arena de Combate nós testaremos sua força."; mes "Você ira para uma arena onde terá uma guerra, o ultimo(a) player sobrevivente será o vencedor."; mes "Lembrando que, não é fácil. Por isso, prepare-se bem."; mes "Não será permitido o uso de poções e iteus consumiveis que abram vantagens."; mes "Caso você sejá o ultimo sobrevivente da Arena de Combate, você será recompensado!"; close; case 3: close; end; } OnArenaEvnt: if($aberto == 0){ donpcevent strnpcinfo(0)+"::OnArenaEvnt2"; } else { dispbottom "Evento Cancelado!"; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; //======================================================= init config's OnInit: $npc$ = "[ ^FF0000Red Rebbon^000000 ] ^9400D3 Tenente^000000 "; //nome npc bindatcmd "goarena",strnpcinfo(0)+"::OnArenaEvnt",99; waitingroom "Arena da Destruição",0; $@MaxMin = 1; // Minutos max pro jogador entrar na arena $@award = 1002; //id award end; //======================================================= end init entrar: announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all; percentheal 100,100; warp "fight_05",0,0; end; OnArenaEvnt2: // Abre-Inicia A ARENA announce "[Arena de Combate] Arena da Destruição está ABERTA!",0; set $aberto,1; //evento aberto para os player entrar set $arenaon,1; pvpoff "fight_05"; for(.@i = $@MaxMin; .@i > 0; .@i--) { announce "Arena da Desrtuição começará em " + .@i + " minutos!", 0; sleep 60000; } announce "[Arena de Combate] Arena da Destruição COMEÇOU!",0; //fecha o evento para não entrar mais ninguem set $aberto,0; //liga o pvp pvpon "fight_05"; set $@qnton,getmapusers("fight_05"); //pega a quantidade de usuarios que tem no mapa if($@qnton < 2){ announce "[Arena de Combate] Arena da Destruição foi encerrada por falta de lutadores!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; OnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { doevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } end; OnArenaEvntOff: //fecha o evento set $arenaon,0; set $aberto,0; //desliga o pvp pvpoff "fight_05"; announce "[Arena da Destruição] Arena finalizada!", 0; mapwarp "fight_05","kame_house",174,177; end; OnArenaPremio: announce "[Arena da Destruição]: ACABOU! O ganhador da Arena da Destruição foi " + strcharinfo(0) + "!",bc_all; sleep2 2000; mapannounce "fight_05", "Parabéns! Você é o grande vencedor!", 0; getitem $@award, 1; //entrega o premio sleep2 1000; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; //closed event end; } //////////////////////////////////////// fight_05 mapflag nowarp fight_05 mapflag nowarpto fight_05 mapflag noteleport fight_05 mapflag nosave SavePoint fight_05 mapflag nomemo fight_05 mapflag nobranch fight_05 mapflag nopenalty fight_05 mapflag nostorage fight_05 mapflag pvp_noparty fight_05 mapflag pvp_noguild ////////////////////////////////////////
-
5 hours ago, Tio Akima said:guys, someone help me fix this script
it is not working properly.
sometimes he announces as a winner the player who is dead
gives the prize to the wrong player ... etc
this is a combat arena where the last to survive is the winner.
Not tested, but I think now is working fine.
Spoiler//===== Arena de Combate ========================================== kame_house,196,151,3 script [RR] Tenente 4_EP16_STOLZ,{ mes $npc$; mes "Olá "+strcharinfo(0)+"!"; mes "Deseja entrar na Arena de Combate da Destruição?"; next; switch(select("Entrar:Informações:Não, obrigado")){ case 1: mes $npc$; if($aberto == 1) goto entrar; if($aberto == 0) mes "As porta para a Arena de Combate estão fechadas. Evento abre a cada 3 horas..."; close; end; case 2: mes $npc$; mes "Na Arena de Combate nós testaremos sua força."; mes "Você ira para uma arena onde terá uma guerra, o ultimo(a) player sobrevivente será o vencedor."; mes "Lembrando que, não é fácil. Por isso, prepare-se bem."; mes "Não será permitido o uso de poções e iteus consumiveis que abram vantagens."; mes "Caso você sejá o ultimo sobrevivente da Arena de Combate, você será recompensado!"; close; case 3: close; end; } OnArenaEvnt: if($aberto == 0){ donpcevent strnpcinfo(0)+"::OnArenaEvnt2"; } else { dispbottom "Evento Cancelado!"; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; //======================================================= init config's OnInit: $npc$ = "[ ^FF0000Red Rebbon^000000 ] ^9400D3 Tenente^000000 "; //nome npc bindatcmd "goarena",strnpcinfo(0)+"::OnArenaEvnt",99; waitingroom "Arena da Destruição",0; $@MaxMin = 1; // Minutos max pro jogador entrar na arena $@award = 1002; //id award end; //======================================================= end init entrar: announce "O jogador ["+strcharinfo(0)+"] entrou na Arena da Destruição!",bc_all; percentheal 100,100; warp "fight_05",0,0; end; OnArenaEvnt2: // Abre-Inicia A ARENA announce "[Arena de Combate] Arena da Destruição está ABERTA!",0; set $aberto,1; //evento aberto para os player entrar set $arenaon,1; pvpoff "fight_05"; for(.@i = $@MaxMin; .@i > 0; .@i--) { announce "Arena da Desrtuição começará em " + .@i + " minutos!", 0; sleep 60000; } announce "[Arena de Combate] Arena da Destruição COMEÇOU!",0; //fecha o evento para não entrar mais ninguem set $aberto,0; //liga o pvp pvpon "fight_05"; set $@qnton,getmapusers("fight_05"); //pega a quantidade de usuarios que tem no mapa if($@qnton < 2){ announce "[Arena de Combate] Arena da Destruição foi encerrada por falta de lutadores!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; } end; OnPCDieEvent: getmapxy(.@mapa$,.@xi,.@yi,0); if($arenaon){ if(strcharinfo(3) == "fight_05" ) { announce "[Arena da Destruição]: "+strcharinfo(0)+" foi derrotado!",bc_all; $@qnton--; sleep2 2000; warp "kame_house",174,177; } if(.@mapa$ == "fight_05"){ if($@qnton < 1){ announce "Arena da Destruição: Ninguém ganhou a Arena de Combate!",bc_all; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } if($@qnton == 2){ announce "[Arena da Destruição]: O grande momento chegou! Restam apenas 2 guerreiros na ARENA! Quem irá vencer?",bc_all; end; } if($@qnton == 1) { if (isloggedin(killerrid)) { if (attachrid(killerrid)) { donpcevent strnpcinfo(0)+"::OnArenaPremio"; end; } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } else { donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; end; } } } } end; OnArenaEvntOff: //fecha o evento set $arenaon,0; set $aberto,0; //desliga o pvp pvpoff "fight_05"; announce "[Arena da Destruição] Arena finalizada!", 0; mapwarp "fight_05","kame_house",174,177; end; OnArenaPremio: announce "[Arena da Destruição]: ACABOU! O ganhador da Arena da Destruição foi " + strcharinfo(0) + "!",bc_all; sleep2 2000; mapannounce "fight_05", "Parabéns! Você é o grande vencedor!", 0; getitem $@award; //entrega o premio sleep2 1000; donpcevent strnpcinfo(0)+"::OnArenaEvntOff"; //closed event end; } //////////////////////////////////////// fight_05 mapflag nowarp fight_05 mapflag nowarpto fight_05 mapflag noteleport fight_05 mapflag nosave SavePoint fight_05 mapflag nomemo fight_05 mapflag nobranch fight_05 mapflag nopenalty fight_05 mapflag nostorage fight_05 mapflag pvp_noparty fight_05 mapflag pvp_noguild ////////////////////////////////////////
-
9 hours ago, Kavaline said:Hi, I want a script that gives the player 5 seconds to type a word, with 'input'. But when the time runs out, the script runs normally, and after, read the event label of the time out.
Here is what I tried:
mes "type anything in 5 seconds"; addtimer(5000, strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs"); input(.@text); deltimer(strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs"); next; mes "you did it"; close; On5secs: mes "time over"; close;
mes "type anything in 5 seconds"; addtimer(5000, strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs"); input(.@text); deltimer(strnpcinfo(NPC_NAME_UNIQUE)+"::On5secs"); next; mes "you did it"; close; On5secs: mes "time over"; close;
Maybe is impossible for the 'timer' force close the 'input', but at least, I want a way that after the 'input', run the time out label if the time out, without run the lines above of the script. How I can do it?
Not tested, but I think will work.
Spoiler.@duration = 5; // In Seconds .time = gettimetick(2) + .@duration; mes "You have " + callfunc("Time2Str", .time) + " to type anything..."; addtimer(.@duration * 1000, strnpcinfo(NPC_NAME_UNIQUE) + "::OnTimerEnd"); input(.@text$); if (.time < gettimetick(2)) { mes "Everything is fine!"; mes .@text$; deltimer(strnpcinfo(NPC_NAME_UNIQUE) + "::OnTimerEnd"); close; } else { OnTimerEnd: mes "The time is over!"; close2; end; }
-
4 hours ago, Tio Akima said:Guys, can someone help me with an idea
I made an NPC with some missions and that creates an instance
In one of the missions the player needs to use a certain skill an amount "x" on a given map (in the instance)example: Use Stormgust 50 times
So, I'm thinking about how to make this count
Does anyone have any ideas?
I've been thinking about on that NPC who tests the damage on Imperium, I don't know ...You'll need use this plugin: OnPCUseSkillEvent
-
31 minutes ago, hadiesyafiq said:hi sir @Cretino i got this error...how can i fix this sir?
Try to update your Hercules emulator to the latest version.
-
11 minutes ago, hadiesyafiq said:Can you teach me how to put double drop rate script on your script that you give me?
I remember a way to do it by script... but I think you need to search and try to make little bit.
This is the last time I 'teach (give)' you something.
If you want help to you make something, I can help you with pleasure.
Spoiler -
3 minutes ago, hadiesyafiq said:Hi sir your script is to get base/job exp right?can add double drop rate too sir
This can't be done without source modification.
But you can add a buff for VIPs to improve the drop rate: 'SC_CASH_RECEIVEITEM'.
Search in your 'item_db' for more information.
-
What you want to do is not possible with these script commands.
Spoiler*setbattleflag("<battle flag>", <value>) *getbattleflag("<battle flag>") Sets or gets the value of the given battle flag. Battle flags are the flags found in the conf/map/battle/*.conf files and is also used in Lupus' variable rates script. Examples: // Will set the base experience rate to 20x (2000%) setbattleflag("base_exp_rate", 2000); // Will return the value of the base experience rate (when used after the // above example, it would print 2000). mes(getbattleflag("base_exp_rate"));
Using 'setbattleflag' you'll change the server rate for all when reload.
If you only want give 2x EXP to 'VIP' players, you can do this:
Spoiler -
9 hours ago, Tio Akima said:I'm trying to return the player matak using getunitdata, but it's giving error .. where am I going wrong?
.@mymagicatak = getunitdata(getcharid(CHAR_ID_ACCOUNT), UDT_MATKMAX);
but I have an error [Error]: buildin_getunitdata: Unknown object!
I tried to get gid with CHAR_ID_CHAR but it didn't work either
The actual 'getunitdata' has no support for player units.
This is why you receive this message error.
If you want to get values from player units, you'll need to make a source modification.
I made one, you can test if you want.
-
Yes, but you'll need to create a script command to do.
You can use this example I made:
rentitem2 usage:
Spoilerrentitem2(<item id>, <amount>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>, <seconds>{, <account ID>}) rentitem2("<item name>", <amount>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>, <seconds>{, <account ID>})
I also made a 'protection' if you create a rent item with cards, so players can't remove cards from rent items.
I think is it you want, good luck.
hadiesyafiq reacted to this -
I made some changes in your script, it's working now.
You can use item id, name or constants.
Spoilerfunction script NoItemProduce { setarray(.disabledItems,501,512,503); for(.@i = 0; .@i < getarraysize(.disabledItems); .@i++) { if (getitemname(.disabledItems[.@i]) == getitemname(getarg(0)) || .disabledItems[.@i] == atoi(getarg(0))) { dispbottom("This item is not available for item producing",C_RED); return true; } } return false; }
-
Hey guys, I've tested more my command and found some bugs.
I made some fixes and improvements, now is working well.
If have any bug, report to me for trying fix.
You guys can take the new '.diff' file in first post.
On 8/21/2019 at 10:43 PM, Eternity said:Thank you I'll be looking forward Cretino!
It give me bit of work, but it's done.
I did some testing and it's working fine.
Commands for rAthena version:
@reload "script/mob/shop/warp/function/mapflag/all"
Diff file: @reload_by_cretino_v0.1_rathena.diff
-
3 minutes ago, Eternity said:Will you support for rA version?
Not right now, maybe later...
Because I'll need to redo practically everything. -
Name: @reload atcommand
Creator: Me (@Cretino)
Version: 0.2 (Some fixes and improvements [Cretino])
Contributors:
Q: 'What features have '@reload atcommand'?'
R:
SpoilerYou can reload just one thing you want without remove all NPCs, Mobs, etc... eg: You can reload your scripts without remove your mobs alive. @reload "script/mob/shop/warp/trader/function/zone/mapflag/all" script: Only reload your scripts files. mob: Only reload your mobs files. shop: Only reload your shops files. warp: Only reload your warps files. trader: Only reload your traders files. function: Only reload your functions files. zone: Only reload your zones configuration. mapflag: Only reload your mapflags files. all: Reload all npc files like '@reloadscript'. You can enable 'Reload Fast Mode' to simplify the atcommand uncommenting '#define RELOAD_FAST_MODE' in 'npc.h' after apply the '.diff' file. The atcommand will work like this: @reload "script/mob/function/zone/mapflag/all" script: Now 'script' will reload all your scripts (including scripts, shops, traders and warps). mob: Only reload your mobs files. function: Only reload your functions files. zone: Only reload your zones configuration. mapflag: Only reload your mapflags files. all: Reload all npc files like '@reloadscript'.
Q: 'How to use these features?'
R:
Spoiler@reload "script/mob/shop/warp/trader/function/zone/mapflag/all" @reload script // Will reload only your scripts files. @reload script|mob // Will reload your scripts and mobs files. @reload script|mob|mapflag // Will reload your scripts, mobs and mapflags files. @reload shop // Will reload only your shops files. @reload shop|trader|warp // Will reload your shops, traders and warp files. @reload warp // Will reload only your warps files. @reload function // Will reload only your functions files. @reload zone // Will reload only your zones configuration. @reload all // Will reload all npc files like '@reloadscript'. @reload script|mob|shop|warp|trader|function|zone|mapflag // Will reload your scripts, mobs, shops, warps, traders, functions, zones and mapflags like '@reload all' or '@reloadscript'.
Q: 'How Can I enable 'Reload Fast Mode'?'
R:
SpoilerAfter apply the '.diff' file, go to 'src\map\npc.h' and open. Search for: // [Cretino] // Uncomment to enable the reload command fast mode. //#define RELOAD_FAST_MODE enum e_reload_type { RELOAD_NONE = 0x000, RELOAD_MOB = 0x001, RELOAD_SCRIPT = 0x002, #ifndef RELOAD_FAST_MODE RELOAD_SHOP = 0x004, RELOAD_WARP = 0x008, RELOAD_TRADER = 0x010, RELOAD_FUNCTION = 0x020, RELOAD_ZONE = 0x040, RELOAD_MAPFLAG = 0x080, RELOAD_ALL = 0x0FF #else RELOAD_FUNCTION = 0x004, RELOAD_ZONE = 0x008, RELOAD_MAPFLAG = 0x010, RELOAD_ALL = 0x01F #endif /* RELOAD_FAST_MODE */ }; Change to: // [Cretino] // Uncomment to enable the reload command fast mode. #define RELOAD_FAST_MODE enum e_reload_type { RELOAD_NONE = 0x000, RELOAD_MOB = 0x001, RELOAD_SCRIPT = 0x002, #ifndef RELOAD_FAST_MODE RELOAD_SHOP = 0x004, RELOAD_WARP = 0x008, RELOAD_TRADER = 0x010, RELOAD_FUNCTION = 0x020, RELOAD_ZONE = 0x040, RELOAD_MAPFLAG = 0x080, RELOAD_ALL = 0x0FF #else RELOAD_FUNCTION = 0x004, RELOAD_ZONE = 0x008, RELOAD_MAPFLAG = 0x010, RELOAD_ALL = 0x01F #endif /* RELOAD_FAST_MODE */ }; Now, 'Reload Fast Mode' is actived. :) (Need compile the emulator after the change)
I've tested and is working well, but can have bugs.
I'm accepting suggestions.
If you found any bug, report in topic or send me a private message.
I'll solve the problem as quickly as possible.
I think is it.
Note: Sorry for my English.
Diff file: @reload_by_cretino_v0.2.diff
-
Hey guys, I made some modifications and tested.
Now is working, you just need apply this '.diff' file: star_gladiator_use_tk_mission.diffRanking still working to Taekwon, Star Gladiator only get bonus hp/sp and skills if get max level of base and job.
Star Gladiator don't receive the skill 'Solar, Lunar and Stellar Shadow'(SG_DEVIL).
If have any bug, report to me to try fix.
Good luck.
-
Hey guys, I was testing my script in the latest Hercules revision and realized it had stopped working...
So I made some updates in script and source code to work again and also with some bug fixes.If have any bug, report to me for trying fix.
New script and source modification in first post.
@TOPIC
Version: 1.2 (Updated script and source modification to work with last Hercules revision [Cretino] (Need source modification))
-
Hello guys, I'm recently back and I think now my script is working fine...
I've tested so many times and is working, tested with all classes.
If have any bug, report to me for trying fix.
New script and source modification in first post.
@TOPIC
Version: 1.1 ("Fixed" bugged skills (Need source modification))
-
Eu acho que é isto que você está procurando, não testei mas provavelmente está funcionando, só aplicar o arquivo '.diff' no seu emulador ou abrir ele com um bloco de notas e ver onde foram feitas as modificações e fazer manualmente, se por acaso não estiver funcionando avisa ai, por que eu só vi se o código estava compilando e ele está.
Exemplo de como usar:Spoiler- script PickUpEvent FAKE_NPC,{ end; OnPCPickUpItemEvent: if (@pickup_itemid == 909) // Jellopy dispbottom "Você pegou " + @pickup_amount + "x " + getitemname(@pickup_itemid) + ", totalizando: " + countitem(@pickup_itemid); end; }
@Edit
Acabei de testar e está funcionando 100%, boa sorte.
-
Check these links:
Build for GCC: https://github.com/HerculesWS/Hercules/wiki/Building-HPM-Plugin-for-gcc
Build for Microsoft Visual C++: https://github.com/HerculesWS/Hercules/wiki/Building-HPM-Plugin-for-MSVC
-
Aqui está um exemplo básico amigo.
Está funcionando bem, agora só você fazer suas modificações.
que_ng,27,66,4 script Fogueira#Casa 4_TRACE,{ if (getcharid(CHAR_ID_CHAR) != getpartyleader(getcharid(CHAR_ID_PARTY), 2)) { unittalk getcharid(CHAR_ID_ACCOUNT), "Essa é a famosa " + strnpcinfo(NPC_NAME_VISIBLE) + "!"; end; } // Se a fogueira estiver acesa, desabilita a opção '- Acender' e ativa '- Assar Peixe' no menu. if (select(((.burning == true) ? "- Assar Peixe" : "- Acender") + ":- Sair") == 1) { if (.burning == true) { // Se a fogueira estiver acesa, executa o que está aqui... } else { .burning = true; .burning_time = gettimetick(2) + .burning_duration; } } close; OnInit: .burning = false; .burning_time = 0; .burning_duration = 5; // Duração da fogueira em segundos. while(true) { if (.burning == true) { specialeffect EF_KAEN; if (.burning_time <= gettimetick(2)) { .burning_time = 0; .burning = false; } } sleep 312; // Duração da animação do fogo. } end; }
Menu Pagination (Is it possible?)
in Script Support
Posted
Hey, this is one way to do it.