Graal Forums  

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

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-26-2004, 03:36 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Question Hiding gui

Ok here's the thing. This gui is scripted just fine, but if you try lowering the timeout or having something that disrypts tiomeout loops go, the gui either flashes or hides. There is nothing in it telling it to hide, so why does it? Please look over it. Note that it works fine if nothing disrupts the timeout loop, which says that the gui hides if it isnt constantly told to show for some reason.


PHP Code:
if (actionserverside) {
setstring clientr.#s(client.element)power,#s(server.#s(client.element)power);
setstring clientr.#s(client.element)size,#s(server.#s(client.element)size);
setstring clientr.#s(client.element)allies,#s(server.#s(client.element)allies);
setstring clientr.#s(client.element)enemies,#s(server.#s(client.element)enemies);




}
//#CLIENTSIDE
if (created||playerenters||keypressed) {triggeraction 0,0,serverside,-GUI;this.alpha=1;}
//NORMAL GUI//
while (isweapon) {
  
showstats 1024;
  
showimg 250,cythusgui.gif,0,0;
    
changeimgvis 250,6;
  
changeimgcolors 250,1,1,1,this.alpha;
  
showimg 251,@TimesRoman@@#s(client.hp) / #s(client.maxhp),38.5,10;
  
changeimgvis 251,7;
  
changeimgcolors 251,0,0,0,1;
  
changeimgzoom 251,.6;
showimg 252,@TimesRoman@@#v(playermp) / 100 ,36.4,25.9;
  
changeimgvis 252,8;
  
changeimgcolors 252,0,0,0,1;
  
changeimgzoom 252,.6;
showimg 253,#W,149,5;
  
changeimgpart 253,0,0,270,160;
  
changeimgvis 253,7;
showtext 254,63,82,verdana,l,#w;
  
changeimgvis 254,8;
  
changeimgcolors 254,.1,.1,.1,1;
  
changeimgzoom 254,.55;
showimg 255,@TimesRoman@@#v(strtofloat(#s(client.tokens))),38.5,40.3;
  
changeimgvis 255,8;
  
changeimgcolors 255,.1,.1,.1,1;
  
changeimgzoom 255,.6;
showtext 259,5.4,55.3,verdana,b,Exp:   #v(strtofloat(#s(client.playerexp)));
  
changeimgvis 259,9;
  
changeimgcolors 259,0,0,0,1;
  
changeimgzoom 259,.6;
showtext 301,6,67.1,arial,bPwr#v(strtofloat(#s(client.playerpower)));
  
changeimgvis 301,9;
  
changeimgcolors 301,0,0,0,1;
  
changeimgzoom 301,.65;
showtext 8675309,79,115,timesRoman,c,x  #v(playerrupees);
changeimgvis 8675309,8;
  
changeimgcolors 8675309,0,1,0,1;
  
changeimgzoom 8675309,.9;
  
showimg 86753010,greenrupee.png,20,105;
  
changeimgvis 86753010,8;
showpoly 79999,{148,5,193,5};
  
changeimgcolors 79999,0,0,0,1;
  
changeimgvis 79999,14;
showpoly 79998,{148,5,148,45};
  
changeimgcolors 79998,0,0,0,1;
  
changeimgvis 79998,15;
showpoly 79997,{148,45,193,45};
  
changeimgcolors 79997,0,0,0,1;
  
changeimgvis 79997,16;
showpoly 79996,{193,5,193,45};
  
changeimgcolors 79996,0,0,0,1;
  
changeimgvis 79996,17;
showimg 79995,@Verdana@@Drop,160,52;
  
changeimgvis 79995,18;
  
changeimgcolors 79995,0,0,0,1;
  
changeimgzoom 79995,.5;
//bleh//
//Kingdom info//

showpoly 9999,{screenwidth-110,screenheight*0,screenwidth-1,screenheight*0,screenwidth-1,(screenheight*0)+100,screenwidth-110,(screenheight*0)+100};
changeimgvis 9999,4;
changeimgcolors 9999,.5,.5,.5,this.alpha;
showpoly 9998,{screenwidth-105,(screenheight-=1)+5,screenwidth-6,(screenheight-=1)+5,screenwidth-6,(screenheight-=1)+95,screenwidth-105,(screenheight-=1)+95};
changeimgvis 9998,6;
changeimgcolors 9998,.6,.6,.6,this.alpha;
showpoly 10009,{screenwidth-107.5,(screenheight-=1)+3,screenwidth-3.5,(screenheight-=1)+3,screenwidth-3.5,(screenheight-=1)+97.5,screenwidth-107.5,(screenheight-=1)+97.5};
changeimgvis 10009,5;
changeimgcolors 10009,.55,.55,.55,this.alpha;
showtext 9997,screenwidth-104,15,Verdana,l,Your Kingdom:#s(client.element);
changeimgvis 9997,7;
changeimgcolors 9997,0,0,0,this.alpha;
changeimgzoom 9997,.5;
showtext 9996,screenwidth-104,25,Verdana,l,Kingdom Power:#s(clientr.#s(client.element)power);
changeimgvis 9996,7;
changeimgcolors 9996,0,0,0,this.alpha;
changeimgzoom 9996,.5;
showtext 9995,screenwidth-104,35,Verdana,l,Kingdom Size:#s(clientr.#s(client.element)size);
changeimgvis 9995,7;
changeimgcolors 9995,0,0,0,this.alpha;
changeimgzoom 9995,.5;
showtext 9994,screenwidth-55,50,Verdana,c,=Allies=;
changeimgvis 9994,7;
changeimgcolors 9994,0,0,0,this.alpha;
changeimgzoom 9994,.5;
showtext 9993,screenwidth-55,60,Verdana,c,#s(clientr.#s(client.element)allies);
changeimgvis 9993,7;
changeimgcolors 9993,0,0,0,this.alpha;
changeimgzoom 9993,.5;
showtext 9992,screenwidth-55,70,Verdana,c,=Enemies=;
changeimgvis 9992,7;
changeimgcolors 9992,0,0,0,this.alpha;
changeimgzoom 9992,.5;
showtext 9991,screenwidth-55,80,Verdana,c,#s(clientr.#s(client.element)enemies);
changeimgvis 9991,7;
changeimgcolors 9991,0,0,0,this.alpha;
changeimgzoom 9991,.5;

//blah//
sleep .05;



__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!

Last edited by falco10291029; 09-27-2004 at 02:24 AM..
  #2  
Old 09-26-2004, 10:34 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
I don't see problems in the concent, but in the implementation:
Bad is the usage of

screenheight-=1

That will cause problems for the compiler, I guess you meant "screenheight - 1" ?
The "triggeraction 0,0,serverside,-GUI;" should be moved outside the timeout so
that it doesn't lag the game, e.g. if (playerenters) triggeraction 0,0,serverside,-GUI;
  #3  
Old 09-27-2004, 01:44 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
thx i will try both of those real quick
EDIT:didnt work, updated script
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
  #4  
Old 09-27-2004, 01:54 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
il try that now i geuss....

EDIT: that didnt work either, updating code real quick
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
  #5  
Old 09-27-2004, 02:22 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Advice 1: Do not listen to clueless UN managers
Advice 2: Strip your code to the bare essentials before posting it. Nobody wants to scan through pages of unrelated lines.
Advice 3: Don't just set the alpha to 0 in order to hide something.
__________________
  #6  
Old 09-27-2004, 07:42 AM
NeoJenova NeoJenova is offline
my name isn't bold, HA!
NeoJenova's Avatar
Join Date: Jun 2003
Location: 0H10
Posts: 668
NeoJenova will become famous soon enough
Send a message via AIM to NeoJenova Send a message via Yahoo to NeoJenova
Quote:
Originally Posted by Kaimetsu
Advice 1: Do not listen to clueless UN managers
Quote:
Originally Posted by Slash-P2P
Amen to Kai's Advice 1.
Quote:
Originally Posted by falco10291029
1. *****
__________________
[helpfulthreads] | advertising
[server] | unholynation

  #7  
Old 09-27-2004, 10:30 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 Kaimetsu
Advice 1: Do not listen to clueless UN managers
Advice 2: Strip your code to the bare essentials before posting it. Nobody wants to scan through pages of unrelated lines.
Advice 3: Don't just set the alpha to 0 in order to hide something.
Advice 4: Put some effort into understanding what you are doing, instead of asking for help and then closing your eyes until your script works.


Once you have succeeded, contact a mod to have this reopened, if neccessary.
  #8  
Old 09-27-2004, 02:25 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
I suggest since a lot of your changeimgzooms and changeimgvis's are alike, use a for () { to make them do that. another suggestion is put all your showtexts in 1 spot so it's easier to read.

Amen to Kai's Advice 1.
  #9  
Old 09-27-2004, 02:25 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
1. *****
2. I have no idea whats causing the problem so it culd be anywhere
3. make me!

Edit: I would use a for loop but i dont feel like changing around a bunch of numbers to do that, i didnt make all of this script and dont want to change a bunch of things.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
  #10  
Old 09-27-2004, 02:28 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by falco10291029
2. I have no idea whats causing the problem so it culd be anywhere
So gradually cut stuff out and see if the problem persists.
__________________
  #11  
Old 09-27-2004, 02:29 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by falco10291029
Edit: I would use a for loop but i dont feel like changing around a bunch of numbers to do that, i didnt make all of this script and dont want to change a bunch of things.
It doesn't work. Wouldn't that mean you have to change a bunch of things?
  #12  
Old 09-27-2004, 02:47 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
no, it doesnt.....
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
  #13  
Old 09-27-2004, 02:54 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
Ive noticed that sometimes showimgs on layer 4 (and possibly up, not sure) will hide when playerhearts is changed by something such as a bed.
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

  #14  
Old 09-27-2004, 02:57 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
i dont use playerhearts at all.......
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
  #15  
Old 09-27-2004, 03:30 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
You request help but you ignore the advice and suggestions of those who contribute? You are fortunate that I am no longer a moderator here.
__________________
Closed Thread


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 06:28 PM.


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