Jump to content
  • 0

[Help]Nasc Codez!


sandeagle

Question

my server use C4 off pack.coz Valakas and Antaras these two BOSS's cave exist some Geodata bugz...players could very easy to hurt these two boss.i think lots pplz know these things..so now i wanna to set these two boss spawned the same time,i means i wanna to spawn these two boss fixation time,like on 8:00am every two day...and i know this setting can use ai to control it...i found some hints,but im rly not good at Nasc...so plz some one could help me?

 

some one tell me i can inherit this class...but i rly dont know how to do that!

class 2 default_maker : (null)
{
parameter:
	int	on_start_spawn = 1;

handler:
	EventHandler ON_START(i0,def0)
	{
		if( on_start_spawn == 0 )
		{
			return;
		}
		for( i0 = 0; i0 < myself.def_count; i0++ )
		{
			def0 = myself::GetSpawnDefine( i0 );
			if( gg::IsNull( def0 ) == 0 )
			{
				if( myself::IncreaseTotal( def0.total ) )
				{
					def0::IncCount( def0.total );
					def0::Spawn( def0.total, 0 );
				}
			}
		}
	}

	EventHandler ON_NPC_DELETED(deleted_def,i0,i1,maker0)
	{
		i0 = myself::DecreaseTotal( 1 );
		i1 = deleted_def::DecCount( 1 );
		if( deleted_def.respawn_time != 0 )
		{
			if( myself::IncreaseTotal( 1 ) )
			{
				deleted_def::IncCount( 1 );
				deleted_def::Spawn( 1, deleted_def.respawn_time );
			}
		}
	}

	EventHandler ON_SCRIPT_EVENT(script_event_arg1,script_event_arg2,script_event_arg3,def0,i0,i1)
	{
		switch( script_event_arg1 )
		{
			case 1000:
			{
				for( i0 = 0; i0 < myself.def_count; i0++ )
				{
					def0 = myself::GetSpawnDefine( i0 );
					if( gg::IsNull( def0 ) == 0 )
					{
						def0::Despawn();
					}
				}
				break;
			}
			case 1001:
			{
				for( i0 = 0; i0 < myself.def_count; i0++ )
				{
					def0 = myself::GetSpawnDefine( i0 );
					if( gg::IsNull( def0 ) == 0 )
					{
						i1 = ( def0.total - def0.npc_count );
						if( i1 > 0 )
						{
							if( myself::IncreaseTotal( i1 ) )
							{
								def0::IncCount( i1 );
								def0::Spawn( i1, script_event_arg2 );
							}
						}
					}
				}
				break;
			}
		}
	}

}

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

I do not think you can fixed weekday spawn with current limitations of the spawn systems.

 

 

You can get time of day hour wise - but not week by functions.

(Atleast of what i can recall @ work - check all functions\vars yourself).

 

You'd definately have to change the entire inheritance down to the base maker classes and create your own for Antharas\Valakas.

 

I'll see if you can do a AI based way when i get home - but i can't remember any function\var way this would be possible.

