User Tools

Site Tools


chproperties

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
chproperties [2014/06/20 03:04] vodurchproperties [2014/06/20 03:13] (current) – removed vodur
Line 1: Line 1:
-|**Get **  |**Set **  |**Field **  |**Type **  |**Note **  |**Possible values**  | 
-|x |x |name |string |Set for NPCs only |  | 
-|x |x |level |number |Set for NPCs only |  | 
-|x |x |hp |number |Set for NPCs only |  | 
-|x |x |maxhp |number |  |  | 
-|x |x |mana |number |Set for NPCs only |  | 
-|x |x |maxmana |number |  |  | 
-|x |x |move |number |Set for NPCs only |  | 
-|x |x |maxmove |number |  |  | 
-|x |x |gold |number |Set for NPCs only |  | 
-|x |x |silver |number |Set for NPCs only |  | 
-|x |  |money |number |total money converted to silver |  | 
-|x |x |sex |string |Set for NPCs only |none,male,female,either | 
-|x |x |size |string |Set for NPCs only |tiny,small,medium,larg,huge,giant | 
-|x |  |position |string |  |dead,mort,incap,stun,sleep,rest,sit,fight,stand | 
-|x |x |align |number |  |  | 
-|x |x |str |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |con |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |vit |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |agi |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |dex |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |int |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |wis |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |dis |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |cha |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |luc |number |Set for NPCs only. Range 1-200. |  | 
-|x |x |hitroll |number |Get returns current value including all bonuses. Set for NPCs only. Set will set the mob's hitroll percentage, not the direct value. |  | 
-|x |x |damroll |number |Get returns current value including all bonuses. Set for NPCs only. Set will set the mob's damroll percentage, not the direct value. |  | 
-|x |x |attacktype |string |Set for NPCs only. |See 'attack_table' table. Value corresponds to 'Name' column. | 
-|x |  |damnoun |string |  |See 'attack_table' table. Value corresponds to 'Damtype' column. | 
-|x |  |damtype |string |  |See 'attack_table' table. Value corresponds to 'Noun' column. | 
-|x |  |clan |string |  |  | 
-|x |  |class |string |  |  | 
-|x |x |race |string |Set for NPCs only. |  | 
-|x |  |ispc |boolean |Whether is a player |  | 
-|x |  |isnpc |boolean |Whether is a mob |  | 
-|x |  |isgood |boolean |Whether is good (align>=350) |  | 
-|x |  |isevil |boolean |Whether is evil (align<=-350) |  | 
-|x |  |isneutral |boolean |Whether is neutral (-350 |  | 
-|x |  |isimmort |boolean |Whether is immortal |  | 
-|x |  |ischarm |boolean |Whether is charmed |  | 
-|x |  |isfollow |boolean |Whether is following someone |  | 
-|x |  |isactive |boolean |Whether position is > than sleeping (resting,sitting,fighthing,or standing) |  | 
-|x |  |fighting |[[:chproperties|CH]] |  |Mob or player the CH is fighting, nil if none. | 
-|x |  |heshe |string |he/she/it for the character. |  | 
-|x |  |himher |string |him/her/it for the character. |  | 
-|x |  |hisher |string |his/her/its for the character. |  | 
-|x |  |inventory |array of [[:objproperties|OBJ]] |  |  | 
-|x |  |room |[[:roomproperties|ROOM]] |  |  | 
-|x |  |groupsize |number |0 for no group, 1 for 1 other person, etc. |  | 
-|x |  |stance |  |  |  | 
-|x |x |description |Set for NPCs only. |  |  | 
-|x |  |pet |[[:chproperties|CH]] |  |  | 
-|x |  |affects |array of [[:affectproperties|AFFECT]] |  |  | 
-|x |  |clanrank |number |PC only |  | 
-|x |  |remorts |number |PC only |  | 
-|x |  |explored |number |PC only |  | 
-|x |  |beheads |number |PC only |  | 
-|x |  |pkills |number |PC only |  | 
-|x |  |pkdeaths |number |PC only |  | 
-|x |  |questpoints |number |PC only |  | 
-|x |  |bank |number |PC only |  | 
-|x |  |mobkills |number |PC only |  | 
-|x |  |mobdeaths |number |PC only |  | 
-|x |  |vnum |number |NPC only |  | 
-|x |  |proto |[[:mobprotoproperties|MOBPROTO]] |NPC only |  | 
-|x |  |ingame |boolean |NPC only |  | 
-|x |x |shortdescr |string |NPC only |  | 
-|x |x |longdescr |string |NPC only |  | 
- 
-|**Function **  |**Argument**  |**Result**  |**Note**  |**Valid args**  |  |  |  | 
-|[[:chmdo|mdo]] |string |none |interpret argument as if mob typed it |mdo("string") |  |  |  | 
-|[[:chsay|say]] |string |none |accepts variables |say("Hi %s", ch.name) |  |  |  | 
-|emote |string |none |  |  |  |  |  | 
-|[[:chasound|asound]] |string |none |accepts variables |asound [string] : echo to all the rooms around the mobile |  |  |  | 
-|[[:chgecho|gecho]] |string |none |  |gecho [string] : echo to all active players in the game |  |  |  | 
-|[[:chzecho|zecho]] |string |none |  |zecho [string] : echo to all players in the same area |  |  |  | 
-|[[:chkill|kill]] |string |none |  |kill [victim] : start combat with a player |  |  |  | 
-|[[:chassist|assist]] |string |none |  |assist [victim] : assist another mob or player |  |  |  | 
-|[[:chjunk|junk]] |string |none |  |junk [item |all |all.xxx] : destroy item(s) in inventory |  | 
-|[[:checho|echo]] |string |none |  |echo [string] : echo to room |  |  |  | 
-|[[:chechoaround|echoaround]] |string |none |  |echoaround [victim] [string] : echo to all in room save victim |  |  |  | 
-|[[:chechoat|echoat]] |string |none |  |echoat [victim] (string) : echo to victim (in same room) |  |  |  | 
-|[[:chmload|mload]] |string |[[:chproperties|CH]] |  |mload [vnum/rvnum] : load a mobile |  |  |  | 
-|[[:choload|oload]] |number |[[:objproperties|OBJ]] |  |oload(vnum): load an object to inventory, function returns the OBJ |  |  |  | 
-|[[:chpurge|purge]] |string |none |  |purge (target) : purge all objs and mobs in room or target |  |  |  | 
-|[[:chgoto|goto]] |string |none |  |goto [location] : go to location, wrandom for random room in world, random for random room in area |  |  |  | 
-|[[:chat|at]] |string |none |  |at [location] [command] : execute command at location |  |  |  | 
-|[[:chtransfer|transfer]] |string |none |  |transfer [victim |'all'] [location] : move target or all in room |  |  | 
-|[[:chgtransfer|gtransfer]] |string |none |  |gtransfer [victim] [location] : move group of victim to location |  |  |  | 
-|[[:chotransfer|otransfer]] |string |none |  |otransfer [object] [location] : move object from room |  |  |  | 
-|[[:chforce|force]] |string |none |  |force [victim] [command] : victim executes command |  |  |  | 
-|[[:chgforce|gforce]] |string |none |  |gforce [victim] [command] : victim's group executes command |  |  |  | 
-|[[:chvforce|vforce]] |string |none |  |vforce [vnum] [command] : all mobs of vnum execute command |  |  |  | 
-|[[:chcast|cast]] |string |none |  |cast [spell] (target) : cast spell without failure and cost |  |  |  | 
-|[[:chdamage|damage]] |string |none |  |damage [victim |'all'] [min] [max] (kill) : deal (lethal) damage |  |  | 
-|[[:chremove|remove]] |string |none |  |remove [victim] [vnum |all] (inv |get |room) : extract object or send to target inventory(inv), CH inventory(get), or room | 
-|[[:chremort|remort]] |string |none |  |remort [victim] : remort a player |  |  |  | 
-|[[:chqset|qset]] |string |none |  |qset [victim] [id] [value] [time limit] : set quest-state for player |  |  |  | 
-|[[:chqadvance|qadvance]] |string |none |  |qadvance [victim] [id] (increment) : increase quest-state |  |  |  | 
-|[[:chreward|reward]] |string |none |  |reward [victim] [exp |qp |gold] [ammount] : give exp or qp reward |  | 
-|[[:chpeace|peace]] |string |none |  |peace (victim) : stop combat and make mobs non-aggro |  |  |  | 
-|[[:chrestore|restore]] |string |none |  |restore [victim] : restore victim |  |  |  | 
-|[[:chsetact|setact]] |string |none |set or remove an act-flag |setact("safe")/setact("safe",false) |  |  |  | 
-|[[:chhit|hit]] |string |none |hit (victim) : do one attack |hit(ch.name) – must be in battle with victim |  |  |  | 
-|[[:chtell|tell]] |string |none |send a tell |tell("somebody something") |  |  |  | 
-|[[:chdescribe|describe]] |string |none |do |something |  |  |  | 
-|[[:chaddaffect|addaffect]] |string |none |do |something |  |  |  | 
-|[[:chremoveaffect|removeaffect]] |string |none |do |something |  |  |  | 
- 
-Other goodies   Checks 
- 
-|!Function |!Argument |!Result |!Note |!Valid args |!Example | 
-|randchar |none |[[:chproperties|CH]] |Returns a random PC in room with the mob. |  |  | 
-|setlevel |number |none |Sets mob level, restores the mob to full health. |  |  | 
-|destroy |none |none |Destroy the CH, error if attempted on player |  |mob:destroy() | 
-|[[:qstatus|qstatus]] |number |number |Return the value of the given qset on the CH |  |  | 
-|qtimer |number |number |Return the timer value of the given qset on the CH |  |  | 
-|[[:loadprog|loadprog]] |number |none |Argument is vnum. Runs target mprog script in the CH's script space |  |  | 
-|[[:loadscript|loadscript]] |string[subfolder],string[filename] |none |runs the script in the file in the subfolder given using the CH's script space |  |ch:loadscript("vodur","testscript") | 
-|[[:loadstring|loadstring]] |string |none |runs the argument as a script in the CH's env |  |  | 
-|[[:loadfunction|loadfunction]] |  |  |  |  |  | 
-|[[:savetbl|savetbl]] |string[filename],table |none |creates a file in area specific subdir with filename as the name and saves arg2 to it |  |  | 
-|[[:savetbl|loadtbl]] |string[filename] |table |opens file in area specific subdir with the filename and returns the table loaded from it, nil if file doesn't exist |  |  | 
-|tprint |table |none |prints the content of a table using say. Good for debug. |  |  | 
-|[[:scriptingolc|olc]] |string |none |Send command to current olc editor if any. |  |olc("name hammy") – Need to already entered editor, e.g mdo("redit") | 
-|[[:delayfunction|delay]] |number, function[, string] |none |Set a timer to run arg2 after arg1 seconds, optional arg 3 sets a string tag that can be used for targetted cancelling. |  |  | 
-|[[:cancelfunction|cancel]] |string[optional] |none |Cancel pending functions that were queued with 'delay'. See [[:cancelfunction|cancel]] |  |  | 
-|[[:chsetval|setval]] |string |none |setval(arg1,arg2,arg3) |ch:setval(_fckg_QUOT__fckg_QUOT_____, , [arg3]) |ch:setval("serpent_killed", 1, true) |[[:chgetval|getval]] |string |none |getval(arg1,arg2) |ch:getval(_____fckg_QUOT__fckg_QUOT_, ) |[@ch:getval("serpent_killed", 1)@] | 
- 
-|Function |Argument |Result |Note |Valid args |Example | 
-|canattack |[[:chproperties|CH]] |boolean |whether can attack arg |  |  | 
-|cansee |[[:chproperties|CH]] |boolean |whehter can see arg |  |  | 
-|ccarries |string |boolean |Whether carries arg in a container. |  |  | 
-|skilled |string |boolean |Whether has skill. |  |  | 
-|act |string |boolean |  |  |if mob:act('safe') then | 
-|carries |string |boolean |Whether carries arg (vnum or keyword). |  |  | 
-|[[:wears|wears]] |string |boolean |Whether wears arg (vnum or keyword). |  |  | 
-|has |string |boolean |Whether is carrying an item of type arg. |See [[:flags|Flags]] |  | 
-|uses |string |boolean |Whether is wearing equipment of type arg. |See [[:flags|Flags]] |  | 
-|affected |string |boolean |Check if affected by argument. |See [[:flags|Flags]] |if (ch:affected("fade")) then | 
-|offensive |string |boolean |Check if specific offensive flag is set |See [[:flags|Flags]] |  | 
-|immune |string |boolean |Check if immune to argument |See [[:flags|Flags]] |  | 
-|resist |string |boolean |Check if resist argument |See [[:flags|Flags]] |  | 
-|vuln |string |boolean |Check if vuln to argument |See [[:flags|Flags]] |  | 
-|mobhere |string/number |boolean |Whether mob with keyword(s)/vnum is in the room. |  |  | 
-|objhere |string/number |boolean |Whether obj with keyword(s)/vnum is in the room. |  |  | 
-|mobexists |string |boolean |Whether mob with name exists in game. |  |  | 
-|objexists |string/number |boolean |Whether object with name exists in game. |  |  | 
- 
-\\ 
  
chproperties.1403233457.txt.gz · Last modified: 2014/06/20 03:04 by vodur