Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Make a NPC to level a person (https://postpacific.loc-online.com/showthread.php?t=5659)

jim2006193 05.09.2006 20:55

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

FidoW 05.09.2006 21:48

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>


jim2006193 05.09.2006 21:58

Sweet, thanks very much, is there much difference from C1 -> C4 NASC?

Aikeleer 06.09.2006 06:15

Yeah. You probably don't have C4 NASC.

jim2006193 06.09.2006 13:19

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


All times are GMT. The time now is 15:49.