Jump to content
  • 0
Mikhail von Hohenheim

[HELP] Monster Kill pt.2

Question

Uhm,, can someone please check out a script for me please,,

 

I started the script from a request from this thread: http://herc.ws/board/topic/11244-help-monster-kill/

 

well,,

 

basically this script will give stats (like str, agi, vit, etc),, depending on the number of kills of a certain monster,, but the amount of kills required per monster will increase checking the stat of the player,,

 

here's the script that i was able to make,,

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 10 >= 5)	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 15 >= 10 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 50 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 20 >= 15 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 30 >= 20 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 150 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 40 >= 30 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 250 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 50 >= 40 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 500 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 60 >= 50 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 1000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 70 >= 60 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 2500 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 80 >= 70 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 5000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 90 >= 80 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 100 >= 90 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 25000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}

I started out from poring as my basis for the monster,, but i also was able to make some for fabre, picky, willow, drops, and chonchon,.,,

 

i placed them here:

 

npc: npc/custom/monsterkillexp/strmonsters/picky.txtnpc: npc/custom/monsterkillexp/agimonsters/chonchon.txtnpc: npc/custom/monsterkillexp/vitmonsters/fabre.txtnpc: npc/custom/monsterkillexp/intmonsters/willow.txtnpc: npc/custom/monsterkillexp/dexmonsters/drops.txtnpc: npc/custom/monsterkillexp/lukmonsters/poring.txt

input the code in scripts_custom.conf

 

 

then when testing,, i summoned each monster out,, but,, it only worked 1 time on each monster after the amount of kill,,

 

after it gave 1 stat,, it never worked again,,

 

can someone please check it out,,

 

and enlighten me,,

 

 

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts

  • 0

no idea, since I have been scripting since 9 years ago, I found eathena script language is normal to me

i also have another idea,, like from this Chinese Light Novel http://www.wuxiaworld.com/tdg-index/, uhmm,, i dont know if its possible,, like for example, you consumed a specific item,,let's name it for example "str improving pill" that if you killed a specific number of monsters while that item is on duration,, it'd help you to improve str (same effect as this script)

you need to code a SC_xxx constant

during the effect, if kill the monster, will add Str

this can only done through source code, not npc script

 

hmm ... interesting idea, SC_ADDSTATKILLMOB

add this in my to-do list

sc_start4 SC_ADDSTATKILLMOB, 10000, PORING, 100, 1, bStr;
start a status, in 10 seconds,

kill a poring, 100% chance to gain 1 str stat

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

Uhm,, can someone please check out a script for me please,,

 

I started the script from a request from this thread: http://herc.ws/board/topic/11244-help-monster-kill/

 

well,,

 

basically this script will give stats (like str, agi, vit, etc),, depending on the number of kills of a certain monster,, but the amount of kills required per monster will increase checking the stat of the player,,

 

here's the script that i was able to make,,

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 10 >= 5)	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 15 >= 10 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 50 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 20 >= 15 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 30 >= 20 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 150 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 40 >= 30 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 250 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 50 >= 40 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 500 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 60 >= 50 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 1000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 70 >= 60 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 2500 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 80 >= 70 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 5000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 90 >= 80 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 100 >= 90 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 25000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}

I started out from poring as my basis for the monster,, but i also was able to make some for fabre, picky, willow, drops, and chonchon,.,,

 

i placed them here:

 

npc: npc/custom/monsterkillexp/strmonsters/picky.txtnpc: npc/custom/monsterkillexp/agimonsters/chonchon.txtnpc: npc/custom/monsterkillexp/vitmonsters/fabre.txtnpc: npc/custom/monsterkillexp/intmonsters/willow.txtnpc: npc/custom/monsterkillexp/dexmonsters/drops.txtnpc: npc/custom/monsterkillexp/lukmonsters/poring.txt

input the code in scripts_custom.conf

 

 

then when testing,, i summoned each monster out,, but,, it only worked 1 time on each monster after the amount of kill,,

 

after it gave 1 stat,, it never worked again,,

 

can someone please check it out,,

 

and enlighten me,,

 

test this you forgot to put a Boolean on each if statement

 

