User Tools

Site Tools


samples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
samples [2013/09/20 22:40]
megano0body [Examples]
samples [2013/11/19 13:35] (current)
dexter [Examples]
Line 16: Line 16:
 ===== Examples ===== ===== Examples =====
  
-=== Auto Mount ===+==== Auto Mount ====
  
 <​code>​3000 {Auto Mount} Status.InPZ()==0 Self.Mount()==0 Self.ToggleMount()</​code>​ <​code>​3000 {Auto Mount} Status.InPZ()==0 Self.Mount()==0 Self.ToggleMount()</​code>​
  
-=== Equip/​Unequip ring with x monsters ===+==== Equip/​Unequip ring with x monsters ​====
  
 <​code>​1500 {Equip/​Unequip ring with x monsters} monstersCount:​=2 idRingOFF:​=3052 idRingON:​=3089 ​ Creatures.ByName(Cyclops)>​=!monstersCount! [else] Self.Inventory.Ring()<>​!idRingON! Self.Equip.Ring(!idRingOFF!) Exit() {else} Self.Inventory.Ring()==!idRingON! Self.UnEquip.Ring(0)</​code>​ <​code>​1500 {Equip/​Unequip ring with x monsters} monstersCount:​=2 idRingOFF:​=3052 idRingON:​=3089 ​ Creatures.ByName(Cyclops)>​=!monstersCount! [else] Self.Inventory.Ring()<>​!idRingON! Self.Equip.Ring(!idRingOFF!) Exit() {else} Self.Inventory.Ring()==!idRingON! Self.UnEquip.Ring(0)</​code>​
  
-=== Utura with conditions===+==== Utura with conditions ​====
  
 <​code>​3000 {Utura} Self.Health%()<​=VALUE Self.Mana()>​=VALUE Status.Buff()==0 Self.Say(Utura)</​code>​ <​code>​3000 {Utura} Self.Health%()<​=VALUE Self.Mana()>​=VALUE Status.Buff()==0 Self.Say(Utura)</​code>​
  
-=== Equip Sword Ring ===+==== Equip Sword Ring ====
  
 <​code>​3000 {Equip Sword Ring} Self.Attacking() Self.Inventory.Ring()==0 Self.Equip.Ring(3091)</​code>​ <​code>​3000 {Equip Sword Ring} Self.Attacking() Self.Inventory.Ring()==0 Self.Equip.Ring(3091)</​code>​
  
-=== Open Door Without Key ===+==== Open Door Without Key ====
  
 <​code>​0 {Open Door Without Key} X:=Self.X() Y:=Self.Y() Z:=Self.Z() Map.Use(ID_DOOR,​ !X!, !Y!, !Z!, 2)</​code>​ <​code>​0 {Open Door Without Key} X:=Self.X() Y:=Self.Y() Z:=Self.Z() Map.Use(ID_DOOR,​ !X!, !Y!, !Z!, 2)</​code>​
  
-=== Open Door With key ===+==== Open Door With key ====
  
 <​code>​0 {Open Door With Key} X:=Self.X() Y:=Self.Y() Z:=Self.Z() Map.UseOn(ID_KEY,​ ID_DOOR, !X!, !Y!, !Z!, 2)</​code>​ <​code>​0 {Open Door With Key} X:=Self.X() Y:=Self.Y() Z:=Self.Z() Map.UseOn(ID_KEY,​ ID_DOOR, !X!, !Y!, !Z!, 2)</​code>​
  
-=== Destroy Furniture ===+==== Destroy Furniture ​====
  
 <​code>​1500 {Destroy Furniture} X:=Self.X() Y:=Self.Y() Z:=Self.Z() weapon:​=Self.Inventory.LeftHand Map.UseOn(!weapon!,​ 2434, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2471, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2472, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2482, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2480, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2481, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2473, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2469, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2470, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2434, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2433, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2432, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2431, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2358, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2359, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2360, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2361, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2319, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2524, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2523, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2982, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2465, !X!, !Y!, !Z!, 5)<>​1</​code>​ <​code>​1500 {Destroy Furniture} X:=Self.X() Y:=Self.Y() Z:=Self.Z() weapon:​=Self.Inventory.LeftHand Map.UseOn(!weapon!,​ 2434, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2471, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2472, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2482, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2480, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2481, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2473, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2469, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2470, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2434, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2433, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2432, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2431, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2358, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2359, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2360, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2361, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2319, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2524, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2523, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2982, !X!, !Y!, !Z!, 5)<>1 Map.UseOn(!weapon!,​ 2465, !X!, !Y!, !Z!, 5)<>​1</​code>​
  
-=== Change Soft to BoH and Vice Versa ===+==== Change Soft to BoH and Vice Versa ====
  
 <​code>​3000 {ChangeSoftToBoh} Self.Mana()<​=100 [jump] Self.Equip.Boots(ID_SOFT) Exit() {jump} Self.Mana()>​=300 Self.Equip.Boots(ID_BOH) Exit()</​code>​ <​code>​3000 {ChangeSoftToBoh} Self.Mana()<​=100 [jump] Self.Equip.Boots(ID_SOFT) Exit() {jump} Self.Mana()>​=300 Self.Equip.Boots(ID_BOH) Exit()</​code>​
  
-=== Auto Area Attack ===+==== Auto Area Attack ​====
  
 <​code>​2000 {AutoAreaAttack} Creatures.Beside()>​=2 [exoriGran] Self.Mana()>​=150 Self.Say(exori) Exit() {exoriGran} Creatures.Beside()>​=4 Self.Mana()>​=340 Self.Say(exori gran) Exit()</​code>​ <​code>​2000 {AutoAreaAttack} Creatures.Beside()>​=2 [exoriGran] Self.Mana()>​=150 Self.Say(exori) Exit() {exoriGran} Creatures.Beside()>​=4 Self.Mana()>​=340 Self.Say(exori gran) Exit()</​code>​
  
-=== Auto Drop Empty Flask ===+==== Auto Drop Empty Flask ====
  
 <​code>​3000 {Drop Empty Flask} X:=Self.X() Y:=Self.Y() Z:=Self.Z() X1:=1 Y1:=1 VarAdd(X, !X1!) VarSub(Y, !Y1!) Self.Capacity()<​=150 Map.Thrown(285,​ 100, !X!, !Y!, !Z!) Exit()</​code>​ <​code>​3000 {Drop Empty Flask} X:=Self.X() Y:=Self.Y() Z:=Self.Z() X1:=1 Y1:=1 VarAdd(X, !X1!) VarSub(Y, !Y1!) Self.Capacity()<​=150 Map.Thrown(285,​ 100, !X!, !Y!, !Z!) Exit()</​code>​
  
-=== Auto Gather Potion from Ground with Cap ===+==== Auto Gather Potion from Ground with Cap ====
  
 == Variables == == Variables ==
samples.txt · Last modified: 2013/11/19 13:35 by dexter