Menu

onStatus()

skalaxcy

onStatus()
ฟังค์ชั่นตรวจสอบสถานะอ้างอิงตาม msgstring.txt

procedure ที่อนุญาติให้ใช้ = ทุก procedure
รูปแบบ = boolean onStatus( string ชื่อสถานะ );

ตัวอย่าง
เมื่อติดพิษ ให้กดใช้ ยาเขียว 1 ครั้ง และหากเลือดน้อยกว่า 50% ให้ปั้มไวท์ 1 ครั้งจนกว่าจะเกิน 50% ตรวจสอบสถานะตลอดเวลาจึงให้ทำงานใน procedure main_auto
การติดสถานะ ให้เช็คจาก msgstring.txt ใน tables

sub main_auto {

if ( onStatus("Posion") ) {       
    useItem("Green Potion");
}
if ( onHP < 50) {
    useItem("White Potion");    
}

}


Related

Wiki: All command

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.