Menu

onEquip()

skalaxcy

onEquip()
ฟังค์ชั่นตรวจสอบอุปกรณ์สวมใส่ ว่าใส่อยู่หรือไม่

procedure ที่อนุญาติให้ใช้ = ทุก procedure
รูปแบบ = boolean onEquip( string ชื่อไอเทม+type );
หมายเหตุ type ของ item ดูได้จากรายการด้านล่างสุด

ตัวอย่าง เมื่อเลือดน้อยกว่า 50% ให้ตรวจสอบว่า ใช้ Battle Hook อยู่หรือไม่ ถ้าใช่ให้ถอดออกและใส่ Pike เข้าไปแทน

sub main_auto {

if ( (onHP() < 50) && (onEquip('Battle Hook[2],2') ) ) {       
    doEquip('uneq,2');
    doEquip('Pike[4],2');    
}

}

0 Item
1 Lower Mask
2 One-Handed Weapon
4 Cape
8 Right Accessory
10 Arrow
16 Armor
32 Shield
34 Two-Handed Weapon
64 Foot Wear
128 Left Accessory
136 Accessory
256 Helmet
512 Eye Mask
513 Mid-Lower Mask
768 Up-Mid Helmet
769 Up-Mid-Lower Helmet
1024 Visual Helmet
2048 Visual Eye Mask
4096 Visual Lower Mask
32768 Arrow


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.