Test this script and check the amount of poring, don't use @reloadscript if you edit the script or else script won't load, restart your server to load the script.

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 5 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 5 && readparam(bLuk) <= 10 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 10 && readparam(bLuk) <= 15 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 15 && readparam(bLuk) <= 20 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 20 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 20 && readparam(bLuk) <= 25 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 25 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 30 && readparam(bLuk) <= 40 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 40 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 40 && readparam(bLuk) <= 50 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 50 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 50 && readparam(bLuk) <= 60 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 60 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 60 && readparam(bLuk) <= 70 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 70 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 70 && readparam(bLuk) <= 80 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 80 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 80 && readparam(bLuk) <= 90 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 90 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 90 && readparam(bLuk) <= 99 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}
Edited by Zhao Chow

Share this post


Link to post
Share on other sites
  • 0

 

 

test this you forgot to put a Boolean on each if statement

 

Test this script and check the amount of poring, don't use @reloadscript if you edit the script or else script won't load, restart your server to load the script.

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 5 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 5 && readparam(bLuk) <= 10 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 10 && readparam(bLuk) <= 15 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 15 && readparam(bLuk) <= 20 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 20 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 20 && readparam(bLuk) <= 25 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 25 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 30 && readparam(bLuk) <= 40 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 40 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 40 && readparam(bLuk) <= 50 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 50 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 50 && readparam(bLuk) <= 60 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 60 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 60 && readparam(bLuk) <= 70 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 70 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 70 && readparam(bLuk) <= 80 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 80 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 80 && readparam(bLuk) <= 90 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 90 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 90 && readparam(bLuk) <= 99 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}

 

 

tested it out,, worked perfectly on a new character,,

thanks alot,,

 

 

I think i got it now where its getting the issue,,

 

i checked again the previous posts

 

 

 

good point @@mrlongshen

yes, in order for the status point to persist after a status reset

 

your server must be pre-renewal setting (as renewal has to use statpoint table)

and set the use_statpoint_table MUST set to no to prevent bugs

// Use the contents of db/statpoint.txt when doing a stats reset and leveling up? (Note 1)

// If no, an equation will be used which preserves statpoints earned/lost

// through external means (ie: stat point buyers/sellers)

use_statpoint_table: no

 

 

for example I already reached 21 luk,, I @luk -20 to bring back luck to 1,, then afterwards it will work again until 21 luk,, but then afterwards it will stop working,, no matter how many poring you kill,,

 

is there a workaround for this?? im using renewal,,

Share this post


Link to post
Share on other sites
  • 0

I think this kind of stuff should be given as a quest ...

so it wont trigger globally

 

for example, if the player taken a quest, and the player complete it, then give 20 status points

this method is more practical

Share this post


Link to post
Share on other sites
  • 0

 

Uhm,, can someone please check out a script for me please,,

 

I started the script from a request from this thread: http://herc.ws/board/topic/11244-help-monster-kill/

 

well,,

 

basically this script will give stats (like str, agi, vit, etc),, depending on the number of kills of a certain monster,, but the amount of kills required per monster will increase checking the stat of the player,,

 

here's the script that i was able to make,,

 

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 10 >= 5)	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 15 >= 10 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 50 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 20 >= 15 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 30 >= 20 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 150 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 40 >= 30 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 250 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 50 >= 40 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 500 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 60 >= 50 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 1000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 70 >= 60 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 2500 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 80 >= 70 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 5000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 90 >= 80 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) < 100 >= 90 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 25000 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}
I started out from poring as my basis for the monster,, but i also was able to make some for fabre, picky, willow, drops, and chonchon,.,,

 

i placed them here:

 

npc: npc/custom/monsterkillexp/strmonsters/picky.txtnpc: npc/custom/monsterkillexp/agimonsters/chonchon.txtnpc: npc/custom/monsterkillexp/vitmonsters/fabre.txtnpc: npc/custom/monsterkillexp/intmonsters/willow.txtnpc: npc/custom/monsterkillexp/dexmonsters/drops.txtnpc: npc/custom/monsterkillexp/lukmonsters/poring.txt
input the code in scripts_custom.conf

 

 

then when testing,, i summoned each monster out,, but,, it only worked 1 time on each monster after the amount of kill,,

 

after it gave 1 stat,, it never worked again,,

 

can someone please check it out,,

 

and enlighten me,,

 

test this you forgot to put a Boolean on each if statement

