Manual:DIL Manual/weapon info()

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 22:36, 4 December 2025 by Nove (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function:  intlist weapon_info( i : integer ) ;
  i
         Weapon to get the info of ass defined in 'values.h' and 'weapons.def'
  returns
         Intlist containing 4 values:
  0
         Number of hands
  1
         weapon speed
  2
         weapon type
  3
         shield block value


This function gives you access to the values in the weapons.def file.
With this things like 'wear' equipment' and 'look' are much easier to
write in Dil.
Example

---~---~---~---~---~---~---~---~---
dilcopy id_weap (arg:string);
var
  i:integer;
  il:intlist;
code

dilend


---~---~---~---~---~---~---~---~---

Function:  intlist weapon_info( i : integer ) ;
  i
         Weapon to get the info of ass defined in 'values.h' and 'weapons.def'
  returns
         Intlist containing 4 values:
  0
         Number of hands
  1
         weapon speed
  2
         weapon type
  3
         shield block value


This function gives you access to the values in the weapons.def file.
With this things like 'wear' equipment' and 'look' are much easier to
write in Dil.
Example

---~---~---~---~---~---~---~---~---
dilcopy id_weap (arg:string);
var
  i:integer;
  il:intlist;
code

dilend


---~---~---~---~---~---~---~---~---