Aegis Support Board: Trigger a NPC again by Kill monsters in with-in 1 hr? - Aegis Support Board

Jump to content

ASB News! ASB 5.0 Beta V2 has now been released!. See here for more Info.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Trigger a NPC again by Kill monsters in with-in 1 hr? how to do this....

#1 User is offline   Mid-Knight 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 73
  • Joined: 25-June 04

Posted 22 October 2007 - 04:16 PM

Ok I want to know how to re-activate a NPC after sending the player to a room....The player has to kill the monsters in a certain time limit (But I don't want a timer to be seen) Once the monsters all die in the list being spawned in groups, then the NPC will talk again....

Could someone type out a simple mock up script with the code lines on how I could add all of this.....Thanks alot!


Edit:

I guess the Arena Scripts will be fine to work around with....I'm not so sure

This post has been edited by Mid-Knight: 22 October 2007 - 05:07 PM

0

#2 User is offline   KillerCore1984 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 74
  • Joined: 12-October 04

Posted 22 October 2007 - 09:38 PM

you could use something like

OnMyMobDead:
enablenpc "blabla"
0

#3 User is offline   Mid-Knight 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 73
  • Joined: 25-June 04

  Posted 23 October 2007 - 08:18 AM

View PostKillerCore1984, on Oct 22 2007, 10:38 PM, said:

you could use something like

OnMyMobDead:
enablenpc "blabla"



Ok...but how does that effect time? I want like 200 porings dead in 1hour unknowing of a timer from the players...If the porings are killed before the time then the NPC will do the rest....

If the player doesn't kill the Porings in 1 hour then the NPC will not bother the player and reset the Porings...repeating the script again....

Get it?
0

#4 User is offline   r4d4 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 280
  • Joined: 26-September 03
  • Gender:Male
  • Location:Good old Germany

Posted 23 October 2007 - 11:38 AM

npc "map" "Name me" SPRITE X Y Fa Xr Yr
OnInit:
	SetGlobalVar "monsterskilled" 0
return

OnClick:
	var monkilled = GetGlobalVar "monsterskilled"
	if monkilled == 0
		dialog "[Name]"
		dialog "Some nonsense text"
		wait
		choose menu "Spawn Mobs" "Leave"
		case 1
			dialog "[Name]"
			dialog "OK..."
			dialog "Dont take to long;)"
			close
			InitTimer
			cmdothernpc "Name2" "hideme"
			callmonster "map" MOBNAME "shown name" X Y
		break
		case 2
			dialog "[Name]"
			dialog "Fine, Bye then"
			close
		break
		endchoose
	else
		dialog "[Name]"
		dialog "Well killed..."
		close
	endif
return

OnMyMobDeath:
	if npcv "Name" [VAR_MYMOBCOUNT] == 0
		cmdothernpc "Name2" "showme"
		SetGlobalVar "monsterskilled" 1
	endif
return

OnTimer: 60000 //one minute after spawning
	if npcv "Name" [VAR_MYMOBCOUNT] > 0
		resetmymob
	endif
	cmdothernpc "name2" "showme"
	stoptimer
return

npc "map" "Name2" SPRITE X Y Fa Xr Yr
OnCommand: "showme"
	enablenpc "Name Me"
return

OnCommand: "hideme"
	disablenpc "Name Me"
return


I think this should do, its been a while since i wrote aegis scripts so it might contain errors <_<
0

#5 User is offline   Mid-Knight 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 73
  • Joined: 25-June 04

  Posted 23 October 2007 - 05:12 PM

View Postr4d4, on Oct 23 2007, 12:38 PM, said:

npc "map" "Name me" SPRITE X Y Fa Xr Yr
OnInit:
	SetGlobalVar "monsterskilled" 0
return

OnClick:
	var monkilled = GetGlobalVar "monsterskilled"
	if monkilled == 0
		dialog "[Name]"
		dialog "Some nonsense text"
		wait
		choose menu "Spawn Mobs" "Leave"
		case 1
			dialog "[Name]"
			dialog "OK..."
			dialog "Dont take to long;)"
			close
			InitTimer
			cmdothernpc "Name2" "hideme"
			callmonster "map" MOBNAME "shown name" X Y
		break
		case 2
			dialog "[Name]"
			dialog "Fine, Bye then"
			close
		break
		endchoose
	else
		dialog "[Name]"
		dialog "Well killed..."
		close
	endif
return

OnMyMobDeath:
	if npcv "Name" [VAR_MYMOBCOUNT] == 0
		cmdothernpc "Name2" "showme"
		SetGlobalVar "monsterskilled" 1
	endif
return

OnTimer: 60000 //one minute after spawning
	if npcv "Name" [VAR_MYMOBCOUNT] > 0
		resetmymob
	endif
	cmdothernpc "name2" "showme"
	stoptimer
return

npc "map" "Name2" SPRITE X Y Fa Xr Yr
OnCommand: "showme"
	enablenpc "Name Me"
return

OnCommand: "hideme"
	disablenpc "Name Me"
return


I think this should do, its been a while since i wrote aegis scripts so it might contain errors <_<



Thanks! Well yeah some of the scripting isn't correct, but Nice job on trying to get back into the Groove. It means alot!
Anyways, I guess I need to explain alittle further how the script should work, 1st off, I have no idea what OnInit means I think it means once your in the same map of it....Not sure..

But as for the script, theres no NPC visable, it's the HIDDEN one, so that it's like a automatic NPC that pops on for the person who kills the last monster with-in that time. So there isn't any OnClick needed or menus...It just gives a message and rewards the player, If they killed the monster in that time frame.

If not then nothing happens and resets, Just like you have....So It'll be great if you could rearrange the script to being somthing like that. Thanks again!
0

#6 User is offline   r4d4 

  • Advanced Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 280
  • Joined: 26-September 03
  • Gender:Male
  • Location:Good old Germany

Posted 23 October 2007 - 08:17 PM

OnInit is fired when the zone initially compiles the script on start up
as far as i remember the only events usable for player interaction (showing a dialog, giving items and so on) are OnTouch which gets fired when a player gets near the npc and OnClick which gets triggered when the npc is clicked.
stuff like OnCommand, OnTimer and OnMyMobDeath dont are triggered by the script itself, atleast thats how they worked with the last zone i got my hands on (asb4 i think)
so i doubt that it would work the way you described it, unless they changed the way the events work in the newer zones that hit the board
0

#7 User is offline   Mid-Knight 

  • Member
  • PipPipPip
  • Group: Members
  • Posts: 73
  • Joined: 25-June 04

  Posted 23 October 2007 - 11:49 PM

View Postr4d4, on Oct 23 2007, 09:17 PM, said:

OnInit is fired when the zone initially compiles the script on start up
as far as i remember the only events usable for player interaction (showing a dialog, giving items and so on) are OnTouch which gets fired when a player gets near the npc and OnClick which gets triggered when the npc is clicked.
stuff like OnCommand, OnTimer and OnMyMobDeath dont are triggered by the script itself, atleast thats how they worked with the last zone i got my hands on (asb4 i think)
so i doubt that it would work the way you described it, unless they changed the way the events work in the newer zones that hit the board




OK so heres what I was able to create Error free....But it's still not 100% what I want....Infact, Some extra functions are needed which I need a helping hand on too....

I was messing around with some commands and was able to learn how to make a it warp you, and change pallet...Tho. thats not important, i was just messing around....Whats important is whats the diffrences between Ontimer and Countdown?

Now there are 2 other important factors to this system, once the player kills that monster needed, it'll need to confirm if your a player so that the system doesn't get abused.

SO, heres what I need:
Once the NPC dialog appears and asks for the #, Which I wanted a Random colorized word number to appear(or somthing close) inside the Dialog box...and have it inputed next with-in 30 secs.
(i've looked for ways for this command line, and I seem to not be able to code it correctly...plz help)

Look at my coding to see what I'm talking about near the end, and also please confirm if this script resets once it's used also...

So in the end, Player walks into map > Player kills X'amount monster in Time> NPC talks to Player> Player Confirms #> Player Gets Prize. And if no one kills the monsters in that time it resets! Tah Dah! lol....<_< I hope you can help out more with this....Thanks!


/////////////////////////////////////////////
       The Hidden Event System        
               by Mid-Knight                   
   special mock up test version 1.0   
/////////////////////////////////////////////
npc "prt_fild08" "PrizeNPC" HIDDEN_NPC 104 95 4 4 5
	OnInit:
		enablearena
	return
	OnStartArena:
		disablenpc "PrizeNPC"
		cmdothernpc "summon_1" "callmymob"
	return
// --------------- method 1 ---------------
npc "prt_fild08" "summon_1" HIDDEN_NPC 104 95 4 4 5
	OnCommand: "callmymob"
		resetmymob
		InitTimer
		broadcastinmap "The Hunt will now start!"
	OnTimer: 1000
		broadcastinmap "The monsters will be spawned in 5 seconds."
	return
	OnTimer: 2000
		broadcastinmap "You only have 1 minute for this test."
	return
	OnTimer: 3000
		broadcastinmap "So be prepared to fight."
	return
	OnTimer: 6000
		broadcastinmap "FIGHT!"
	return
	OnTimer: 60000
		stoptimer
	return
InitTimer
broadcastinmap "Wait."
return
	OnTimer: 1000
		broadcastinmap "The Hunt Shall Go On!"
	return
	OnTimer: 5000
		stoptimer
		enablenpc "PrizeNPC"
	return
callmonster "prt_fild08" PORING "Poring" 100 100
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 101
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 102
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 103
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 104
callmonster "prt_fild08" G_SMOKIE "Smokie" 100 105
//summon part
return
	OnMyMobDead:
		if npcv "summon_1" [VAR_MYMOBCOUNT] < 1
			broadcastinmap "Clear."
			stoptimer
		dialog "[PrizeNPC]"
		dialog "To claim your prize..."
		dialog "Please input this number"
		wait
		changepallete 1 11
		moveto "sec_pri" 23 66
		close
enablenpc "PrizeNPC"
	endif
	return


EDIT:
Well i figured out the Random thing Color thing, and Inputing a Answer in thing....All was found in the niflheim_npc_ryu.sc

I'm editing it now and placing it together in my script.....Now the Next thing I need to know is the Timing the Dialog Box and the answer input....:m-wink:

This post has been edited by Mid-Knight: 24 October 2007 - 01:53 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users