Anti-Pvp Guard (Stuns, Messages & Teleports)

Hello there,

It came to my attention that a LOT of hard-coded C++ scripts can be easily done in SAI, such as an easy anti-PvP guard. Therefore this topic. If you’ve got any suggestions of custom scripts that could be done in SAI, feel free to leave a reply and I’ll let you know if I can make it. /emoticons/default_smile.png

V1. This creature features an anti-PvP function. Whenever a player attacks another player the faction handles that it enters combat. As you can see I clearly commented that on aggro it runs the script, which means that on aggro it stuns and whispers something, stops auto attack and teleports the player to, in this case, Shattrath after 30 seconds.

Please note this guard is not targetable for a nicer view. If you wish to make it targetable, change the creature_template.unit_flag to 390.

SET @ENTRY := 60001;
SET @SPELL_STUN := 36877; – One minute stun
DELETE FROM smart_scripts WHERE entryorguid IN (@ENTRY,@ENTRY100);
INSERT INTO smart_scripts (entryorguid,source_type,id,link,event_type,event_phase_mask,event_chance,event_flags,event_param1,event_param2,event_param3,event_param4,action_type,action_param1,action_param2,action_param3,action_param4,action_param5,action_param6,target_type,target_param1,target_param2,target_param3,target_x,target_y,target_z,target_o,comment) VALUES
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,80,@ENTRY
100,0,2,0,0,0,1,0,0,0,0,0,0,0,“Warden - On Aggro - Run Script”),
(@ENTRY100,9,0,0,0,0,100,1,0,0,0,0,11,@SPELL_STUN,0,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - Script - Cast Stun”),
(@ENTRY
100,9,1,0,2,0,100,1,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - Script - Whisper Line 0”),
(@ENTRY100,9,2,0,2,0,100,1,0,0,0,0,20,0,0,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - Script - Stop Auto Attack”),
(@ENTRY
100,9,3,0,0,0,100,1,30000,30000,0,0,62,530,0,0,0,0,0,2,0,0,0,-1911.390259,5406.233887,-12.427841,0.446839,“Warden - Script - Teleport To Shattrath - After 30 Sec”),
(@ENTRY*100,9,4,0,0,0,100,1,30000,30000,0,0,24,0,0,0,0,0,0,7,0,0,0,0,0,0,0,“Warden - Script - Evade After 60 Seconds”);

– Text
DELETE FROM creature_text WHERE entry=@ENTRY;
INSERT INTO creature_text (entry,groupid,id,text,type,language,probability,emote,duration,sound,comment) VALUES
(@ENTRY,0,0,“You are not allowed to PvP around here, $N. I will teleport you to Shattrath now.”,15,0,100,0,0,0,“Warden whisper”);

– Insert creature
DELETE FROM creature_template WHERE entry=60001;
INSERT INTO creature_template( entry,difficulty_entry_1,difficulty_entry_2,difficulty_entry_3,KillCredit1,KillCredit2,modelid1,modelid2,modelid3,modelid4,name,subname,IconName,gossip_menu_id,minlevel,maxlevel,exp,faction_A,faction_H,npcflag,speed_walk,speed_run,scale,rank,mindmg,maxdmg,dmgschool,attackpower,dmg_multiplier,baseattacktime,rangeattacktime,unit_class,unit_flags,dynamicflags,family,trainer_type,trainer_spell,trainer_class,trainer_race,minrangedmg,maxrangedmg,rangedattackpower,type,type_flags,lootid,pickpocketloot,skinloot,resistance1,resistance2,resistance3,resistance4,resistance5,resistance6,spell1,spell2,spell3,spell4,spell5,spell6,spell7,spell8,PetSpellDataId,VehicleId,mingold,maxgold,AIName,MovementType,InhabitType,Health_mod,Mana_mod,Armor_mod,RacialLeader,questItem1,questItem2,questItem3,questItem4,questItem5,questItem6,movementId,RegenHealth,equipment_id,mechanic_immune_mask,flags_extra,ScriptName,WDBVerified)VALUES
(60001,0,0,0,0,0,25517,0,0,0,‘Warden’,‘Anti-PvP Guard’,‘’,0,255,255,0,1726,1726,0,31.25,100,1,1,1,1,0,1,1,1,1,1,33554822,0,0,0,0,0,0,1,1,1,10,8,0,0,0,500,500,500,500,500,500,0,0,0,0,0,0,0,0,0,0,0,0,‘SmartAI’,0,1,1,1,2.5,0,0,0,0,0,0,0,0,1,0,0,0,‘’,-1);

-- Warden SAI

V2. This is just a basic guard. It runs at mount speed, casts a net on aggro and casts cleave on the player in combat.

SET @ENTRY := 60002;
SET @SPELL_NET := 50762;
SET @SPELL_CLEAVE := 15496;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY;
INSERT INTO smart_scripts (entryorguid,source_type,id,link,event_type,event_phase_mask,event_chance,event_flags,event_param1,event_param2,event_param3,event_param4,action_type,action_param1,action_param2,action_param3,action_param4,action_param5,action_param6,target_type,target_param1,target_param2,target_param3,target_x,target_y,target_z,target_o,comment) VALUES
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,11,@SPELL_NET,0,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - On Aggro - Cast Net”),
(@ENTRY,0,1,0,0,0,100,0,2000,3000,5000,6000,11,@SPELL_CLEAVE,1,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - In Combat - Cast Cleave”);

