Update Perl API

Akkadius
2018-07-01 02:29:28 -05:00
parent c6990cb63b
commit 02747cc941
+59 -26
@@ -700,8 +700,13 @@ UseDiscipline(spell_id, target)
WorldKick() WorldKick()
``` ```
#### **Corpse - $corpse->Object();** # Corpse
```perl
$corpse->AddItem(itemnum, charges, slot)
```
```perl
AddItem(itemnum, charges, slot) AddItem(itemnum, charges, slot)
AddLooter(who) AddLooter(who)
AllowMobLoot(them, slot) AllowMobLoot(them, slot)
@@ -726,13 +731,19 @@ WorldKick()
RemoveCash() RemoveCash()
RemoveItem(lootslot) RemoveItem(lootslot)
ResetLooter() ResetLooter()
SetCash(in\_copper, in\_silver, in\_gold, in\_platinum) SetCash(in_copper, in_silver, in_gold, in_platinum)
SetDecayTimer(decaytime) SetDecayTimer(decaytime)
Summon(client, spell) Summon(client, spell)
UnLock() UnLock()
```
#### **EntityList - $entity_list->Object();** # EntityList
```perl
$entity_list->Object();
```
```perl
CanAddHateForMob(p) CanAddHateForMob(p)
Clear() Clear()
ClearClientPetitionQueue() ClearClientPetitionQueue()
@@ -777,7 +788,7 @@ WorldKick()
MakeNameUnique(name) MakeNameUnique(name)
MessageClose(sender, skipsender, dist, type, message, ...) MessageClose(sender, skipsender, dist, type, message, ...)
MessageGroup(sender, skipclose, type, message, ...) MessageGroup(sender, skipclose, type, message, ...)
MessageStatus(to\_guilddbid, to\_minstatus, type, message, ...) MessageStatus(to_guilddbid, to_minstatus, type, message, ...)
OpenDoorsNear(opener) OpenDoorsNear(opener)
RemoveAllClients() RemoveAllClients()
RemoveAllCorpses() RemoveAllCorpses()
@@ -801,10 +812,14 @@ WorldKick()
RemoveTrap(delete_id) RemoveTrap(delete_id)
ReplaceWithTarget(pOldMob, pNewTarget) ReplaceWithTarget(pOldMob, pNewTarget)
SignalAllClients(data) SignalAllClients(data)
SignalMobsByNPCID(npc\_type, signal\_id) SignalMobsByNPCID(npc_type, signal_id)
```
#### **Group - $group->Object(); ($group needs to be defined from my $group = $client->GetGroup())** # Group
* $group needs to be fetched from an entity object, for example: $group = $client->GetGroup())
```perl
CastGroupSpell(caster, spellid) CastGroupSpell(caster, spellid)
DisbandGroup() DisbandGroup()
GetHighestLevel() GetHighestLevel()
@@ -823,9 +838,17 @@ WorldKick()
SplitExp(exp, other) SplitExp(exp, other)
SplitMoney(copper, silver, gold, platinum) SplitMoney(copper, silver, gold, platinum)
TeleportGroup(sender, zoneID, x, y, z) TeleportGroup(sender, zoneID, x, y, z)
```
#### **Raid - $raid->Object(); ($raid needs to be defined from my $raid = $client->GetRaid())** # Raid
```perl
$raid->Object();
```
* $raid needs to be fetched from an entity object, for example: $raid = $client->GetRaid())
```perl
BalanceHP() BalanceHP()
CastGroupSpell(caster, spellid) CastGroupSpell(caster, spellid)
GetClientByIndex(number) GetClientByIndex(number)
@@ -844,9 +867,11 @@ WorldKick()
SplitMoney(copper, silver, gold, platinum) SplitMoney(copper, silver, gold, platinum)
TeleportGroup(sender, zoneID, x, y, z, heading) TeleportGroup(sender, zoneID, x, y, z, heading)
TeleportRaid(sender, zoneID, x, y, z, heading) TeleportRaid(sender, zoneID, x, y, z, heading)
```
#### **Mob - $mob->Object();** #### **Mob - $mob->Object();**
```perl
AddFeignMemory(attacker) AddFeignMemory(attacker)
AddToHateList(other, hate, damage, iYellForHelp, bFrenzy, iBuffTic) AddToHateList(other, hate, damage, iYellForHelp, bFrenzy, iBuffTic)
Attack(other, Hand, FromRiposte) Attack(other, Hand, FromRiposte)
@@ -856,7 +881,7 @@ WorldKick()
BuffFadeBySlot(slot, iRecalcBonuses) BuffFadeBySlot(slot, iRecalcBonuses)
BuffFadeBySpellID(spell_id) BuffFadeBySpellID(spell_id)
CalculateDistance(x, y, z) CalculateDistance(x, y, z)
CalculateHeadingToTarget(in\_x, in\_y) CalculateHeadingToTarget(in_x, in_y)
CalculateNewPosition(x, y, z, speed, checkZ) CalculateNewPosition(x, y, z, speed, checkZ)
CalculateNewPosition2(x, y, z, speed, checkZ) CalculateNewPosition2(x, y, z, speed, checkZ)
CameraEffect(duration, intensity, singleclient, serverwide) CameraEffect(duration, intensity, singleclient, serverwide)
@@ -867,7 +892,7 @@ WorldKick()
CanThisClassDualWield() CanThisClassDualWield()
CanThisClassParry() CanThisClassParry()
CanThisClassRiposte() CanThisClassRiposte()
CastSpell(spell\_id, target\_id, slot, casttime, mana\_cost, resist\_adjust) CastSpell(spell_id, target_id, slot, casttime, mana_cost, resist_adjust)
CastToClient() CastToClient()
CastToCorpse() CastToCorpse()
CastToMob() CastToMob()
@@ -883,15 +908,15 @@ WorldKick()
ClearFeignMemory() ClearFeignMemory()
ClearSpecialAbilities() ClearSpecialAbilities()
CombatRange() CombatRange()
Damage(from, damage, spell\_id, attack\_skill, avoidable, buffslot, iBuffTic) Damage(from, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic)
DelGlobal(varname) DelGlobal(varname)
Depop(StartSpawnTimer) Depop(StartSpawnTimer)
DivineAura() DivineAura()
DoAnim(animnum, type=1) DoAnim(animnum, type=1)
DoArcheryAttackDmg() DoArcheryAttackDmg()
DoKnockback(caster, pushback, pushup) # $client->DoKnockback($npc, 10, 7) would appear that the NPC knocked the client back DoKnockback(caster, pushback, pushup)  # $client->DoKnockback($npc, 10, 7) would appear that the NPC knocked the client back
DoMeleeSkillAttackDmg() DoMeleeSkillAttackDmg()
DoSpecialAttackDamage(target, skill, max\_damage, min\_damage, hate_override) DoSpecialAttackDamage(target, skill, max_damage, min_damage, hate_override)
DoThrowingAttackDmg() DoThrowingAttackDmg()
DontBuffMeBefore() DontBuffMeBefore()
DontDotMeBefore() DontDotMeBefore()
@@ -1034,7 +1059,7 @@ WorldKick()
HasProcs() HasProcs()
HateSummon() HateSummon()
Heal() Heal()
HealDamage(amount\[, caster\]) HealDamage(amount[, caster])
InterruptSpell(spellid) InterruptSpell(spellid)
IsAIControlled() IsAIControlled()
IsBeacon() IsBeacon()
@@ -1067,7 +1092,7 @@ WorldKick()
MakeTempPet(spell_id, name, duration, target, sticktarg?) MakeTempPet(spell_id, name, duration, target, sticktarg?)
Mesmerize() Mesmerize()
Message(type, message) Message(type, message)
Message\_StringID(type, string\_id, distance) Message_StringID(type, string_id, distance)
ModSkillDmgTaken() ModSkillDmgTaken()
ModVulnerability() ModVulnerability()
NPCSpecialAttacks(parse, permtag, reset, remove) NPCSpecialAttacks(parse, permtag, reset, remove)
@@ -1077,21 +1102,21 @@ WorldKick()
RangedAttack() RangedAttack()
RemoveFromFeignMemory(attacker) RemoveFromFeignMemory(attacker)
RemoveNimbusEffect(effectid) RemoveNimbusEffect(effectid)
ResistSpell(resist\_type, spell\_id, caster) ResistSpell(resist_type, spell_id, caster)
RogueAssassinate(other) RogueAssassinate(other)
Say(format, language_id) Say(format, language_id)
SendAppearanceEffect(effect1, effect2, effect3, effect4, effect5, specificclient) SendAppearanceEffect(effect1, effect2, effect3, effect4, effect5, specificclient)
SendIllusion(race, gender, texture, helmtexture, face, hairstyle, haircolor, beard, beardcolor, drakkin\_heritage, drakkin\_tattoo, drakkin_details, size) SendIllusion(race, gender, texture, helmtexture, face, hairstyle, haircolor, beard, beardcolor, drakkin_heritage, drakkin_tattoo, drakkin_details, size)
SendPosUpdate(iSendToSelf) SendPosUpdate(iSendToSelf)
SendPosition() SendPosition()
SendTo(new\_x, new\_y, new_z) SendTo(new_x, new_y, new_z)
SendToFixZ(new\_x, new\_y, new_z) SendToFixZ(new_x, new_y, new_z)
SendWearChange(material_slot) SendWearChange(material_slot)
SetAllowBeneficial() SetAllowBeneficial()
SetAppearance(app, iIgnoreSelf) SetAppearance(app, iIgnoreSelf)
SetBodyType(type, overwrite_orig?) SetBodyType(type, overwrite_orig?)
SetCurrentWP(waypoint) SetCurrentWP(waypoint)
SetDeltas(delta\_x, delta\_y, delta\_z, delta\_h) SetDeltas(delta_x, delta_y, delta_z, delta_h)
SetDisableMelee() SetDisableMelee()
SetEntityVariable(id_num, var) SetEntityVariable(id_num, var)
SetExtraHaste(Haste) SetExtraHaste(Haste)
@@ -1117,7 +1142,7 @@ WorldKick()
SetRunAnimSpeed(in) SetRunAnimSpeed(in)
SetRunning() SetRunning()
SetShieldTarget(mob) SetShieldTarget(mob)
SetSlotTint(material\_slot, red\_tint, green\_tint, blue\_tint) SetSlotTint(material_slot, red_tint, green_tint, blue_tint)
SetSpecialAbility(ability, value) SetSpecialAbility(ability, value)
SetSpecialAbilityParam(ability, param, value) SetSpecialAbilityParam(ability, param, value)
SetTarget(mob) SetTarget(mob)
@@ -1126,8 +1151,8 @@ WorldKick()
SetTexture(texture) SetTexture(texture)
Shout(format, ...) Shout(format, ...)
SignalClient(client, data) SignalClient(client, data)
SpellEffect(effect, duration, finish\_delay, zone\_wide, unk20, perm\_effect, client) # duration, finish\_delay, zone\_wide, unk20, perm\_effect, and client are Optional. SpellEffect(effect, duration, finish_delay, zone_wide, unk20, perm_effect, client) # duration, finish_delay, zone_wide, unk20, perm_effect, and client are Optional.
SpellFinished(spell\_id, spell\_target, mana_cost) SpellFinished(spell_id, spell_target, mana_cost)
Spin() Spin()
StartEnrage() StartEnrage()
Stun(duration) # in whole seconds Stun(duration) # in whole seconds
@@ -1137,15 +1162,22 @@ WorldKick()
TypesTempPet(typesid, name, duration, follow, target, sticktarg); TypesTempPet(typesid, name, duration, follow, target, sticktarg);
WearChange(material_slot, texture, color) WearChange(material_slot, texture, color)
WipeHateList() WipeHateList()
```
#### **NPC - $npc->Object();** # NPC
Example:
```perl
$npc->GetLoottableID();
```
```perl
AI_SetRoambox(iDist, iMaxX, iMinX, iMaxY, iMinY, iDelay) AI_SetRoambox(iDist, iMaxX, iMinX, iMaxY, iMinY, iDelay)
AddAISpell(priority, spell\_id, type, mana\_cost, recast\_delay, resist\_adjust) AddAISpell(priority, spell_id, type, mana_cost, recast_delay, resist_adjust)
AddCash(in\_copper, in\_silver, in\_gold, in\_platinum) AddCash(in_copper, in_silver, in_gold, in_platinum)
AddItem(itemid, charges, equipitem) AddItem(itemid, charges, equipitem)
AddLootTable() AddLootTable()
AddDefensiveProc(spellid, chance) AddDefensiveProc(spellid, chance)   
AddMeleeProc(spellid, chance) AddMeleeProc(spellid, chance)
AddRangedProc(spellid, chance) AddRangedProc(spellid, chance)
AssignWaypoints(grid) AssignWaypoints(grid)
@@ -1228,6 +1260,7 @@ WorldKick()
StartSwarmTimer(duration) StartSwarmTimer(duration)
StopWandering() StopWandering()
UpdateWaypoint(wp_index) UpdateWaypoint(wp_index)
```
#### **Quest Item** #### **Quest Item**