33<event name="Local System Map Seller">
44 <chance>100</chance>
55 <location>enter</location>
6- <cond>player.numOutfit("Local System Map") < 1 </cond>
6+ <cond>
7+ if player.outfitNum then
8+ return player.outfitNum("Local System Map") < 1
9+ else
10+ return player.numOutfit("Local System Map") < 1
11+ end
12+ </cond>
713</event>
814--]]
915--[[
@@ -42,6 +48,14 @@ local timeouthook
4248local seller = nil
4349local NPC_name = _ (" A vending machine of a map seller" )
4450
51+ function hasLocalMap ()
52+ if player .outfitNum then
53+ return player .outfitNum (" Local System Map" )> 0
54+ else
55+ return player .numOutfit (" Local System Map" )> 0
56+ end
57+ end
58+
4559function create ()
4660local cur = system .cur ()
4761local _ ,vol ,_ = cur :nebula ()
@@ -61,7 +75,7 @@ function create ()
6175end
6276
6377function no_seller_is_found ()
64- if player . numOutfit ( " Local System Map " ) > 0 then
78+ if hasLocalMap () then
6579-- A player may discover the information in a few second.
6680evt .finish ()
6781return
@@ -72,7 +86,7 @@ function no_seller_is_found ()
7286end
7387
7488function spawn ()
75- if player . numOutfit ( " Local System Map " ) > 0 then
89+ if hasLocalMap () then
7690-- A player may discover the information in a few second.
7791evt .finish ()
7892return
95109function hail ()
96110hook .rm (timeouthook )
97111hook .rm (hailhook )
98- if player . numOutfit ( " Local System Map " ) > 0 then
112+ if hasLocalMap () then
99113-- A player may discover the information in a few second.
100114tk .msg (NPC_name ,_ [[ "OH! YOU SEEM TO NEED NO LOCAL SYSTEM MAP, SORRY."]] )
101115else