Test this script and check the amount of poring, don't use @reloadscript if you edit the script or else script won't load, restart your server to load the script.

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 5 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 5 && readparam(bLuk) <= 10 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 10 && readparam(bLuk) <= 15 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 15 && readparam(bLuk) <= 20 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 20 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 20 && readparam(bLuk) <= 25 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 25 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 30 && readparam(bLuk) <= 40 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 40 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}		if ( readparam(bLuk) >= 40 && readparam(bLuk) <= 50 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 50 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 50 && readparam(bLuk) <= 60 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 60 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 60 && readparam(bLuk) <= 70 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 70 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 70 && readparam(bLuk) <= 80 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 80 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 80 && readparam(bLuk) <= 90 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 90 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	if ( readparam(bLuk) >= 90 && readparam(bLuk) <= 99 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}
OMG, NO,

you increased poringkill several times in 1 kill, only increase it at start and check conditions....

Also poringkill is set to 0 if first condition is met, so it won't give any other stat,

Put poringkill=0 on end of line

(And last, this is Soo unoptimized, you could use array and make it simpler to manage.)

Share this post


Link to post
Share on other sites
  • 0

I think this kind of stuff should be given as a quest ...

so it wont trigger globally

 

for example, if the player taken a quest, and the player complete it, then give 20 status points

this method is more practical

 

Master thanks for the idea,, But im planning on having just up to level 100 renewal server,,

 

the idea is like just to be able to have max all stats upto 100 also,, but still just level 100,, but dont want to have a quest for it,,

 

actually,, that script is just like a basis,, but i'll be setting limitation,, like for exampl killing a number of porings can only support you upto 20 luk,, then from 20~40 luk there'll be a different set of monsters to help you improve your stats,,

 

 

 

 

>OMG, NO,

you increased poringkill several times in 1 kill, only increase it at start and check conditions....

Also poringkill is set to 0 if first condition is met, so it won't give any other stat,

Put poringkill=0 on end of line

(And last, this is Soo unoptimized, you could use array and make it simpler to manage.)

 
lockquote>

 

uhm,,

increasing poringkill several times in 1kill,,

i dont know if i got that correctly,, you mean like 1 poring kill triggers all the 13 "if"s?? but there's a set paramater each right?? like this:

 

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}

would only work if LUK is below 5,,

 

about the unoptimized,, yes,, i thinks so too,, its actually hard to replicate this for other monsters as its too time consuming,,

 

so how about this??

 

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( killedrid == PORING ) 	if ( readparam(bLuk) < 5 ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 5 && readparam(bLuk) <= 10 ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;		}	}		if ( readparam(bLuk) >= 10 && readparam(bLuk) <= 15 ) {		poringkill++;		if ( poringkill == 25 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 15 && readparam(bLuk) <= 20 ){		poringkill++;		if ( poringkill == 40 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 20 && readparam(bLuk) <= 25 ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;		}	}		if ( readparam(bLuk) >= 25 && readparam(bLuk) <= 30 ) {		poringkill++;		if ( poringkill == 150 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 30 && readparam(bLuk) <= 40 ) {		poringkill++;		if ( poringkill == 200 ) {			statusup2 bLuk, 1;		}	}			poringkill = 0;	end;}

i dont know if a place the poringkill at the right place,, and if the (killerid = PORING) is also at the right place,,

 

can someone verify this out please,, thanks,, 

 

added:

 

ouch I also quoted out my own reply,, 

Share this post


Link to post
Share on other sites
  • 0

 

I think this kind of stuff should be given as a quest ...

so it wont trigger globally

 

for example, if the player taken a quest, and the player complete it, then give 20 status points

this method is more practical

 

Master thanks for the idea,, But im planning on having just up to level 100 renewal server,,

 

the idea is like just to be able to have max all stats upto 100 also,, but still just level 100,, but dont want to have a quest for it,,

 

actually,, that script is just like a basis,, but i'll be setting limitation,, like for exampl killing a number of porings can only support you upto 20 luk,, then from 20~40 luk there'll be a different set of monsters to help you improve your stats,,

 

 

 

 

 

>>OMG, NO,

you increased poringkill several times in 1 kill, only increase it at start and check conditions....

Also poringkill is set to 0 if first condition is met, so it won't give any other stat,

Put poringkill=0 on end of line

(And last, this is Soo unoptimized, you could use array and make it simpler to manage.)

 
lockquote>lockquote>

 

uhm,,

increasing poringkill several times in 1kill,,

i dont know if i got that correctly,, you mean like 1 poring kill triggers all the 13 "if"s?? but there's a set paramater each right?? like this:

 

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( readparam(bLuk) < 5 )	if ( killedrid == PORING ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;			poringkill = 0;		}	}	end;}

would only work if LUK is below 5,,

 

about the unoptimized,, yes,, i thinks so too,, its actually hard to replicate this for other monsters as its too time consuming,,

 

so how about this??

 

