Author Topic: Orc Warrior  (Read 2666 times)

Martin Texno

  • Newbie
  • *
  • Posts: 22
  • I'm Constructive ?
    • MSN Messenger - martinkongerule@hotmail.com
    • Yahoo Instant Messenger - martinmikalsen@yahoo.com
    • View Profile
    • Zombie-Asylum !
    • Email
Orc Warrior
« on: December 02, 2009, 10:15:11 AM »
Code: [Select]
#include <sourcemod>
#include "War3Source/War3Source_Interface"
#include <sdktools>
#include <sdktools_functions>

new raceID;

public Plugin:myinfo =
{
name =  "Orc warrior", //Race Name!
author =  "<---TexNo--->", //Author of the race!
description = "A race for war3source", //Description for the race!
version = "1.0",   //Race Version!
url = "http://zeroasylum.freeforums.org/"  //My forum Website!
};

new ComballEffect,FireSprite,HyBeam,TeleBeam;

public OnWar3PluginReady()
{
   raceID=War3_CreateRace("Orc Warrior",
                   "orc
             "You are now Orc Warrior",
             "Respawned as Orc Warrir",
              "Orc Slowdown",
             "Slowdown the enemy you shoot!",
             "Orc Skin",
             "Hard skin");
}

public OnPluginStart()
{
HookEvent("player_Attacker",PlayerAttackerEvent);
}

public PlayerSpawnEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
new victim=GetClientOfUserId(GetEventInt("userid"));
new attacker=GetClientOfUserId(GetEventInt("attacker"));
if(victim>0 && attacker>0)
{
  new skill_attacker=War3_GetSkillLevel(attacker,victim,skillnumber);
  if(skill_attacker>0)
  {
    new Float:speed=1.0;
    switch(skill_attacker)
    {
      case 1:
        speed=0.8;
      case 2:
        speed=0.7;
      case 3:
        speed=0.5;
      case 4:
        speed=0.2;
    }
    War3_SetOverrideSpeed(victim,speed,skillnumber);
TE_SetupBeamRingPoint(vec,25.10,10.0.0,ComballEffect,TeleBeam,,5,25,1.3,15.0,0.0,ringColor,20,1.0);
TE_SetupBeamRingPoint(vec,60.60,25.0.0,FireSprite,HyBeam,10,29,1.3,15.0,10.0,ringColor,50,5.3);
TE_SendToAll();
    CreateTimer(5.0,fix_speed,GetEventInt("userid"));
  }
}
public Action:fix_speed(Handle:timer,any:userid)
{
  new client=GetClientOfUserId(userid);
  if(client>0)
  {
    War3_SetOverrideSpeed(victim,0.0,skillnumber);
  }
}
    CreateTimer(5.0,fix_speed,GetEventInt("userid"));
{
case 0:
add_health=9;
case 1:
add_health=16;
case 2:
add_health=27;
case 3:
add_health=38;
case 4:
add_health=46;
        {
public Action:fix_speed(Handle:timer,any:userid)
{
  new client=GetClientOfUserId(userid);
  if(client>0)
  {
    War3_SetOverrideSpeed(victim,0.0,skillnumber);
}
}

enum War3Immunity
{
Immunity_Ultimates = 1,
Immunity_HealthTake = 1,
   {

War3_ChatMessage(client,"You got orcish Speed, and Skin !",);
}
}

public OnSkillLevelChanged(client,race,skill,oldskilllevel,newskilllevel)
{
if(race==raceID && skill==0)
{
    War3_SetMinSpeed(client,speed)
}
if(race==raceID && skill==1)
{
new Float:speed=1.0;
switch(newskilllevel)
{
case 0:
speed=1.3;
case 1:
speed=1.5;
case 2:
speed=1.6;
case 3:
speed=1.7;
case 4:
speed=1.8;
}
   War3_SetMaxSpeed(client,speed);
}
}

   public OnMapStart()
{
FireSprite=PrecacheModel("materials/sprites/halo01.vmt");
  ComballEffect=PrecacheModel("models/effects/comball_tape.vmt");
  HyBeam=PrecacheModel("sprites/hydragutbeamcap.vmt");
  TeleBeam=PrecacheModel("sprites/tp_beam001.vmt");
}

public OnRaceSelected(client,oldrace,newrace)
{
if(newrace!=raceID)
{
War3_SetMaxSpeed(client,1.0);
War3_SetMinGravity(client,1.0);
    War3_SetMinHealth(client,100);
}
 }
}
« Last Edit: December 02, 2009, 11:43:29 AM by Martin Texno »
Support ?