diff options
author | wushin <pasekei@gmail.com> | 2014-07-23 21:24:29 -0500 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2014-07-23 21:24:29 -0500 |
commit | 461af7da143051fbc6d1cb6949e051ab80724d2c (patch) | |
tree | fc46cc9f9ce9fb784289e077e66e754377689f91 /world/map/npc | |
parent | 27140b4290b7b3ddbf6b847d24340cab27304b8f (diff) | |
download | serverdata-461af7da143051fbc6d1cb6949e051ab80724d2c.tar.gz serverdata-461af7da143051fbc6d1cb6949e051ab80724d2c.tar.bz2 serverdata-461af7da143051fbc6d1cb6949e051ab80724d2c.tar.xz serverdata-461af7da143051fbc6d1cb6949e051ab80724d2c.zip |
Fixed Attachrid calls
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/007-1/witch.txt | 41 | ||||
-rw-r--r-- | world/map/npc/052-1/channelling.txt | 6 | ||||
-rw-r--r-- | world/map/npc/052-2/lobby.txt | 3 | ||||
-rw-r--r-- | world/map/npc/052-2/partyroom.txt | 6 |
4 files changed, 24 insertions, 32 deletions
diff --git a/world/map/npc/007-1/witch.txt b/world/map/npc/007-1/witch.txt index 8259291a..0d16c0cc 100644 --- a/world/map/npc/007-1/witch.txt +++ b/world/map/npc/007-1/witch.txt @@ -248,21 +248,20 @@ L_ChooseHelper1: goto L_WrongHelper1; if (isloggedin(getcharid(3, $@ILLIA_HELPER1$)) == 0) goto L_HelperDoesNotExist1; - attachrid(getcharid(3, $@ILLIA_HELPER1$)); + if (!(attachrid(getcharid(3, $@ILLIA_HELPER1$)))) + goto L_Exit; if (BaseLevel < $@illia_min_level) goto L_HelperTooWeak1; set $@ILLIA_HELPER1$, strcharinfo(0); detachrid; - if (isloggedin($@ILLIA_HERO_ID) == 0) - goto L_Exit; - attachrid($@ILLIA_HERO_ID); - goto L_ChooseHelper2; + if (attachrid($@ILLIA_HERO_ID)) + goto L_ChooseHelper2; + goto L_Exit; L_HelperTooWeak1: detachrid; - if (isloggedin($@ILLIA_HERO_ID) == 0) + if (!(attachrid($@ILLIA_HERO_ID))) goto L_Exit; - attachrid($@ILLIA_HERO_ID); mes "[Team Selector]"; mes "The player " + $@ILLIA_HELPER1$ + " is too weak to help you."; next; @@ -298,21 +297,20 @@ L_ChooseHelper2: goto L_WrongHelper2; if (isloggedin(getcharid(3, $@ILLIA_HELPER2$)) == 0) goto L_HelperDoesNotExist2; - attachrid(getcharid(3, $@ILLIA_HELPER2$)); + if (!(attachrid(getcharid(3, $@ILLIA_HELPER2$)))) + goto L_Exit; if (BaseLevel < $@illia_min_level) goto L_HelperTooWeak2; set $@ILLIA_HELPER2$, strcharinfo(0); detachrid; - if (isloggedin($@ILLIA_HERO_ID) == 0) - goto L_Exit; - attachrid($@ILLIA_HERO_ID); - goto L_ChooseHelper3; + if (attachrid($@ILLIA_HERO_ID)) + goto L_ChooseHelper3; + goto L_Exit; L_HelperTooWeak2: detachrid; - if (isloggedin($@ILLIA_HERO_ID) == 0) - goto L_Exit; - attachrid($@ILLIA_HERO_ID); + if (!(attachrid($@ILLIA_HERO_ID))) + goto_Exit; mes "[Team Selector]"; mes "The player " + $@ILLIA_HELPER2$ + " is too weak to help you."; next; @@ -349,22 +347,21 @@ L_ChooseHelper3: goto L_WrongHelper3; if (isloggedin(getcharid(3, $@ILLIA_HELPER3$)) == 0) goto L_HelperDoesNotExist3; - attachrid(getcharid(3, $@ILLIA_HELPER3$)); + if (!(attachrid(getcharid(3, $@ILLIA_HELPER3$)))) + goto L_Exit; if (BaseLevel < $@illia_min_level) goto L_HelperTooWeak3; set $@ILLIA_HELPER3$, strcharinfo(0); detachrid; - if (isloggedin($@ILLIA_HERO_ID) == 0) - goto L_Exit; - attachrid($@ILLIA_HERO_ID); + if (!(attachrid($@ILLIA_HERO_ID))) + goto_Exit; mes $@ILLIA_HELPER1$ + ", " + $@ILLIA_HELPER2$ + " and " + $@ILLIA_HELPER3$ + " will be your three comrades."; close; L_HelperTooWeak3: detachrid; - if (isloggedin($@ILLIA_HERO_ID) == 0) - goto L_Exit; - attachrid($@ILLIA_HERO_ID); + if (!(attachrid($@ILLIA_HERO_ID))) + goto_Exit; mes "[Team Selector]"; mes "The player " + $@ILLIA_HELPER3$ + " is too weak to help you."; next; diff --git a/world/map/npc/052-1/channelling.txt b/world/map/npc/052-1/channelling.txt index 6348840a..34633ac5 100644 --- a/world/map/npc/052-1/channelling.txt +++ b/world/map/npc/052-1/channelling.txt @@ -178,9 +178,8 @@ OnTimer11000: end; S_ItemSpawn: - if (isloggedin(getcharid(3, $@illia_char_channelling$)) == 0) + if (!(attachrid(getcharid(3, $@illia_char_channelling$)))) goto L_Return; - attachrid(getcharid(3, $@illia_char_channelling$)); // spawn items at random set $@illia_item_spawn_i, rand(getarraysize($@illia_small_lazurites)/2); set $@illia_item_spawn_x, $@illia_small_lazurites[$@illia_item_spawn_i*2]; @@ -228,9 +227,8 @@ S_CheckChannelling: set $@illia_magic_power_status, 2; // Player loses a part of his health while channelling - if (isloggedin(getcharid(3, $@illia_char_channelling$)) == 0) + if (!(attachrid(getcharid(3, $@illia_char_channelling$)))) goto L_ChannellingFail; - attachrid(getcharid(3, $@illia_char_channelling$)); // Display an effect showing the drain misceffect FX_CHANNELLING_RAISE; percentheal -4, 0; diff --git a/world/map/npc/052-2/lobby.txt b/world/map/npc/052-2/lobby.txt index a32ab830..c707c76f 100644 --- a/world/map/npc/052-2/lobby.txt +++ b/world/map/npc/052-2/lobby.txt @@ -341,9 +341,8 @@ L_ChaseLuvia: end; S_GetHeroRect: - if (isloggedin($@ILLIA_HERO_ID) == 0) + if (!(attachrid($@ILLIA_HERO_ID))) goto L_Clear; - attachrid($@ILLIA_HERO_ID); set $@illia_lobby_x, getx(); set $@illia_lobby_y, gety(); diff --git a/world/map/npc/052-2/partyroom.txt b/world/map/npc/052-2/partyroom.txt index 663c2dec..ef04a667 100644 --- a/world/map/npc/052-2/partyroom.txt +++ b/world/map/npc/052-2/partyroom.txt @@ -123,9 +123,8 @@ OnTimer5000: if ($@illia_level_7_progress != 1) end; // Warp to the place to spawn luvia once the teleport sequence is finished - if (isloggedin($@ILLIA_HERO_ID) == 0) + if (!(attachrid($@ILLIA_HERO_ID))) end; - attachrid($@ILLIA_HERO_ID); set $@illia_luvia_x, getx(); set $@illia_luvia_y, gety(); npcwarp $@illia_luvia_x, $@illia_luvia_y, "#LuviaDaemon"; @@ -176,9 +175,8 @@ OnTimer26000: end; S_SpawnWitchGuard: - if (isloggedin($@ILLIA_HERO_ID) == 0) + if (!(attachrid($@ILLIA_HERO_ID))) end; - attachrid($@ILLIA_HERO_ID); npcwarp getx(), gety(), "#LuviaDaemon"; misceffect FX_EVIL_SUMMON; misceffect FX_GROUND_SPAWN; |