Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-20-2002, 08:23 PM
XeroMaster XeroMaster is offline
Registered User
Join Date: Dec 2001
Location: Washington-=USA=-
Posts: 143
XeroMaster is on a distinguished road
Send a message via AIM to XeroMaster Send a message via Yahoo to XeroMaster
PLEASE help me fix this

!*this is NOT my work*!

I got this script from some one--but it does not work,
anyone know why?

NPC Code:
 

if (playerenters&&!(hasweapon(Menuthing)))
{toweapons Menuthing;}
//#CLIENTSIDE
if (created)
{setstring client. menuthingoptions,Option1,Option2,Option3,Option4,O
ption5,Exit;timeout=0.05;}
if(timeout&&!(hasweapon(Menuthing))){
if (this.showmenu==1)
{CheckKeys();for(this.i=0;this.i<sarraylen(client. menuthingoptions);this.i++)
{if(this.optionselected==this.i)
showimg 1000+this.i,@@i@#I(client.menuthingoptions,this.i) ,0,24*this.i;
else
showimg 1000+this.i,@#I(client.menuthingoptions),0,24*this .i;}
for (this.i=1;this.i<4;this.i+=2)
if (this.keydown[this.i]==true&&this.oldkeydown[this.i]==false)
{this.optionselected=(this.optionselected+vecy(thi s.i))
%sarraylen(client.menuthingoptions);}
for (this.i=4;this.i<7;this.i++)
if (this.keydown[this.i]==true&&this.oldkeydown[this.i]==false)
{this.temp=0; if (this.optionselected==5)
{this.temp=1; this.showmenu=0;}
if (this.temp==1)break;}}
else
for (this.i=0;this.i<sarraylen(client.menuthingoptions );this.i++)
hideimg 1000+this.i; timeout=0.05;}
if (weaponfired)
{setarray this.keydown,10; setarray this.oldkeydown,10;
this.showmenu=1;CheckKeys();}
function CheckKeys()
{for (this.i=0;this.i<10;this.i++)
{this.oldkeydown[this.i]=this.keydown[this.i];
this.keydown[this.i]=keydown(this.i);}}



PLEASE help
__________________
OUT OF MY MIND!
BACK IN 5 MIN.
AIM=Da First Bug
[email protected]
Reply With Quote
  #2  
Old 01-20-2002, 10:57 PM
Mrmicro Mrmicro is offline
Registered User
Join Date: Mar 2001
Posts: 128
Mrmicro is on a distinguished road
Send a message via AIM to Mrmicro
this would be something for the NPC server topic?
__________________
Reply With Quote
  #3  
Old 01-21-2002, 02:56 AM
XeroMaster XeroMaster is offline
Registered User
Join Date: Dec 2001
Location: Washington-=USA=-
Posts: 143
XeroMaster is on a distinguished road
Send a message via AIM to XeroMaster Send a message via Yahoo to XeroMaster
No.....

this is a SCRIPT!
in SCRIPTING!!!!
can anyone help?
__________________
OUT OF MY MIND!
BACK IN 5 MIN.
AIM=Da First Bug
[email protected]
Reply With Quote
  #4  
Old 01-21-2002, 03:39 AM
Sennema Sennema is offline
Registered User
Join Date: Nov 2001
Location: Ontario, Canada
Posts: 132
Sennema is on a distinguished road
Send a message via ICQ to Sennema Send a message via AIM to Sennema
Re: PLEASE help me fix this

Quote:
Originally posted by XeroMaster
!*this is NOT my work*!

I got this script from some one--but it does not work,
anyone know why?

NPC Code:
 

if (playerenters&&!(hasweapon(Menuthing)))
{toweapons Menuthing;}
//#CLIENTSIDE
if (created)
{setstring client.
menuthingoptions,Option1,Option2,Option3,Option4,O
ption5,Exit;timeout=0.05;}
if(timeout&&!(hasweapon(Menuthing))){
if (this.showmenu==1)
{CheckKeys();for(this.i=0;this.i<sarraylen(client. menuthingoptions);this.i++)
{if(this.optionselected==this.i)
showimg 1000+this.i,@@i@#I(client.menuthingoptions,this.i) ,0,24*this.i;
else
showimg 1000+this.i,@#I(client.menuthingoptions),0,24*this .i;}
for (this.i=1;this.i<4;this.i+=2)
if (this.keydown[this.i]==true&&this.oldkeydown[this.i]==false)
{this.optionselected=(this.optionselected+vecy(thi s.i))
%sarraylen(client.menuthingoptions);}
for (this.i=4;this.i<7;this.i++)
if (this.keydown[this.i]==true&&this.oldkeydown[this.i]==false)
{this.temp=0; if (this.optionselected==5)
{this.temp=1; this.showmenu=0;}
if (this.temp==1)break;}}
else
for (this.i=0;this.i<sarraylen(client.menuthingoptions );this.i++)
hideimg 1000+this.i; timeout=0.05;}
if (weaponfired)
{setarray this.keydown,10; setarray this.oldkeydown,10;
this.showmenu=1;CheckKeys();}
function CheckKeys()
{for (this.i=0;this.i<10;this.i++)
{this.oldkeydown[this.i]=this.keydown[this.i];
this.keydown[this.i]=keydown(this.i);}}



PLEASE help
Try getting rid of all the spaces. (ex: client. menuthing should be client.menuthing). Other than that, I'm totally lost by NPC-Server Scripts. The clientside/serverside stuff confuses me.
__________________
~Draemus Windblade


Just over 90% of all messages have no point or meaning.

"In order to preserve ourselves we seek out and eliminate anything that may do use harm. In doing so, we destroy things that, though possibly hazzardous, may be important to survival. So you see, in trying to save ourselves, we ultimately bring about our own destruction"


Luminar
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.