Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 05.09.2006, 20:55   #1
jim2006193
Архивный участник
 
Join Date: Jun 2006
Posts: 20
Default Make a NPC to level a person

Is there a way that i can make a NPC level the person that is talking to hit. I guess its going to have to be through the AI, if someone could help me, like a guide, possibly code samples, etc, i would greatly apperciate it.

~James
jim2006193 is offline  
Old 05.09.2006, 21:48   #2
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Here u have an example, take me 2 minutes to code...

Is C1 NASC AI, need to compile... i dont test it but it must work...

AI
Code:
class change_level : citizen
{

parameter:

	string fnHi = "change_level001.htm";

handler:

	EventHandler TALKED(talker)
	{
		ShowPage(talker,fnHi);
	}

	EventHandler MENU_SELECTED(ask, reply, talker)
	{
		if (ask == 1) IncrementParam(talker, @PARAM_EXP, reply);
		if (ask == 2) IncrementParam(talker, @PARAM_SP, reply);
	}
}
change_level001.htm
Code:
<html><head><body>
Change Level NPC:
<br><a action="bypass -h menu_select?ask=1&reply=300000000">Get EXP (300kk)</a>
<br><a action="bypass -h menu_select?ask=2&reply=1000000">Get SP (1kk)</a>
</body></html>
FidoW is offline  
Old 05.09.2006, 21:58   #3
jim2006193
Архивный участник
 
Join Date: Jun 2006
Posts: 20
Default

Sweet, thanks very much, is there much difference from C1 -> C4 NASC?
jim2006193 is offline  
Old 06.09.2006, 06:15   #4
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

Yeah. You probably don't have C4 NASC.
Aikeleer is offline  
Old 06.09.2006, 13:19   #5
jim2006193
Архивный участник
 
Join Date: Jun 2006
Posts: 20
Default

>.< ok, thanks anyway, when i figure out how to compile it, ill test it, if there any other suggestions, go ahead and post them, ill still check back, thanks again
jim2006193 is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:42.