Jump to content
  • 0

Help for modify


Question

Posted (edited)

Heres the script that i've requested long ago
 

- script       gvubhnji       -1,{

OnNPCKillEvent:

if( killedrid && ( getmonsterinfo(killedrid, 21) & 0x0020 ) && ( killedrid <= 3000 ) ) {

if( getmonsterinfo(killedrid, 22) )

.@R = rand( 100, 500 );//-- MVP

else

.@R = rand( 50, 150 );//-- MINIBOSS

#CASHPOINTS = #CASHPOINTS + .@R;

dispbottom "Gained : "+ .@R +" points. Total : "+ #CASHPOINTS +" points."; }

end;

}

just wanna make it have a percentage to get the cashpoint like

 

MVP - 100 - 500 (random) cashpoint 25% chance to earn

 

mini boss -50 - 150 (random) cashpoint  50% chance to earn

Edited by KCritz

10 answers to this question

Recommended Posts

Posted (edited)


OnNPCKillEvent:

if( killedrid && ( getmonsterinfo( killedrid, 21 ) & 0x0020 ) && ( killedrid <= 3000 ) ) {

if ( getmonsterinfo( killedrid, 22 ) ) {

if ( rand( 100 ) < 25 ) {

#CASHPOINTS += rand( 100, 500 );

dispbottom "You now have " +#CASHPOINTS+ " cash points.";

}

} else {

if ( rand( 100 ) < 50 )

#CASHPOINTS += rand( 50, 150 );

}

}

end;

Edited by Patskie
Edited
Posted

Kindly test.. 

 

find

if( getmonsterinfo(killedrid, 22) )

 

replace

set .@R,0;
if( getmonsterinfo(killedrid, 22) )

 

find

.@R = rand( 100, 500 );//-- MVP

 

replace

set .@MVPc,rand(3);
if(.@MVPc == 1) set .@R,rand( 100, 500 ); //-- MVP

 

find

.@R = rand( 50, 150 );//-- MINIBOSS

 

replace

set .@MVPc,rand(1);
if(.@MVPc == 1) set .@R,rand( 50, 150 ); //-- MINIBOSS
Posted (edited)

remove

set .@R,0;

find

set .@MVPc,rand(3);

replace

set .@MVPc,rand(4);

find

set .@MVPc,rand(1);

replace

set .@MVPc,rand(2);
Edited by sandbox
Posted
OnNPCKillEvent:
	if( killedrid && ( getmonsterinfo( killedrid, 21 ) & 0x0020 ) && ( killedrid <= 3000 ) ) {
		if ( getmonsterinfo( killedrid, 22 ) ) {
			if ( rand( 100 ) < 25 )
				#CASHPOINTS += rand( 100, 500 );
		} else {
			if ( rand( 100 ) < 50 ) 
				#CASHPOINTS += rand( 50, 150 );
		}
	}
	dispbottom "You now have " +#CASHPOINTS+ " cash points.";
	end;

getting error 

e0sbki.jpg

Posted (edited)

oopppsss ahaha my bad ahm sorry :P

 

still got a lil problem. it always give info about your cashpoint even I just kill normal monster like poring 

 

 

I kill angeling give me 50 cashpoint then in window chat will say "You now have 50 cash points." - check

 

I kill poring it shouldnt give me any cash but in window chat say "You now have 50 cash points." 

 

I would like to happen in getting cash is

You earn 50 cash points

Your total cash poins is 50

 

and when you kill another mvp or miniboss

 

You earn 38 cash point

Your total cash points is 88

Edited by KCritz

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...