Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if mlevel >= 4 (playsound)
#1
Exclamation 
Hi everyone!

I need a very sample lua script for use in my persistent.
Only playsound if magic level >= 4

I did it, but i don't know where it is wrong.
It just doesn't work. Please, help me. Thanks!

local ML_ALARM = 4

if mlevel() >= ML_ALARM then
    playsound('default')
end
Reply

#2
Hello.

Another user asked for a similar script, so I found out there's a small bug on functions "mlevel()" and mlevelpc(), those are switched.
mlevel() is returning magic level percent and mlevelpc() is returning magic level value.

So use this way:
local ML_ALARM = 4

if mlevelpc() >= ML_ALARM then
    playsound('default')
end
Reply

#3
ok, thanks for reply
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Smile" title="Smile" class="smilie smilie_1" />
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016