Jump to content
  • 0
Sign in to follow this  
leloush

.mobcount

Question

how to make possible of this
 

 

 

npc 1 summoned mob on the map > + if the 1st wave done the last killed mob will trigger the (npc 2)

 

npc 2 ( summoned the 2nd wave in the same map ) > + if the 1st wave done the last killed mob will trigger the (npc 3)

 

npc 3 ( summoned the 3rd wave in the same map also ) 

 

and so on..

 

 

p.s

thanks guys..

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Why have several npc's?

Instead with one npc you can summon as many wave you want

-	script	MonsterWaves	-1,{OnInit:	.wave = 1;L_MonsterSummon:	monster "guild_vs2",0,0,"Wave "+.wave+" Monster",1002,50,strnpcinfo(0)+"::OnMonsterKilled";	end;	OnMonsterKilled:if (!mobcount("guild_vs2",strnpcinfo(0)+"::OnMonsterKilled")){	.wave++;	goto L_MonsterSummon;}end;}

Change guild_vs2 to whichever map you want,(P.S: guild_vs2 are in 2 lines.)

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

Why have several npc's?

Instead with one npc you can summon as many wave you want

-	script	MonsterWaves	-1,{OnInit:	.wave = 1;L_MonsterSummon:	monster "guild_vs2",0,0,"Wave "+.wave+" Monster",1002,50,strnpcinfo(0)+"::OnMonsterKilled";	end;	OnMonsterKilled:if (!mobcount("guild_vs2",strnpcinfo(0)+"::OnMonsterKilled")){	.wave++;	goto L_MonsterSummon;}end;}

Change guild_vs2 to whichever map you want,(P.S: guild_vs2 are in 2 lines.)

this is a lever npc which looks like this

 

 

npc 1 pulling lever ( when pulled by someone = summoned 30 monster  ) after all mobs killed will only trigger the npc 2

npc 2 (same map / pulling lever also ) = (which will trigger the *example 35* monster ) and after all mobs killed will only trigger the npc 3

npc 3 (same map ........ and so on until the final lever showed up)

 

 

 

 

ive used .mobCount here but there is an error ( not in console but ) it seems the .mobCount is not working on the 2nd npc which i attach on the npc 2..

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

If you could show your script, Then I can modify it, else tell what modifications you want in the script I made.

Share this post


Link to post
Share on other sites
  • 0

If you could show your script, Then I can modify it, else tell what modifications you want in the script I made.

yes !

 

lets make this happen.

(p.s this is what i want to be happen.)

 

this script will called.. Raid dungeon this idea is came from a game i played before, the jelly raid

in the jelly raid. there are 15 members waiting in the room to be warped ( im done with this )

 

then after the roomwarp

they will be warp @ 1 way map ( there are 7 levers the following 6 are hidden. the npc 2 only appears when the 1st lever ( of monsters are wiped )

then proceed to the next lever,

and so on until the lever 7..

that's all 

raid.txt

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

Optimized your script: raid.txt

 

Just change The co-ordinates of Lever NPC's(Duplicates at bottom of the file)

 

The Last Lever is Lever 7.

If all monsters from lever 7 is killed, All chars from that map will be warped back to prontera.

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

@Edit the lever #2 appears on the same location of the original npc even i change the location of the lever#2 in the map 

Optimized your script: attachicon.gifraid.txt

 

Just change The co-ordinates of Lever NPC's(Duplicates at bottom of the file)

 

The Last Lever is Lever 7.

If all monsters from lever 7 is killed, All chars from that map will be warped back to prontera.

wow nice that was fast..
ill try it now

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

Change These Locations

AQUAF_T,46,33,0	duplicate(Lever#1)	Lever#2	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#3	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#4	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#5	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#6	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#7	1907

for Lever#2 change that 46,33

Share this post


Link to post
Share on other sites
  • 0

Change These Locations

AQUAF_T,46,33,0	duplicate(Lever#1)	Lever#2	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#3	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#4	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#5	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#6	1907AQUAF_T,39,34,0	duplicate(Lever#1)	Lever#7	1907

for Lever#2 change that 46,33

yes already did.. but it spawn in the same location of original lever

 

 

AQUAF_T,54,75,0 duplicate(Lever#1) Lever#2 1907
AQUAF_T,51,80,0 duplicate(Lever#1) Lever#3 1907
AQUAF_T,59,83,0 duplicate(Lever#1) Lever#4 1907
Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

Updated Post#6(NPC,download file again), It was my mistake, I forgotted the use of duplicate npc.

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

Updated Post#6(NPC,download file again), It was my mistake, I forgotted the use of duplicate npc.

there is an error in console sir.

after the mobs killed npc is looking for 

 

 

post-2604-0-98374500-1386933655_thumb.png

Share this post


Link to post
Share on other sites
  • 0

Hmm.. that error should not be caused

Can you check Line 24, is it same as the below:

 

monster "AQUAF_T",43,28,"Arachne",2310,.Spawn,strnpcinfo(0)+"::OnMobKilled"; 

Since strnpcinfo(0) is triggered only once, there should not be 2 times repetation.

Share this post


Link to post
Share on other sites
  • 0

Hmm.. that error should not be caused

Can you check Line 24, is it same as the below:

 

monster "AQUAF_T",43,28,"Arachne",2310,.Spawn,strnpcinfo(0)+"::OnMobKilled"; 

Since strnpcinfo(0) is triggered only once, there should not be 2 times repetation.

yes it is.. in line 24 strnpcinfo(0) exist.. 

Edited by leloush

Share this post


Link to post
Share on other sites
  • 0

^ Hi, is your problem solved?

not yet ser..

 

it seems that there is a problem triggering the next npc..

 

@change the idea if its ok

 

i will make it more easy now since im havin trouble with the npcs

 

if this possible it will be a big big help. ^_^

 

 

the 1st npc lever( summoned 60 monster in the room )

and after the npc summoned monsters, the lever will go hide and the lever will enable this npc > ( announce + mobcount if there is no left monster inside )

 

 

 

AQUAF_T,37,35,0 script Extreme Raid[Lever]#1 1907,{
// Progress
    message strcharinfo(0), "Pulling the lever...";
    progressbar "green", .progress2;
specialeffect 234;
set .Spawn,rand(30,30); // How many monster should spawn?
set .Map$,.Maps$[rand(getarraysize(.Maps$))];
monster .Map$,43,36,"Arachne",2310,.Spawn,strnpcinfo(0)+"::OnMobKilled";
monster .Map$,43,36,"Arachne",2311,.Spawn,strnpcinfo(0)+"::OnMobKilled";
announce "There are " + mobcount("AQUAF_T", "all") + " Extreme Raid Monster in the room !!.",bc_map;
announce "Kill all Raid Monster to drop Extreme Rewards!!.",bc_map;
end;
 
OnMobKilled:
set .mobCount, .mobCount + 1;
if(.mobCount == 30){
mapannounce .map$,"Congratulations !! Your party has survive the Extreme Raid Dungeon",0;
disablenpc "Extreme Raid[Lever]#1";
end;
}
 
 
OnInit:
.progress2 = 5;
setarray .Maps$[0],"AQUAF_T"; // Possible maps
end;
}
Edited by leloush

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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