Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [Sharin] SOE to towns (c4) (https://postpacific.loc-online.com/showthread.php?t=3163)

hamidouch 28.01.2006 15:34

[Sharin] SOE to towns (c4)
 
ok in c4 there's soe to towns and special places,
easy to do, just summon a npc then teleport master to spot, then despawn
here is the working ai

Code:

class summon_tp_talking : default_npc
{
parameter:
        int x = -83964;
        int y = 242680;
        int z = -3700;
               
handler:
        EventHandler CREATED()
        {
                SetTimerPeriodByTick(100);
                InstantTeleport(myself.master, x, y, z);
        }
        EventHandler TIMER_FIRED()
        {
                SetTimerPeriodByTick(0);
                Despawn();
        }
}


only thing is it doesn't despawn, im sure it's a simple syntax error,
can someone help me?

top-gear 28.01.2006 16:40

make a summon skill for this npc, so the duration of the "escape scroll" will be the summoning npc time. make the ai to teleport you instantly when it is spawned and die automatically at the same proccess

hamidouch 28.01.2006 17:29

thks, but if u read code its what i did,
my questio nwas : when i set timer like that, the npc doesnt despawn,
theres a lil error in ai code, thats what i need to know
ty anyway

paul 28.01.2006 17:58

The shared skill of quiver of A grage and S grade despawn an NPC. Perhaps you could use some coding from that.

hamidouch 28.01.2006 17:59

yes thats what i did, the rerror was i used SetTimerPeriodByTick,
and the right function is addtimerex,
fixed it thks ^^

hamidouch 28.01.2006 18:00

here is working code :

Code:

class summon_tp_talking : default_npc
{
parameter:
        int x = -83964;
        int y = 242680;
        int z = -3700;
               
handler:
        EventHandler CREATED()
        {
                AddTimerEx(39999, 100);
                InstantTeleport(myself.master, x, y, z);
        }
        EventHandler TIMER_FIRED_EX(timer_id)
        {
          if (timer_id == 39999)
                Despawn();
        }
}


Domzelan 28.01.2006 20:35

I think only some people - can rewrite it in ai :) but anyway - thx. Good work.

Mayii 29.01.2006 01:33

ever heard of 'nasc' ? try to use your brain before talking crap. and anyways it's damn easy to "transform" it manually into object code.

Flamestrike 29.01.2006 09:38

Yeah...kinda simple.


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