– Insert creature
DELETE FROM creature_template WHERE entry=60002;
INSERT INTO creature_template( entry,difficulty_entry_1,difficulty_entry_2,difficulty_entry_3,KillCredit1,KillCredit2,modelid1,modelid2,modelid3,modelid4,name,subname,IconName,gossip_menu_id,minlevel,maxlevel,exp,faction_A,faction_H,npcflag,speed_walk,speed_run,scale,rank,mindmg,maxdmg,dmgschool,attackpower,dmg_multiplier,baseattacktime,rangeattacktime,unit_class,unit_flags,dynamicflags,family,trainer_type,trainer_spell,trainer_class,trainer_race,minrangedmg,maxrangedmg,rangedattackpower,type,type_flags,lootid,pickpocketloot,skinloot,resistance1,resistance2,resistance3,resistance4,resistance5,resistance6,spell1,spell2,spell3,spell4,spell5,spell6,spell7,spell8,PetSpellDataId,VehicleId,mingold,maxgold,AIName,MovementType,InhabitType,Health_mod,Mana_mod,Armor_mod,RacialLeader,questItem1,questItem2,questItem3,questItem4,questItem5,questItem6,movementId,RegenHealth,equipment_id,mechanic_immune_mask,flags_extra,ScriptName,WDBVerified)VALUES
(60002,0,0,0,0,0,25517,0,0,0,‘Warden’,‘Anti-PvP Guard’,‘’,0,80,80,0,1679,1679,0,3,2,1,1,5000,7000,0,1,1,2000,1,1,0,0,0,0,0,0,0,1,1,1,10,8,0,0,0,500,500,500,500,500,500,0,0,0,0,0,0,0,0,0,0,0,0,‘SmartAI’,0,1,5,1,2.5,0,0,0,0,0,0,0,0,1,0,603989056,32768,‘’,-1);

-- Warden SAI

That’s it for now, please submit ideas so that I can make your wishes come true. ^^

The Brogok encounter in the Blood Furnace instance:

Room prior to Brogok boss, fight starts by pulling the lever. Mobs will start coming out from each room,

http://www.wowhead.com/zone=3713#comments

Not custom at all. Please read the topic instead…

Nice, gonna try em, Thanks!

what about Death Grip .

death grip the player . cast silence . cleave and boom .

yea its crazy .

but better than following a player .

I only have one problem with version 2, otherwise it works beautifully! When it goes to cleave it doesn’t just cleave a target, it continuously attacks for 2-4k damage on a geared 80 toon until it’s dead.

Thx, i will test it !

V2. This is just a basic guard. It runs at mount speed, casts a net on aggro and casts cleave on the player in combat.

SET @ENTRY := 60002;
SET @SPELL_NET := 50762;
SET @SPELL_CLEAVE := 15496;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY;
INSERT INTO smart_scripts (entryorguid,source_type,id,link,event_type,event_phase_mask,event_chance,event_flags,event_param1,event_param2,event_param3,event_param4,action_type,action_param1,action_param2,action_param3,action_param4,action_param5,action_param6,target_type,target_param1,target_param2,target_param3,target_x,target_y,target_z,target_o,comment) VALUES
(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,11,@SPELL_NET,0,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - On Aggro - Cast Net”),
(@ENTRY,0,1,0,0,0,100,0,2000,3000,5000,6000,11,@SPELL_CLEAVE,1,0,0,0,0,2,0,0,0,0,0,0,0,“Warden - In Combat - Cast Cleave”);

– Insert creature
DELETE FROM creature_template WHERE entry=60002;
INSERT INTO creature_template( entry,difficulty_entry_1,difficulty_entry_2,difficulty_entry_3,KillCredit1,KillCredit2,modelid1,modelid2,modelid3,modelid4,name,subname,IconName,gossip_menu_id,minlevel,maxlevel,exp,faction_A,faction_H,npcflag,speed_walk,speed_run,scale,rank,mindmg,maxdmg,dmgschool,attackpower,dmg_multiplier,baseattacktime,rangeattacktime,unit_class,unit_flags,dynamicflags,family,trainer_type,trainer_spell,trainer_class,trainer_race,minrangedmg,maxrangedmg,rangedattackpower,type,type_flags,lootid,pickpocketloot,skinloot,resistance1,resistance2,resistance3,resistance4,resistance5,resistance6,spell1,spell2,spell3,spell4,spell5,spell6,spell7,spell8,PetSpellDataId,VehicleId,mingold,maxgold,AIName,MovementType,InhabitType,Health_mod,Mana_mod,Armor_mod,RacialLeader,questItem1,questItem2,questItem3,questItem4,questItem5,questItem6,movementId,RegenHealth,equipment_id,mechanic_immune_mask,flags_extra,ScriptName,WDBVerified)VALUES
(60002,0,0,0,0,0,25517,0,0,0,‘Warden’,‘Anti-PvP Guard’,‘’,0,80,80,0,1679,1679,0,3,2,1,1,5000,7000,0,1,1,2000,1,1,0,0,0,0,0,0,0,1,1,1,10,8,0,0,0,500,500,500,500,500,500,0,0,0,0,0,0,0,0,0,0,0,0,‘SmartAI’,0,1,5,1,2.5,0,0,0,0,0,0,0,0,1,0,603989056,32768,‘’,-1);

-- Warden SAI

[/SPOILER]

That’s it for now, please submit ideas so that I can make your wishes come true. ^^

The V1 Version can you update for the latest Rev?

NPC Teleport

4example:

Player lost in the world and came to the territory in which he/she should not be

Possible?

BTW. thx for SAI guard and Chat Filter

Don"t help me :confused:

I think this isn’t working anymore.

yes it doesnt