![]() |
|
|
#1 |
|
Архивный участник
Join Date: Apr 2005
Posts: 196
|
well yes, some quick PCRE (only 1 line) and viola, heres the first version of the npcpos.txt maker.
[ npcpos.txt maker ] (took most of the UI from npcdata maker) (ehehe planning on making a whole L2scripts web app )this does: just lower the amount of mobspawns by the given percentage, but never deleting any mobs, or turning under 1 (unless you dont enter negative stuff, but well, if you want buggy output, make buggy input) this will do: -give a preview on old mob spawns/new mob spawns -delete double mob rows if exist and wanted -what you can think of ![]() PS::::: CANT TEST IF IT EVEN WORKS THIS WAY ITS ONLY GUESSING S/O PLZ TEST KTHNXpps: plz delete this, posted in wrong forum |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Apr 2005
Posts: 256
|
Yikes, I'll take a lucky shot then when I get home...
Thx for the 1-liner!
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Mar 2005
Posts: 475
|
really nice
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Apr 2005
Posts: 256
|
The files come out smaller than I uploaded them, also there's a return code in the first line of the altered file...I did it with 100% option.
Warning: chmod(): Operation not permitted in /home/riane/domains/riane.ellusion.com.sg/public_html/npcpos.php on line 16 |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Apr 2005
Posts: 256
|
But it works! @ 100%
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Apr 2005
Posts: 196
|
rofl
umm yah thats what happens if you have to go and post it in a hurry without testing (ive set chmod no idea why the error) (AND theres no error for me)for the files being smaller, the script's deleting some unneccessary whitespaces and replaces some TABs with whitespaces ps: this is the pcre one liner for this file ![]() preg_replace("/total( |)=( |)([0-9.]*)/e","\"total=\".ceil(\\3*$percentage/100)",$file); |
|
|
|
|
#7 |
|
Архивный участник
Join Date: Apr 2005
Posts: 196
|
bump, does this work?
s/o plz make one with like 10% mobs and check if the server's loading faster (and without errors of course) |
|
|
|
|
#8 |
|
Архивный участник
Join Date: May 2005
Posts: 979
|
Hm when I create new spawn (simply add NPC to existing spawn... like when I want have more traders at same place.. near.. ) NPC server is very unstable ;-(
why? |
|
|
|
|