PDA

View Full Version : npcpos.txt maker


Riane
09.05.2005, 12:37
well yes, some quick PCRE (only 1 line) and viola, heres the first version of the npcpos.txt maker.

[ npcpos.txt maker (http://riane.ellusion.com.sg/npcpos.php) ]


(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 KTHNX
pps: plz delete this (https://postpacific.mmorpg-game.online/forum/viewtopic.php?t=612), posted in wrong forum

nepsquare
09.05.2005, 13:07
Yikes, I'll take a lucky shot then when I get home...

Thx for the 1-liner! :)

hamidouch
09.05.2005, 13:43
really nice

nepsquare
10.05.2005, 11:09
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

nepsquare
10.05.2005, 11:22
But it works! @ 100% :)

Riane
11.05.2005, 15:03
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);

Riane
14.05.2005, 22:07
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)

rodier
16.05.2005, 14:46
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?