Signup Now
Results 1 to 2 of 2
  1. #1
    Free User
    Join Date
    Aug 2016
    Posts
    7
    Reputation
    10
    Rep Power
    0

    X mana potion then alert

    Hello, can someone help me with persisten script if X mana potion then play sound?

  2. #2
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by Adam Dam View Post
    Hello, can someone help me with persisten script if X mana potion then play sound?
    Wrong area. Next time use Lua scripts > Requests

    --Mana Alert
    local ManaType = 'mana potion'
    local PotionAlert = 200
    local SoundAlertType = 'lowmana.wav' ---Docummentation--- Plays the sound with file name filename. All the sound files must be in the bot's '/sounds' directory.

    ---You need the backpack open sup---

    auto(1000)
    if itemcount(ManaType) < PotionAlert then
    playsound(SoundAlertType)
    end


    You just need to write the type of mana you use. And if you want to change the type of sound to be emitted, is only going in the sounds folder button and write the sound of the name, not forgetting the (.wav)

    PS: Is configured so that smaller X potion release the alarm, but if you want it to be just the X amount, line 9, change < to ==

 

 

Posting Permissions

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