Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-09-22 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
September 21, 2012, 09:11:34 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Orc Warrior  (Read 1224 times)
Martin Texno
Newbie
*
Posts: 22


I'm Constructive ?

martinkongerule@hotmail.com martinmikalsen@yahoo.com
View Profile WWW Email
« on: December 02, 2009, 10:15:11 AM »

Code:
#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 » Logged

Support ?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!