(Everything would be reset at each restart - so omsetimes you'd see longer than 2 day spawn even if you save variables on maker objects).

 

You could do daily respawn by the gettime functions - and do something semi alike it.

Let me think about it a bit :P

 

 

 

What i don't understand is - why are you trying to fix a geo bug with a fixed spawn time and how will that stop the geo bug at all?

Edited by mcbigmac
Link to comment
Share on other sites

  • 0

1,in Valakas cave,players only stand on the wall step around the cave then attack Valakas,but Valakas cant attack them...this is not Geodata problem...right?i try to change Valakas attack range/skill range,but not a good idea.At last i change [Heart of Volcano] 's ai,teleport players in the centre of Valakas Cave.now player can not stand on the step(maybe players still can stuck on the step).
2,in Antharas cave,players can stuck on the antharas's spawn step(sorry,i dont know how to describe it,hope you can understand),this is Geodata problem.i had modified Geodata,but players still can stuck on the step.god.

 

these two problem still exist on Interlude and CT2.3 off pack...you can try it...

so at last i have to publish these things for all players,atleast all player know that,its fair for every player...now i wanna to spawn these two boss on same time,then all player have chance to hunt them.this is the reason i wanna to make this function...

sorry for my bad english.plz help me...

@  mcbigmac: yeah you are right,maybe daily respawn is good.

gg :: GetDateTime (0, 0) returns the current year
gg :: GetDateTime (0, 1) returns the current month
gg :: GetDateTime (0, 2) returns the current day of the month
gg :: GetDateTime (0, 3) returns the current hour
gg :: GetDateTime (0, 4) returns the current minute
gg :: GetDateTime (0, 5) returns the current second
gg :: GetDateTime (0, 6) returns the day of the week. Monday - 1, Friday - 5. Weekend - dont know.

NASC tool

Edited by sandeagle
Link to comment
Share on other sites

  • 0

1,in Valakas cave,players only stand on the wall step around the cave then attack Valakas,but Valakas cant attack them...this is not Geodata problem...right?i try to change Valakas attack range/skill range,but not a good idea.At last i change [Heart of Volcano] 's ai,teleport players in the centre of Valakas Cave.now player can not stand on the step.

2,in Antharas cave,players can stuck on the antharas's spawn step(sorry,i dont know how to describe it,hope you can understand),this is Geodata problem.i had modified Geodata,but players still can stuck on the step.god.

 

so at last i have to publish these things for all players,atleast all player know that,its fair for every player...now i wanna to spawn these two boss on same time,then all player have chance to hunt them.this is the reason i wanna to make this function...

 

sorry for my bad english.plz help me...

 

@  mcbigmac: yeah you are right,maybe daily respawn is good.

 

gg :: GetDateTime (0, 0) returns the current year

gg :: GetDateTime (0, 1) returns the current month

gg :: GetDateTime (0, 2) returns the current day of the month

gg :: GetDateTime (0, 3) returns the current hour

gg :: GetDateTime (0, 4) returns the current minute

gg :: GetDateTime (0, 5) returns the current second

gg :: GetDateTime (0, 6) returns the day of the week. Monday - 1, Friday - 5. Weekend - dont know.

 

NASC tool

 

1,in Valakas cave,players only stand on the wall step around the cave then attack Valakas,but Valakas cant attack them...this is not Geodata problem...right?i try to change Valakas attack range/skill range,but not a good idea.At last i change [Heart of Volcano] 's ai,teleport players in the centre of Valakas Cave.now player can not stand on the step.

2,in Antharas cave,players can stuck on the antharas's spawn step(sorry,i dont know how to describe it,hope you can understand),this is Geodata problem.i had modified Geodata,but players still can stuck on the step.god.

 

so at last i have to publish these things for all players,atleast all player know that,its fair for every player...now i wanna to spawn these two boss on same time,then all player have chance to hunt them.this is the reason i wanna to make this function...

 

sorry for my bad english.plz help me...

 

@  mcbigmac: yeah you are right,maybe daily respawn is good.

 

gg :: GetDateTime (0, 0) returns the current year

gg :: GetDateTime (0, 1) returns the current month

gg :: GetDateTime (0, 2) returns the current day of the month

gg :: GetDateTime (0, 3) returns the current hour

gg :: GetDateTime (0, 4) returns the current minute

gg :: GetDateTime (0, 5) returns the current second

gg :: GetDateTime (0, 6) returns the day of the week. Monday - 1, Friday - 5. Weekend - dont know.

 

NASC tool

This file contains a trojan.

Link to comment
Share on other sites

  • 0
This file contains a trojan.

 

i use this tool.but its ok...yeah you are right the anti-virus software said it contain trojan,but i think its ok...if its ensure contain trojan,i will del it..

Link to comment
Share on other sites

  • 0

Oh forgot about getdatetime completely.

 

 

Then use it, and go make it - what's your issue?

 

You can save the day(hour minute, if you want too) into i_ai vars and have them checked on npc_deleted + on_start.

(And be sure to completely check what 1000\1001 does and how to handle it proper based on the event_args from the child classes))

 

NPCMAKER contain all loose vars like i_ai\i_quest like normal npc and gg objects.

 

Each RR it will reset naturally - but else you can have a perfect 2 day spawn more or less.

NPCPOS would just have respawn time as whatever and a instant spawn of the npc.

 

 

Altho it will not solve your geodata problem - which you should go fix with HDGE instead of trying this imho ;)

Link to comment
Share on other sites

  • 0

This file contains a trojan.

Its just a packer, nothing has to do with trojan. Jeez look in IDA, there are plenty of false positives in the internet, lol even keygen's are taken as malware, but that is just to avoid people using them lol.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...