Scripting School
Would you like to react to this message? Create an account in a few clicks or log in to continue.

New to scripting? We want you!

Official Ventrilo: Host:Apollo.MaxFrag.net Port:3840
TestBed needs our help! Please donate a few dollars to keep it running here!
Have you mastered a specific part of GS2? Create a guide and help others!

You are not connected. Please login or register

Assignment 2 - Astram

2 posters

Go down  Message [Page 1 of 1]

1Assignment 2 - Astram Empty Assignment 2 - Astram Wed May 11, 2011 5:34 pm

Astram



Code:

for (i = 0; i < passedeffects.tokenize(",").size(); i ++)
  {
  temp.effect = passedeffects.tokenize(",")[i].tokenize(":");
  temp.effectroll = random(0,100);
  if(effectroll <= effect[0] && effect[1] == "cause")
    {
    BuffSystem.addbuff(effect[2],effect[3],effect[4],effect[5],effect[6]);
  }
}

Grab for classic or gold hat.
[/code]
//#CLIENTSIDE
function onCreated()
{
this.chat = "Grab Me!";
}
function onActionGrab()
{
if (player.upgradestatus == "Classic")
{
player.attr[1] == "hat2.png";
}
if (player.upgradestatus == "Gold")
{
player.attr[1] == "hat13.png";
}
if (player.upgradestatus != "Gold" && player.upgradestatus == "Classic")
{
player.chat == "HAHA YOUR A NAME U STUPID TRIAL!";
}
}
[/code]
Thats all im going to do for now. Ill wait untill this gets harder...c monkey

2Assignment 2 - Astram Empty Re: Assignment 2 - Astram Thu May 12, 2011 7:11 pm

Kavan



Is onActionGrab() an actual event?
I've never seen it listed anywhere as a functional event, and it's only worked for me a couple of times, and I could never understand why.

Back to top  Message [Page 1 of 1]

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