//	kill 10 monsters gets 1 status point-	script	PoringKill	FAKE_NPC,{OnNPCKillEvent:	if ( killedrid == PORING ) 	if ( readparam(bLuk) < 5 ) {		poringkill++;		if ( poringkill == 10 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 5 && readparam(bLuk) <= 10 ) {		poringkill++;		if ( poringkill == 15 ) {			statusup2 bLuk, 1;		}	}		if ( readparam(bLuk) >= 10 && readparam(bLuk) <= 15 ) {		poringkill++;		if ( poringkill == 25 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 15 && readparam(bLuk) <= 20 ){		poringkill++;		if ( poringkill == 40 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 20 && readparam(bLuk) <= 25 ) {		poringkill++;		if ( poringkill == 100 ) {			statusup2 bLuk, 1;		}	}		if ( readparam(bLuk) >= 25 && readparam(bLuk) <= 30 ) {		poringkill++;		if ( poringkill == 150 ) {			statusup2 bLuk, 1;		}	}	if ( readparam(bLuk) >= 30 && readparam(bLuk) <= 40 ) {		poringkill++;		if ( poringkill == 200 ) {			statusup2 bLuk, 1;		}	}			poringkill = 0;	end;}

i dont know if a place the poringkill at the right place,, and if the (killerid = PORING) is also at the right place,,

 

can someone verify this out please,, thanks,, 

 

added:

 

ouch I also quoted out my own reply,, 

 

I dont know what is the purpose of this, i just fix the Boolean, anyway like @@AnnieRuru said, it much better if you put it on the quest but the same process by killing monster or an item exchange to stats... something like that

Share this post


Link to post
Share on other sites
  • 0

Master thanks for the idea,, But im planning on having just up to level 100 renewal server,,

 

the idea is like just to be able to have max all stats upto 100 also,, but still just level 100,, but dont want to have a quest for it,,

 

actually,, that script is just like a basis,, but i'll be setting limitation,, like for exampl killing a number of porings can only support you upto 20 luk,, then from 20~40 luk there'll be a different set of monsters to help you improve your stats,,

like I said, make it a quest

 

for example, when the player reach level 100, then they go to this npc

player can select which stat to improve from the npc, so let's say bStr

the npc will ask the player go hunt a set of monster <== you can even use *questprogress script command for it

after player hunt all the monster, the npc reward player 1 extra stat

 

and the quest can be repeat until player reach max stat

 

doing like this will be more practical, rather than using OnNPCKillEvent to trigger the label globally

 

EDIT:

or ...

when player is bored, and is still below level 50, go to this npc, take the quest to improve bStr

the npc give a quest to kill 1000 porings, and after complete it, reward 1 bStr

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

@@Zhao Chow & @@AnnieRuru

 

hmmmmm,,, so I'll also need to study how to make an NPC,,,

 

well ok,, thanks Master AnnieRuru and Zhao,,

 

but there's also something that i would like to ask,, is there a downside,, or a negative effect on the server if it will be a global NPC for example to ALL monsters?? like every monster will have a script that will give a stat once you've defeated a number of them??

Share this post


Link to post
Share on other sites
  • 0

OnNPCKillEvent runs whenever a player kill any monster(that doesn't have an event label), and this trigger globally

even if the player is not doing quest, just kill monster for fun

or gm summons tons of monsters,

it still trigger OnNPCKillEvent label

and if you have 10 different npc with OnNPCKillEvent,

a wizard doing a storm gust killing 50 porings will trigger OnNPCKillEvent 500 times

 

its better to use questprogress for this operation,

questprogress automatically detect only which monster ID you kill, and update internally without trigger any script operation

 

I wrote a sample questlog script -> http://herc.ws/board/topic/7218-sample-questlog-script/

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

OnNPCKillEvent runs whenever a player kill any monster(that doesn't have an event label), and this trigger globally

even if the player is not doing quest, just kill monster for fun

or gm summons tons of monsters,

it still trigger OnNPCKillEvent label

and if you have 10 different npc with OnNPCKillEvent,

a wizard doing a storm gust killing 50 porings will trigger OnNPCKillEvent 500 times

 

its better to use questprogress for this operation,

questprogress automatically detect only which monster ID you kill, and update internally without trigger any script operation

 

I wrote a sample questlog script -> http://herc.ws/board/topic/7218-sample-questlog-script/

 

 

hmmmmm,, you have a point there,, like for example the poring catcher event,, right??

 

but the script should look first if the stat of the player is within range,, if not,, it should not give any bonus stat,, right?? or is it not??

 

btw,,

 

what i mean in my question,, is,, will it give more latency on the server,, IF (for example) ALL monsters have a script for getting a stat??

Share this post


Link to post
Share on other sites
  • 0

hmmmmm,, you have a point there,, like for example the poring catcher event,, right??

poring catcher event, in that script all monster has event labels

so OnNPCKillEvent shouldn't trigger with them

.

.

but the script should look first if the stat of the player is within range,, if not,, it should not give any bonus stat,, right?? or is it not??

but it still trigger OnNPCKillEvent label non-the-less

as long as the server do something like triggering an event label, any script command will return as a function in the source code

.

.

what i mean in my question,, is,, will it give more latency on the server,, IF (for example) ALL monsters have a script for getting a stat??

yes

Share this post


Link to post
Share on other sites
  • 0

 

hmmmmm,, you have a point there,, like for example the poring catcher event,, right??

poring catcher event, in that script all monster has event labels

so OnNPCKillEvent shouldn't trigger with them

.

.

>but the script should look first if the stat of the player is within range,, if not,, it should not give any bonus stat,, right?? or is it not??

but it still trigger OnNPCKillEvent label non-the-less

as long as the server do something like triggering an event label, any script command will return as a function in the source code

.

.

what i mean in my question,, is,, will it give more latency on the server,, IF (for example) ALL monsters have a script for getting a stat??

yes

 

 

 

Uhm,, since it "might" lag the server,, really have to think twice,,

 

but,, actually im also thinking twice w/ having it as a "reward" from an NPC,, I started playing RO since 2-2 jobs had just been released,, and,, not really fond of doing quests,, like earn everything from monster extermination,, HAHA,,

 

*sigh*

 

hmmmm,,,

 

don't know if you know the game from PSX the "Digimon World",, the idea is somewhat same there wherein whenever you defeat an enemy it'd gave you statpoints/parameters,,

 

 

i also have another idea,, like from this Chinese Light Novel http://www.wuxiaworld.com/tdg-index/, uhmm,, i dont know if its possible,, like for example, you consumed a specific item,,let's name it for example "str improving pill" that if you killed a specific number of monsters while that item is on duration,, it'd help you to improve str (same effect as this script),,

 

ohh my God,, never thought thinking of mods for your server would be this hard,, hahaha,,

Share this post


Link to post
Share on other sites
  • 0

 

no idea, since I have been scripting since 9 years ago, I found eathena script language is normal to me

i also have another idea,, like from this Chinese Light Novel http://www.wuxiaworld.com/tdg-index/, uhmm,, i dont know if its possible,, like for example, you consumed a specific item,,let's name it for example "str improving pill" that if you killed a specific number of monsters while that item is on duration,, it'd help you to improve str (same effect as this script)

you need to code a SC_xxx constant

during the effect, if kill the monster, will add Str

this can only done through source code, not npc script

 

hmm ... interesting idea, SC_ADDSTATKILLMOB

add this in my to-do list

sc_start4 SC_ADDSTATKILLMOB, 10000, PORING, 100, 1, bStr;
start a status, in 10 seconds,

kill a poring, 100% chance to gain 1 str stat

 

 

ooooooooooh,,, so IT is possible in src files,,,

 

nice nice,, so need to create a status effect first (SC_xxx),, ,,,then put that status on an item as a script,, hmmm,,

 

but if that would be the case,, do I need to put a lot of new SC_xxx PER monster?? and how about the number of kills for that monster??

Share this post


Link to post
Share on other sites
  • 0

@@AnnieRuru

 

This one:

sc_start4 SC_ADDSTATKILLMOB, 10000, PORING, 100, 1, bStr;

sorry if I'm a bit slow,,

and also been out for a couple of days,,

my internet service is failing me,, *arrrggghhh*

 

anyway,

is this meant to be for an item script?? if yes

 

how can i put it at src??

 

like:

 

sc_start4 SC_ADDSTATKILLMOB, 10000(for duration right?) , (read param str < 5)(stat requirement), bStr(base stat to be added), 1, PORING(monster #1), 5(percent), LUNATIC(monster #2), 10(percent), MASTERING(monster #3), 100(percent).....(up to at least maximum 15 monsters);

 

so it would look like this:

sc_start4 SC_ADDSTATKILLMOB, 10000, readparam(bStr)<=5, bStr, 1, PORING, 5, LUNATIC, 10, MASTERING, 100;

 

 

this way it'll be much more easier to manage,

 

If not,,

How to make it an item script?? so i can add an item to set it that way,,

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.