AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help; WC3 new items (https://forums.alliedmods.net/showthread.php?t=187451)

Johiish 06-13-2012 10:37

Help; WC3 new items
 
Hello, I want 2 new items into my new shopmenu (3) The names should be Siphon mana and Banish. Siphon mana will take and gain $100 from enemy each bullet attack. Banish will be like a slap each bullet attack. Here is the Banish script for but i dont know how to fix it into the item list :(






Quote:

// Banish
iSkillLevel = SM_GetSkillLevel( iVictim, SKILL_BANISH );
if ( iSkillLevel > 0 )
{

if ( random_float( 0.0, 1.0 ) <= p_banish[iSkillLevel-1] )
{

// Make sure the user isn't banished and that the enemy isn't in the victim's view (victim might be attacking them)
if ( !g_bPlayerBanished[iAttacker] && !UTIL_CanSeePlayer( iVictim, iAttacker ) )
{

// Deal some damage
WC3_Damage( iAttacker, iVictim, BANISH_DAMAGE, CSW_BANISH, 0 );

// Play the Banish sound
emit_sound( iAttacker, CHAN_STATIC, g_szSounds[SOUND_BANISH], 1.0, ATTN_NORM, 0, PITCH_NORM );

// Black screen the user!
Create_ScreenFade( iAttacker, 2, (1<<10), (1<<12), 0, 0, 0, 255 );

new vOrigin[3];
get_user_origin( iAttacker, vOrigin );

new parm[5];
parm[0] = iAttacker;
parm[1] = floatround( BANISH_HOLDTIME * 10.0 );
parm[2] = vOrigin[0];
parm[3] = vOrigin[1];
parm[4] = vOrigin[2];

// Create the "banish" sprite
Create_TE_SPRITE( vOrigin, g_iSprites[SPR_BANISH], 10, 255 );

vOrigin[2] -= 2000;

set_user_origin( iAttacker, vOrigin );

set_task( 0.1, "_BM_BanishReturn", TASK_BANISH + iAttacker, parm, 5 );
}
}
}
}


Quote:

// Siphon Mana
iSkillLevel = SM_GetSkillLevel( iAttacker, SKILL_SIPHONMANA );
if ( iSkillLevel > 0 )
{

new iMoney = floatround( p_mana[iSkillLevel-1] * SHARED_GetUserMoney(iVictim) );

// Remove the money from the victim
SHARED_SetUserMoney( iVictim, SHARED_GetUserMoney( iVictim ) - iMoney, 1 );

// Give the money to the attacker
SHARED_SetUserMoney( iAttacker, SHARED_GetUserMoney( iAttacker ) + iMoney, 1 );

// Make the user glow!
SHARED_Glow( iVictim, 0, iDamage, 0, 0 );

// Create a screen fade (purplish)
Create_ScreenFade( iAttacker, (1<<10), (1<<10), (1<<12), 144, 58, 255, g_GlowLevel[iAttacker][1] );
}
}


Help me asap, and I will kiss you <3

wickedd 06-13-2012 11:12

Re: Help; WC3 new items
 
Post in the request section.


All times are GMT -4. The time now is 06:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.