Leaderboard
Popular Content
Showing content with the highest reputation on 06/08/18 in Posts
-
1 pointhttps://github.com/HerculesWS/Hercules/pull/2061 before understanding this pull request, let's talk about the history of OnNPCKillEvent History during the time OnNPCKillEvent implement, monster only spawn on the fields and dungeon, in this syntax ** Create a permanent monster spawn: <map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2> and the monsters that spawned with event labels were only use in job changer quests *monster("<map name>", <x>, <y>, "<name to show>", <mob id>, <amount>{, "<event label>";} Note: if you noticed some parameter missing, yup those were added later. Notice the permanent monster spawn during that time still doesn't support event labels So, in order to trigger the permanent monster spawn, OnNPCKillEvent was the only way (during that time) this was to separate the trigger between OnNPCKillEvent and monster with event labels Why separate them ? there's a good reason to separate them, aleos also said in this issue in fact, this bug was also brought up several times during eathena ... Let's give 2 examples: Example 1: Bot-killer script Bot-killer script is intended to kill bots, and bots usually only appear on fields/dungeon which makes OnNPCKillEvent: label an ideal solution to work on them currently, Bot-Killer script doesn't trigger with job changer script or event script because the job changer npc, the monster was spawned with event labels example like priest job change quest -> you have to kill all the undeads within 5 minutes imagine ... IF the Bot-Killer script was able to trigger monster with event labels, while the players was rushing against time, suddenly a bot-killer script pops up !! this is enough to make them fail the test ... same thing goes to other event scripts such as devil square when players were busy killing monsters, trying to get the most kills, suddenly a bot-killer script pops up !! enough to make them lose the 1st place Example 2: MVP ranking script + MVP Ladder game MVP ranking script ... show the top 10 MVP hunters in your server MVP ladder game ... a game to form a party then kill MVPs inside arena currently, the MVP ranking script doesn't record the MVP kills from MVP ladder game the reason is ... the MVP ladder game spawn the MVPs with event labels ... imagine IF the OnNPCKillEvent label able to trigger monster with event label players just has to replay the MVP ladder game again and again to earn themselves the best MVP hunter ... each game adds 39 kills, so cheap !! Don't need to find MVPs on the field anymore now that's defeat the purpose of MVP hunting .... I mean the MVP ranking script So why propose the change now ? Things has changed since then, especially with the introduction of instance script since all instance monster has event labels, previously said that monster only spawn on the fields and dungeon no longer apply Take a look back at Example 2 ... the MVP ranking script currently the MVP ranking only record the MVP kills that spawn MVP tombs but it doesn't record the kills from instance ... for example Nacht Sieger or Nidhoggur's Shadow or even Lighthalzen MVP Now here's the tricky part ... Example 1: Bot-Killer If we keep it as it is, the script works fine and if let OnNPCKillEvent run event labels, bot-killer can trigger inside job change npc (BUG) Example 2: MVP ranking script + MVP Ladder game If we keep it as it is, the MVP ranking script doesn't record the MVP kills from instance script (BUG) and if allow OnNPCKillEvent run event labels, MVP ranker script record the kills from MVP ladder game (BUG) both options are not a perfect solution but there is a way to actually solve all these problem, find this line OnNPCKillEvent: replace with ... OnNPCKillEvent: if ( getmapflag( strcharinfo(PC_MAP), mf_nosave ) ) end; let ALL OnNPCKillEvent: doesn't trigger on the map that has nosave mapflag simple because, all job changer npc and event maps has nosave mapflag ... this is easy this simple solution actually solve both example's problem above .... well actually I also has another patch ready ... but not sure if this setting make things more complicated ? well ... currently still in the discussion stage ~
-
1 pointif one doesn't want to rely on mapflags, they could also make the maps use a custom zone, and then it can be checked with OnNPCKillEvent: if (getmapinfo(MAPINFO_ZONE, strcharinfo(PC_MAP)) == "my_zone") end;
-
1 pointi thought stalker is already immune to dispell skill when linked?
-
1 point
-
1 point
-
1 pointhmm .. then how do the official server actually preventing players from using the SAME promotion code for multiple accounts ? because when I was fixing the script on rathena forum... I already noticed this 1. each account can only clam once 2. each IP can only claim once <-- not safe 3. use *getitembound ... ok I have no objection so I can abuse the system with, 1. after I got a promotion code, that can claim 10 times, 2. login an account, claim once .... 3. logout the game, restart the modem, shuffle your IP address 4. login another account, claim again repeat 10 times ok, let's say generate 100 different codes for 100 different donors... so they can use each code only once (limit 100 times) means generating 100 different codes for each player ... this only makes the GMs confused which code has been used b4 ... instead give out some gibberish word that you have sure which code is available, why not just give the item to them by let the player click on the npc ? unless I can clear out these doubts, I'm not going to make this scripts ... seems exploitable ... or maybe someone who actually has used this system b4, know how this system works, release a script for it so I can take a peek ... because all the promotion npc on the forum(hercules/rathena) can be exploit in some way prontera,155,185,5 script Reward/Compensation 1_F_MARIA,{ if ( #Compensation_June2018 ) { mes "you have claimed compensation"; close; } mes "We apologize for blah blah blah"; mes "so I give you a candy"; if ( !checkweight(Candy,1) ) { mes "hahaha you don't even has enough space to claim a candy hahaha"; close; } getitembound Candy, 1, 1; #Compensation_June2018 = 1; close; OnInit: OnHour00: if ( gettime(GETTIME_MONTH) == JUNE && gettime(GETTIME_DAYOFMONTH) >= 9 && gettime(GETTIME_DAYOFMONTH) <= 15 ) enablenpc strnpcinfo(0); else disablenpc strnpcinfo(0); end; } for me its a simple script ... but now you actually struct me with an idea to actually write one that can configure the time and the prize given.......
-
1 pointrathena has too many topic for this https://rathena.org/board/topic/115772-race-to-99-per-class/ although, all of them doesn't use SQL table I wonder why you need the SQL table for ? what kind of information you want to display on your website ?
-
1 pointTutorial Decompilando .Lub para .Lua Recentemente comecei a mexer com a janela de infinitas possibilidades que é a adição de custom itens e custom mobs e me deparei com a necessidade de realizar decompilação de arquivos .lub para .lua na atual pasta em uso para hexeds 2012+ que é a luafiles514. Este é um tutorial que ira de uma forma simples explicar como fazer este procedimento. - Índice Programas Utilizados. Procedimentos. Agradecimentos. Requerimentos - Luadec 0.6: http://files.luaforge.net/releases/luadec/luadec/0.6 - Wordpad ou qualquer editor de texto (recomendado Wordpad ^^) Procedimentos - Crie uma Nova Pasta (Onde quiser) - Baixe o Luadec 0.6 e extraia o Luadec.exe para a pasta criada. - Crie um arquivo de texto com o nome: batch.txt - Edite o batch.txt, selecione a opcao "Salvar como..", selecione "Todos os arquivos" e salve com o nome de batch.bat Seu ambiente para decompilação dos .lub está agora pronto. Para decompilar um .lub (utilizaremos como exemplo o accessoryid.lub): - Copie e cole o arquivo accessoryid.lub na pasta onde estao o luadec.exe e o batch.bat - Edite o arquivo batch.bat e escreva: luadec accessoryid.lub > accessoryid.lua - Salve e feche o editor de texto. - Em seguida execute o batch.bat e sera gerado o arquivo accessoryid.lua. Para decompilar qualquer outro .lub siga os mesmos procedimentos seguidos no exemplo: - Copie o arquivo.lub para o ambiente de decompilação. - Edite o batch.bat para o nome do arquivo de entrada e saída. luadec entrada.lub > saida.lua - Execute o batch.bat. Agradecimentos Ao usuário ivanyan do rathena que foi autor de um post onde eu conheci o luadec para decompilar o que eu precisava. Espero que seja útil. Abraços, Neko. Dica retirada do brAthena neste post.