Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 01.12.2005, 12:32   #1
serjr
Архивный участник
 
Join Date: May 2005
Posts: 115
Default [Share] ai quest bounty rate changer

This little perl script will change money exp and sp bounty for quests in Ai.obj to 6/4/4 change this numbers for your own. Before run script convert ai.obj to ANSI.
P.S. need testing if you found any bug post will try to solve

Code:
#!/usr/bin/perl -w

use strict;
use warnings;

use Data::Dumper;

our $AI_FILE = 'ai.obj';

open F, $AI_FILE or die $!;
my $ai = join '', <F>;
close F;

# money money money

# push_const 57
# push_const 1500
# func_call 77	//  func[GiveItem1]

$ai =~ s/(push_const\s+57\s+push_const\s+)(\d+)(\s+func_call\s+77)/$1.(int($2)*6).$3/iegs;

# exp

# push_const 0
# push_const 3600
# func_call 171 //  func[IncrementParam] 

$ai =~ s/(push_const\s+0\s+push_const\s+)(\d+)(\s+func_call\s+171)/$1.(int($2)*4).$3/iegs;

# sp

# push_const 1
# push_const 3600
# func_call 171 //  func[IncrementParam] 

$ai =~ s/(push_const\s+1\s+push_const\s+)(\d+)(\s+func_call\s+171)/$1.(int($2)*4).$3/iegs;

open F, ">$AI_FILE.new" or die $!;
print F $ai;
close F;
serjr is offline  
Old 01.12.2005, 16:11   #2
Nurgl
Архивный участник
 
Join Date: May 2005
Posts: 118
Default Re: [Share] ai quest bounty rate changer

nice share :wink:
Nurgl is offline  
Old 01.12.2005, 17:17   #3
kvoxi
Архивный участник
 
Join Date: Oct 2005
Posts: 102
Default

PPL, do not convert from Unicode to ANSI before file processing. Just use this:
...
open($FHIN,"<:raw:encoding(utf16le)",$ai_in_dir."/".$ai_fname);
open($FHOUT,">:raw:encoding(utf16le)",$ai_out_dir. "/".$ai_fname);
...
This is full working part of my perl-scripts.
If u want to create a LA2-unicode file, plz write first:
#open...
printf $FHOUT chr(0xFEFF);
#write...
#close...
kvoxi is offline  
Old 02.12.2005, 07:52   #4
serjr
Архивный участник
 
Join Date: May 2005
Posts: 115
Default

thx for guide Kvoxi
serjr is offline  
Old 02.12.2005, 12:29   #5
SOnick
Архивный участник
 
Join Date: Feb 2005
Posts: 177
Default

And what will happen with quests like coin quest?
Does quests for levelling of clan (250k SP bounty) will triple?
SOnick is offline  
Old 02.12.2005, 12:31   #6
serjr
Архивный участник
 
Join Date: May 2005
Posts: 115
Default

all quests
serjr is offline  
Old 04.12.2005, 04:56   #7
rodier
Архивный участник
 
Join Date: May 2005
Posts: 979
Default

hmm there is one multiplier writed in python.. look on berlios for wxparser .. I used it some times ago.. but it does not multiply all quests ;-( but if u look on that source codes.. its nice..
rodier is offline  
 


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 19:06.