Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 09.05.2005, 12:37   #1
Riane
Архивный участник
 
Join Date: Apr 2005
Posts: 196
Default npcpos.txt maker

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 KTHNX
pps: plz delete this, posted in wrong forum
Riane is offline  
Old 09.05.2005, 13:07   #2
nepsquare
Архивный участник
 
Join Date: Apr 2005
Posts: 256
Default

Yikes, I'll take a lucky shot then when I get home...

Thx for the 1-liner!
nepsquare is offline  
Old 09.05.2005, 13:43   #3
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

really nice
hamidouch is offline  
Old 10.05.2005, 11:09   #4
nepsquare
Архивный участник
 
Join Date: Apr 2005
Posts: 256
Default

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 is offline  
Old 10.05.2005, 11:22   #5
nepsquare
Архивный участник
 
Join Date: Apr 2005
Posts: 256
Default

But it works! @ 100%
nepsquare is offline  
Old 11.05.2005, 15:03   #6
Riane
Архивный участник
 
Join Date: Apr 2005
Posts: 196
Default

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 is offline  
Old 14.05.2005, 22:07   #7
Riane
Архивный участник
 
Join Date: Apr 2005
Posts: 196
Default

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)
Riane is offline  
Old 16.05.2005, 14:46   #8
rodier
Архивный участник
 
Join Date: May 2005
Posts: 979
Default

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?
rodier is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:47.