From bcaa5dee1926baafb55afe9dc19f89b52983f5f2 Mon Sep 17 00:00:00 2001 From: Joseph Botosh Date: Tue, 8 Sep 2015 23:40:35 +0300 Subject: add npc flying piou in Artis --- db/const.txt | 1 + npc/001-1/_import.txt | 1 + npc/001-1/flyingpiou.txt | 63 ++++++++++++++++++++++++++++++++++++++++++ npc/functions/npcmovegraph.txt | 1 + 4 files changed, 66 insertions(+) create mode 100644 npc/001-1/flyingpiou.txt diff --git a/db/const.txt b/db/const.txt index 0d3d0b75d..c92903b7e 100644 --- a/db/const.txt +++ b/db/const.txt @@ -3431,6 +3431,7 @@ NPC_HUMAN_MALE_LEGION_ARTIS 434 NPC_HUMAN_FEMALE_LEGION_ARTIS 435 NPC_RAIJIN_FEMALE_WAITRESS 436 NPC_MARKET_PIOU 437 +NPC_FLYING_PIOU 440 NPC_TEST1 800 NPC_PLAYER 801 NPC_SAVE_POINT 901 diff --git a/npc/001-1/_import.txt b/npc/001-1/_import.txt index bf001874d..ee2dbef99 100644 --- a/npc/001-1/_import.txt +++ b/npc/001-1/_import.txt @@ -24,3 +24,4 @@ npc: npc/001-1/trozz.txt npc: npc/001-1/xilaxa.txt npc: npc/001-1/trees.txt npc: npc/001-1/pious.txt +npc: npc/001-1/flyingpiou.txt diff --git a/npc/001-1/flyingpiou.txt b/npc/001-1/flyingpiou.txt new file mode 100644 index 000000000..a1bdfa0f1 --- /dev/null +++ b/npc/001-1/flyingpiou.txt @@ -0,0 +1,63 @@ +// Evol scripts. +// Author: +// Travolta +// Description: +// Pious flying around town +// Variables: +// none + +001-1,95,84,0 script #FlyingPiou1 NPC_FLYING_PIOU,{ + end; + +OnTimer1000: + if (!isunitwalking()) + { + movetonextpoint; + } + initnpctimer; + end; + +OnInit: + setnpcsex G_OTHER; + setnpcdistance 0; + initmovegraph "fountain_1", 95, 84, + "fountain_2", 83, 97, + "fountain_3", 80, 86, + "river_bank_1", 117, 98, + "river_bank_2", 117, 110, + "chelios_1", 102, 112, + "market_1", 81, 118, + "market_2", 63, 119, + "spot_1", 55, 98, + "taree_1", 69, 82, + "inn_1", 112, 79, + "steps_1", 109, 63, + "beh_twnhall_1", 89, 52, + "taree_2", 67, 67, + "taree_3", 56, 85 + ; + + setmovegraphcmd "fountain_1", "river_bank_1", 1, "moveon", + "river_bank_1", "river_bank_2", 1, "moveon", + "river_bank_2", "chelios_1", 1, "moveon", + "chelios_1", "fountain_2", 1, "moveon", + "fountain_2", "fountain_3", 1, "moveon", + "chelios_1", "market_1", 1, "moveon", + "market_1", "market_2", 1, "moveon", + "market_2", "spot_1", 1, "moveon", + "spot_1", "taree_1", 1, "moveon", + "taree_1", "fountain_3", 1, "moveon", + "fountain_3", "fountain_1", 1, "moveon", + "spot_1", "taree_3", 1, "moveon", + "taree_3", "taree_2", 1, "moveon", + "taree_2", "beh_twnhall_1",1, "moveon", + "beh_twnhall_1", "steps_1", 1, "moveon", + "steps_1", "inn_1", 1, "moveon", + "steps_1", "fountain_1", 1, "moveon", + "inn_1", "river_bank_1", 1, "moveon" + ; + + firstmove "speed 200"; + initnpctimer; + end; +} diff --git a/npc/functions/npcmovegraph.txt b/npc/functions/npcmovegraph.txt index 6a7d344e1..f7bd8e6da 100644 --- a/npc/functions/npcmovegraph.txt +++ b/npc/functions/npcmovegraph.txt @@ -196,6 +196,7 @@ function script movetonextpoint { .@nextcmd$ = getvariableofnpc(.movegraphcmd$[.@pos * .@size + .@next_idx], strnpcinfo(3)); set getvariableofnpc(.nextcmd$, strnpcinfo(3)), .@nextcmd$; set getvariableofnpc(.movepos, strnpcinfo(3)), .@next_idx; + // debugmes strnpcinfo(1) + " moving to " + getvariableofnpc(.movegraphlabels$[.@next_idx], strnpcinfo(3)); npcwalkto .@next_x, .@next_y; return; } -- cgit v1.2.3-70-g09d2