Results 1 to 2 of 2

Thread: 'Safe' hi - only say hi if NPC is on screen

  1. #1
    iBot User knez3's Avatar
    Join Date
    Nov 2014
    Posts
    10
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    10
    Rep Power
    3

    'Safe' hi - only say hi if NPC is on screen

    Hi,
    How would go about doing a script, which only speaks to NPCs (says hi) if an NPC is on screen?
    Lua Code:
     
    //if npc on screen
    wait(500,1000)
    say("hi")
    wait(1500,2000)
    npcsay("deposit all")
    wait(1000,1300)
    npcsay("yes")
    //else do something


    Thanks
    Last edited by knez3; 12-12-2014 at 11:47 AM. Reason: sovled

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    Lua Code:
    if maround(NUMBEROFSQM, "NPCNAME") > 0 then
         wait(500,1000)
         say("hi")
         wait(1500,2000)
         npcsay("deposit all")
         wait(1000,1300)
         npcsay("yes")
    else
         gotolebel("gotonpcagain")
    end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •