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 05-18-2004, 02:17 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
showimg > timeout >< help !

Well i've been scripting a GUI and i've put a script into a timeout as follows
NPC Code:

//#CLIENTSIDE
if(created || timeout){
this.w = screenwidth/screenwidth;
this.h = screenheight/screenheight;
showstats 1024;

if (mousescreenx in |50,70| && mousescreeny in |0,30|) {
if(leftmousebutton){
hideimg 302;
showimg 309,#3,this.x+this.x+52,this.h+this.y+40;
changeimgvis 309,4;
}

}
showimg 302,#W,this.x+this.x+52,this.h+this.y+40;
changeimgvis 302,4;

timeout=0.05;
}


That isn't the whole script, but as you can see..
When you click in the x and y it is suppose to hide the image index of 302, but it dosn't :O

Any idea how I can do it?
any help would help
__________________
V$:CONFL16T
Reply With Quote
  #2  
Old 05-18-2004, 02:24 PM
EsCanavi EsCanavi is offline
No Longer Graalian.
EsCanavi's Avatar
Join Date: Oct 2003
Location: ..:: Lassomption/Quebec/Canada ]::...
Posts: 214
EsCanavi is on a distinguished road
Send a message via AIM to EsCanavi Send a message via MSN to EsCanavi
it cause you hide the img but you don't tell the script that you hided the img o.0'

NPC Code:


if (mousescreenx in |50,70| && mousescreeny in |0,30|) {
if(leftmousebutton){
set hided;





NPC Code:


if ( !hided ){
showasdf
}else show fdsa




i guess with that you could go trought
__________________
:: Free Gift... 40$ ::
:: WrsHosting ::
:: Need a webhost, contact me ( free ) 99.9% Online ::
Contact me: [email protected] (msn|mailbox)
Reply With Quote
  #3  
Old 05-18-2004, 04:30 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Ah I see, I get it. Thanks !!
I'll check it in 30 mins when i'm on my other comp !
I'll post if I have any problems
__________________
V$:CONFL16T
Reply With Quote
  #4  
Old 05-18-2004, 05:16 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by EsCanavi
NPC Code:
set hided;

Should it not be set this.hidden;?
Reply With Quote
  #5  
Old 05-18-2004, 05:16 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
I thought you had to post scripts in the global format thingy where instead of && you added another ( )'s...or something like that...>_>;
__________________
Reply With Quote
  #6  
Old 05-18-2004, 05:36 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Yes crono, but I havn't done that
And r0bins helping me over AIM
I'll see if he can figure it out, it's completely broken now
__________________
V$:CONFL16T
Reply With Quote
  #7  
Old 05-18-2004, 06:39 PM
EsCanavi EsCanavi is offline
No Longer Graalian.
EsCanavi's Avatar
Join Date: Oct 2003
Location: ..:: Lassomption/Quebec/Canada ]::...
Posts: 214
EsCanavi is on a distinguished road
Send a message via AIM to EsCanavi Send a message via MSN to EsCanavi
@loriel actualy it do the same but yeah could be 0.o
__________________
:: Free Gift... 40$ ::
:: WrsHosting ::
:: Need a webhost, contact me ( free ) 99.9% Online ::
Contact me: [email protected] (msn|mailbox)
Reply With Quote
  #8  
Old 05-18-2004, 07:38 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by WanDaMan
NPC Code:

this.w = screenwidth/screenwidth;
this.h = screenheight/screenheight;

Both variables will return 1, maybe change it and fix the positions properly?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #9  
Old 05-18-2004, 08:06 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
That isn't the problem Osrs, go on MSN AIM i'll send you the script :P
edit
could some one help me on this, i asked loriel over aim but he didn't seem to botherd
NPC Code:

//CLIENTSIDE
if(created || timeout){
if(leftmousebutton){
//NEXT WEAPON BIT HERE
}
}


When you click down on the NPC your weapons change to the next one in your inventory, i.e
i have the weapon 'bow' in use, if I click it the next weapon along 'bomb' would now be in use :o
(I don't want the whole script, but i'd like help on how to do it )
__________________
V$:CONFL16T
Reply With Quote
  #10  
Old 05-18-2004, 09:57 PM
DIABLO2099 DIABLO2099 is offline
Registered User
Join Date: Sep 2002
Location: New York
Posts: 290
DIABLO2099 is on a distinguished road
selectedweapon : the index of the selected weapon of the player

Just mess around with that and you should be fine.
__________________
-Former UnholyNation Server Manager.

Call me Xecutor.
Reply With Quote
  #11  
Old 05-19-2004, 09:14 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally Posted by DIABLO2099
selectedweapon : the index of the selected weapon of the player

Just mess around with that and you should be fine.
Could I do
selectedweapon+1;?
__________________
V$:CONFL16T
Reply With Quote
  #12  
Old 05-19-2004, 09:33 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by WanDaMan
could some one help me on this, i asked loriel over aim but he didn't seem to botherd
Sorry, but I have been sick, laying in bed since sunday, and by the time I saw your IM, you were already offline. Not that your question made much sense to me.

Do you just mean selectedweapon++?
Reply With Quote
  #13  
Old 05-19-2004, 09:34 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Not exactly, your bit sets a `globally' editable flag and other NPCs will eventually mess around with it.
Reply With Quote
  #14  
Old 05-19-2004, 01:57 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Howso loriel?

I'll try the selected weapon
__________________
V$:CONFL16T
Reply With Quote
  #15  
Old 05-19-2004, 04:25 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by WanDaMan
That isn't the problem Osrs, go on MSN AIM i'll send you the script :P
I know that is not the problem, i just told you to fix that other thing
I go over AIM later to give you an assistance, if you want.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
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 03:02 PM.


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