GetTarget | ||
---|---|---|
Prototype | int GetTarget( int srcChar ); | |
Purpose | Returns the target of the current character. No target if it is -1 | |
Example of Usage | trgChar = GetTarget( srcChar ); |
GetDexterity | ||
---|---|---|
Prototype | short GetDexterity( int trgChar ); | |
Purpose | Returns the dexterity of the character trgChar | |
Example of Usage | dexVal = GetDexterity( srcChar ); |
GetIntelligence | ||
---|---|---|
Prototype | short GetIntelligence( int trgChar ); | |
Purpose | Returns the intelligence of the character trgChar | |
Example of Usage | intVal = GetIntelligence( srcChar ); |
GetStrength | ||
---|---|---|
Prototype | short GetStrength( int trgChar ); | |
Purpose | Returns the strength associated with the character trgChar | |
Example of Usage | strVal = GetStrength( srcChar ); |
GetSkill | ||
---|---|---|
Prototype | short GetSkill( int trgChar, UCHAR skillNum ); | |
Purpose | Returns the trgChar's skill value for skill skillNum | |
Example of Usage | skillVal = GetSkill( srcChar, 0 ); |
GetBaseSkill | ||
---|---|---|
Prototype | short GetBaseSkill( int trgChar, UCHAR skillNum ); | |
Purpose | Returns the trgChar's BASE skill value for skill skillNum (ie no adjustments due to race and what not) | |
Example of Usage | skillVal = GetBaseSkill( srcChar, 0 ); |
GetMana | ||
---|---|---|
Prototype | short GetMana( int trgChar ); | |
Purpose | Returns the mana of trgChar | |
Example of Usage | mana = GetMana( srcChar ); |
GetStamina | ||
---|---|---|
Prototype | short GetStamina( int trgChar ); | |
Purpose | Returns the stamina of trgChar | |
Example of Usage | stm = GetStamina( srcChar ); |
RunTo | ||
---|---|---|
Prototype | RunTo( int trgChar, short targX, short targY, UCHAR maxSteps ); | |
Purpose | Gets trgChar to attempt to pathfind to locaton (targX, targY) by running | |
Example of Usage | RunTo( srcChar, 1000, 1000, 5 ); |
WalkTo | ||
---|---|---|
Prototype | WalkTo( int trgChar, short targX, short targY, UCHAR maxSteps ); | |
Purpose | Gets trgChar to attempt to pathfind to locaton (targX, targY) by running | |
Example of Usage | WalkTo( srcChar, 1000, 1000, 5 ); |
SetTarget | ||
---|---|---|
Prototype | SetTarget( trgChar, target ); | |
Purpose | Sets trgChar's target to target | |
Example of Usage | SetTarget( srcChar, trgChar ); |
SetDexterity | ||
---|---|---|
Prototype | SetDexterity( trgChar, trgValue ); | |
Purpose | Sets trgChar's dexterity to trgValue | |
Example of Usage | SetDexterity( srcChar, 10 ); |
SetIntelligence | ||
---|---|---|
Prototype | SetIntelligence( trgChar, trgValue ); | |
Purpose | Sets trgChar's intelligence to trgValue | |
Example of Usage | SetIntelligence( srcChar, 50 ); |
SetStrength | ||
---|---|---|
Prototype | SetStrength( trgChar, trgValue ); | |
Purpose | Sets trgChar's strength to trgValue | |
Example of Usage | SetStrength( srcChar, 100 ); |
SetSkill | ||
---|---|---|
Prototype | SetSkill( trgChar, skillNum, skillValue ); | |
Purpose | Sets trgChar's skillNum skill to skillValue | |
Example of Usage | SetSkill( srcChar, 0, 1000 ); |
SetMana | ||
---|---|---|
Prototype | SetMana( trgChar, manaValue ); | |
Purpose | Sets trgChar's mana to manaValue | |
Example of Usage | SetMana( trgChar, 10 ); |
SetStamina | ||
---|---|---|
Prototype | SetStamina( trgChar, stamValue ); | |
Purpose | Sets trgChar's stamina to stamValue | |
Example of Usage | SetStamina( trgChar, 100 ); |
GetCharPack | ||
---|---|---|
Prototype | int GetCharPack( trgChar ); | |
Purpose | Returns the index of the character's pack | |
Example of Usage | iPack = GetCharPack( srcChar ); |
GetFame | ||
---|---|---|
Prototype | int GetFame( trgChar ); | |
Purpose | Returns the fame of the character | |
Example of Usage | cFame = GetFame( srcChar ); |
GetKarma | ||
---|---|---|
Prototype | int GetKarma( trgChar ); | |
Purpose | Returns the karma of the character | |
Example of Usage | cKarma = GetKarma( srcChar ); |
SetFame | ||
---|---|---|
Prototype | SetFame( trgChar, fameValue ); | |
Purpose | Sets trgChar's fame to fameValue | |
Example of Usage | SetFame( srcChar, 10000 ); |
SetKarma | ||
---|---|---|
Prototype | SetKarma( trgChar, karmaValue ); | |
Purpose | Sets trgChar's karma to karmaValue | |
Example of Usage | SetKarma( srcChar, -5000 ); |
CalcDefense | ||
---|---|---|
Prototype | int CalcDefense( trgChar ); | |
Purpose | Returns the calculated defense value of trgChar | |
Example of Usage | var iDefense = CalcDefense( srcChar ); |
CalcAttack | ||
---|---|---|
Prototype | int CalcAttack( trgChar ); | |
Purpose | Returns the calculated attack value of trgChar | |
Example of Usage | var iAttack = CalcAttack( srcChar ); |
GetHunger | ||
---|---|---|
Prototype | int GetHunger( trgChar ); | |
Purpose | Returns the hunger of trgChar | |
Example of Usage | var iHunger = GetHunger( srcChar ); |
SetHunger | ||
---|---|---|
Prototype | SetHunger( trgChar, hungerVal ); | |
Purpose | Sets trgChar's hunger to hungerVal; | |
Example of Usage | SetHunger( trgChar, 6 ); |
DoAction | ||
---|---|---|
Prototype | DoAction( trgChar, trgAction ); | |
Purpose | Makes trgChar do action trgAction | |
Example of Usage | DoAction( srcChar, 0x0B ); |
OpenBank | ||
---|---|---|
Prototype | OpenBank( trgChar, trgSock ); | |
Purpose | Open's trgChar's bank, sending it to trgSock | |
Example of Usage | OpenBank( srcChar, srcSock ); |
GetCommandLevel | ||
---|---|---|
Prototype | int GetCommandLevel( player ); | |
Purpose | Returns the command level associated with a character | |
Example of Usage | var iLevel = GetCommandLevel( pTalking ); |
SetCommandLevel | ||
---|---|---|
Prototype | SetCommandLevel( player, level ); | |
Purpose | Sets the command level of the player to level | |
Example of Usage | SetCommandLevel( pTalkingTo, 5 ); |
GetRace | ||
---|---|---|
Prototype | int GetRace( pCheck ); | |
Purpose | Returns the race associated with a character pCheck | |
Example of Usage | var iRace = GetRace( pTalking ); |
SetRace | ||
---|---|---|
Prototype | SetRace( pChange, iValue ); | |
Purpose | Sets the race of the player to iValue. Note that it does a transform, much like going through a gate. Not guarenteed to succeed, as the player may not fit the requirements for that race. | |
Example of Usage | SetRace( pTalkingTo, 0 ); |
GetMurderCount | ||
---|---|---|
Prototype | int GetMurderCount( pCheck ); | |
Purpose | Returns the number of kills that pCheck has made. | |
Example of Usage | var iKills = GetMurderCount( pTalking ); |
IsDead | ||
---|---|---|
Prototype | bool IsDead( pCheck ); | |
Purpose | Returns true if the character pCheck is dead. | |
Example of Usage | if( IsDead( pTalking ) ) |
IsNPC | ||
---|---|---|
Prototype | bool IsNPC( pCheck ); | |
Purpose | Returns true if the character pCheck is an NPC. | |
Example of Usage | if( IsNPC( pTalking ) ) |
IsOnline | ||
---|---|---|
Prototype | bool IsOnline( pCheck ); | |
Purpose | Returns true if the character pCheck is online. | |
Example of Usage | if( IsOnline( pTalking ) ) |
GetDir | ||
---|---|---|
Prototype | unsigned char GetDir( pCheck, pType ); | |
Purpose | Returns the direction that pCheck is facing. If pType == 0, pCheck is a character. If pType == 1, pCheck is an item | |
Example of Usage | if( GetDir( pTalking, 0 ) >= 0x80 ) |
SetDir | ||
---|---|---|
Prototype | SetDir( newDir, pCheck, pType ); | |
Purpose | Sets the direction of pCheck to newDir. If pType == 0, pCheck is a character. If pType == 1, pCheck is an item. | |
Example of Usage | SetDir( GetDir( pTalking, 0 ) + 1, pTalking, 0 ); |
GetTown | ||
---|---|---|
Prototype | unsigned char GetTown( pCharacter ); | |
Purpose | Returns the town that pCharacter belongs to | |
Example of Usage | if( GetTown( pTalking ) == 255 ) |
SetTown | ||
---|---|---|
Prototype | SetTown( pCharacter, iTown ); | |
Purpose | Sets pCharacter's town to iTown | |
Example of Usage | SetTown( pTalking, 255 ); |
GetRegion | ||
---|---|---|
Prototype | unsigned char GetRegion( pCharacter ); | |
Purpose | Returns the region that the character is currently in | |
Example of Usage | if( GetTown( pTalking ) == GetRegion( pTalking ) ) |
SetRegion | ||
---|---|---|
Prototype | SetRegion( pCharacter, iRegion ); | |
Purpose | Sets pCharacter's region to iRegion. | |
Example of Usage | SetRegion( pTalking, 255 ); |
UseDoor | ||
---|---|---|
Prototype | UseDoor( iSock, iToUse ); | |
Purpose | Uses the door iToUse. iSock is used for message display. If unknown, use -1. | |
Example of Usage | if( GetType( iUsed ) == 12 ) |
GetGuild | ||
---|---|---|
Prototype | int GetGuild( pCharacter ); | |
Purpose | Returns the guild that pCharacter belongs to (if any). If the return value is -1, they're not in a guild | |
Example of Usage | if( GetGuild( pTalking ) != -1 ) |
VendorSell | ||
---|---|---|
Prototype | VendorSell( tSock, targNPC ); | |
Purpose | Brings up the shopkeeper gump for selling to a vendor targNPC by tSock. | |
Example of Usage | VendorSell( CalcSockFromChar( pTalking ), pTalkingTo ); |
VendorBuy | ||
---|---|---|
Prototype | VendorBuy( tSock, targNPC ); | |
Purpose | Brings up the shopkeeper gump or PV backpack for buying for vendor targNPC. | |
Example of Usage | VendorBuy( CalcSockFromChar( pTalking ), pTalkingTo ); |