gaming for fun
Would you like to react to this message? Create an account in a few clicks or log in to continue.

An lille bit of coding :D

4 posters

Go down

An lille bit of coding :D Empty An lille bit of coding :D

Post  liinuus Sun Jan 02, 2011 10:05 pm

if some of u fell like learning how to code or is having trouble with one of your codes, then you can post it here and ill try to help Very Happy (so far i think its only me and Pedak that have done some codings but i might be wrong), atleast heres an small skill code of an beam so that ull get something to figgure on,

public Roar_Of_Time(id, skill, prop)
{
new level = SkillLevel(id, skill);
new Float:f_origin[3], Float:f_aimvec[3];
new victim = PokeSkillTarget(id);

get_user_origin(id, origin[id]);
get_user_origin(id, aim[id], 2);
IVecFVec(origin[id], f_origin);
IVecFVec(aim[id], f_aimvec);

skillLinedamage(id, f_origin, f_aimvec, level/3, level, skill, _, STATUS_POISON, -1);
origin[id][2] -= 5;
MakeLine(0,origin[id],aim[id],SPRITE_INDEX[SPR_ARBOK],1,1,1,10+level,0,200,50,80,185,0);

poke_sound(id,CHAN_VOICE, SND_HIT);
screenflash(victim, 128, 50, 128, 300, FLASH_TIME)

if( end_rep_use(id, skill, 2.0) )
return SKILL_USED;

return SKILL_READY;
}

liinuus
Admin

Posts : 180
Join date : 2011-01-02

http://www.gamin4fun.tk

Back to top Go down

An lille bit of coding :D Empty Re: An lille bit of coding :D

Post  Heatmanofurioso Thu Feb 10, 2011 9:34 pm

Alright m8, gona start studying that, and learning how to make my own xD
Heatmanofurioso
Heatmanofurioso

Posts : 134
Join date : 2011-02-10
Age : 30
Location : Portugal

Back to top Go down

An lille bit of coding :D Empty Re: An lille bit of coding :D

Post  liinuus Thu Feb 10, 2011 10:01 pm

Okay then ima break down that skill for ya:

first thing that starts skill:
Code:

//these signs make the compiler not read this line. This starts the skill
public Roar_Of_Time(id, skill, prop)
{
//gets users level
new level = SkillLevel(id, skill);
new Float:f_origin[3], Float:f_aimvec[3];
//those that beams his = victim
new victim = PokeSkillTarget(id);

//get were user is and were he is aiming
get_user_origin(id, origin[id]);
get_user_origin(id, aim[id], 2);
IVecFVec(origin[id], f_origin);
IVecFVec(aim[id], f_aimvec);

//this is the acctual beam damage. the damage is level/3 so in lvl 99 one beam will do 33 dmg and //apply poison
skillLinedamage(id, f_origin, f_aimvec, level/3, level, skill, _, STATUS_POISON, -1);
//move the origin an bit up so that beam dsnt start at ur feat
origin[id][2] -= 5;
//make the acctual beam line with spr_arbok as sprite. Starts at user and stops were he aims
MakeLine(0,origin[id],aim[id],SPRITE_INDEX[SPR_ARBOK],1,1,1,10+level,0,200,50,80,185,0);

//wudnt be cool without an sound
poke_sound(id,CHAN_VOICE, SND_HIT);
//make the victims screen flash for more cool effect
screenflash(victim, 128, 50, 128, 300, FLASH_TIME)

//make this repeat 20 times (so 20 beams)
if( end_rep_use(id, skill, 2.0) )
//return that the skill has been used and is ready to get cooldown
return SKILL_USED;
//just so that skill will restart later
return SKILL_READY;
//the } ends the script({ starts } ends)
}

liinuus
Admin

Posts : 180
Join date : 2011-01-02

http://www.gamin4fun.tk

Back to top Go down

An lille bit of coding :D Empty Re: An lille bit of coding :D

Post  <--Nobody--> Wed May 11, 2011 6:24 pm

Could you also post a skill whit a ball, like the skill "ice ball" ?

<--Nobody-->

Posts : 27
Join date : 2011-01-15

Back to top Go down

An lille bit of coding :D Empty Re: An lille bit of coding :D

Post  lolz owned Thu May 12, 2011 11:01 pm

if you can code good and that stuff cant you like make an amazing 1 that can like dmg 200000???

lolz owned

Posts : 8
Join date : 2011-04-18

Back to top Go down

An lille bit of coding :D Empty Re: An lille bit of coding :D

Post  Heatmanofurioso Fri May 13, 2011 2:50 am

anny skill can damage that.. you just need to set the damage, but we aint doing that
Heatmanofurioso
Heatmanofurioso

Posts : 134
Join date : 2011-02-10
Age : 30
Location : Portugal

Back to top Go down

An lille bit of coding :D Empty Re: An lille bit of coding :D

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum