Author Topic: Issue finding NPC  (Read 3532 times)

0 Members and 1 Guest are viewing this topic.

Offline KryzTopic starter

  • Jr. Member
  • **
  • Posts: 33
  • Activity:
    0%
  • Reputation Power: 1
  • Kryz has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Issue finding NPC
« on: August 22, 2015, 11:48:57 PM »
0
I must be doing something wrong here... I cannot seem to find these mongers, am I making some simple mistake?


Code: [Select]
Sub FindMonger
   MongerLoop:
   finditem HS_IS_OCB_NCB G_15
   if #FindKind <> - 1
      {
       event property #FindId
       if monger in #Property
          {
           display it works!
           goto MongerEnd
          }
       }
       goto MongerLoop
MongerEnd:
ingoreitem reset people
wait 5s
return

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +272
  • Referrals: 1
    • View Profile
Re: Issue finding NPC
« Reply #1 on: August 23, 2015, 12:46:53 AM »
0
I hate findkind

Sub FindMonger
Finditem HS_IS_OCB_NCB G_15
if #Findcnt > 0
{
For #Findindex 1 #Findcnt
{
Event property #Findid
if Monger in #Property
Display Monger: #Findid
}
}
Return

Also, you can use break to jump out of For's Instead of Using Gotos


For %Number 1 100
{
If %Number = 50
Break
}
Display %Number
Halt
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline KryzTopic starter

  • Jr. Member
  • **
  • Posts: 33
  • Activity:
    0%
  • Reputation Power: 1
  • Kryz has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Issue finding NPC
« Reply #2 on: August 23, 2015, 01:08:57 AM »
0
Thank You Manwinc! That solved my issue, ill avoid findkind in the future.

Tags: