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 11-30-2009, 04:38 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
Exclamation GUI Problem ...


i got this problem
(nothing in he GUI show's :S

the script was found in code gallery http://forums.graalonline.com/forums...64#post1541364

and i thinnk that its not working becous i hawnt Fixed this jet (//Replace the £ with the percentage sign)

but i hawnt done that becous i dont even know what percentage sign is

so can someone help me



here's the script that's in the link above (its images in the link that was used in script ...

---------------------------------------------------------------------------------------------

PHP Code:
//#CLIENTSIDE
function onCreated() {
    
//How many bars there are... [in order]
  
if (client.hud_barsactive == null) {
    
client.hud_barsorder = {"hp""armor""weapon""money""time"};
    
client.hud_barsactive = {11111};
    
client.inv_trans 1;
  }
  
this.onDisplay();
}

function 
onDisplay() {
  
temp.ix 5;
  
temp.iy 5;
  
  
hideimgs(200300);
  
this.buttons = {};
  for (
temp.0temp.client.hud_barsorder.size(); temp.i++) {   
    
temp.active getRowByID(i);
    
    
temp.img showimg(201 i"era_gui_line2.png"ixiy + (16));
    
temp.img.layer 4;
    
temp.img.partx 0temp.img.party 0;
    
temp.img.partw = (active11213); temp.img.parth 16;
    
temp.img.alpha 1;    

    if (
active) {
      
this.("onDraw" getNameByID(i))({ixiy + (16)});
      
this.buttons.add({i, {ix 12iy + (16)}, {11212}, "row"}); 
    }
    
    
temp.text = (active"-":"+");
    
temp.img showtext(210 iix 4iy + (16), "Arial""b"temp.text);
    
temp.img.layer 4;
    
temp.img.zoom = (active0.75:0.7);
    
    
this.buttons.add({i, {ixiy + (16)}, {1616}});
  }
}

function 
drawBars(bar) {
  
temp.img showimg(bar[0], "era_gui_hpbars.png"bar[1][0], bar[1][1]);
  
temp.img.layer 5;
  
temp.img.partw 66temp.img.parth 10
  
  
temp.img showimg(bar[0] + 1"era_gui_hpbars.png"bar[1][0], bar[1][1]);
  
temp.img.layer 6;
  
temp.img.partw bar[2][0]; temp.img.parth 10;
  
temp.img.party bar[2][1];
}

function 
onDrawHP(pos) {
  
temp.img showtext(230temp.pos[0] + 43temp.pos[1] + 1"Arial""b""HP:" max(0clientr.hp) @ "/" clientr.hpmax);
  
temp.img.layer 7temp.img.zoom 0.6;
  
temp.img.alpha 0.6;

  
temp.img showimg(231"era_gui_symbols.png"temp.pos[0] + 15temp.pos[1] + 1); 
  
temp.img.layer 6;  temp.img.partx = (level.nopkzone160);
  
temp.img.partw 16temp.img.parth 16;
 
  
this.drawBars({232, {pos[0] + 35pos[1] + 3}, {max(1roundTo((clientr.hp clientr.hpmax) * 6610)), 10}});
}

function 
onDrawArmor(pos) {
  
temp.img showtext(240temp.pos[0] + 43temp.pos[1] + 1"Arial""b""Armor:" max(0clientr.armor) @ "/" max(0clientr.armormax));
  
temp.img.layer 7temp.img.zoom 0.6;
  
temp.img.alpha 0.6;

  
temp.img showimg(241"era_gui_symbols.png"temp.pos[0] + 15temp.pos[1] + 1); 
  
temp.img.layer 26;  temp.img.partx 32;
  
temp.img.partw 16temp.img.parth 16;

  
this.drawBars({242, {pos[0] + 35pos[1] + 3}, {max(1roundTo((clientr.armor clientr.armormax) * 6610)), 40}});
}

function 
onDrawMoney(pos) {
  
temp.img showtext(250temp.pos[0] + 43temp.pos[1] + 1"Arial""b""$" player.rupees);
  
temp.img.layer 7temp.img.zoom 0.6;
  
temp.img.alpha 0.6;

  
temp.img showimg(251"era_gui_symbols.png"temp.pos[0] + 15temp.pos[1] + 1); 
  
temp.img.layer 26;  temp.img.partx 64;
  
temp.img.partw 16temp.img.parth 16;
}

function 
onDrawTime(pos) {
  if (!
getRowByName("time")) return false;

  
temp.cHours int(hours);
  if (
cHours >= 12cHours -= 12;
  if (
cHours == 0cHours 12;

  
//Replace the £ with the percentage sign
  
temp.cTime int(cHours 10) @ int(cHours £ 10) @ ":" int(mins 10) @ int(mins £ 10);
  
  
cTime cTime SPC (hours >= 12"PM":"AM");

  
temp.img showtext(260temp.pos[0] + 43temp.pos[1] + 1"Arial""b"cTime);
  
temp.img.layer 7temp.img.zoom 0.6;
  
temp.img.alpha 0.6;

  
temp.img showimg(261"era_gui_symbols.png"temp.pos[0] + 15temp.pos[1] + 1); 
  
temp.img.layer 26;  temp.img.partx 48;
  
temp.img.partw 16temp.img.parth 16;
  
  
cancelevents("DrawTime");
  
scheduleevent(3"DrawTime", {temp.pos});
}

function 
onDrawWeapon(pos) {
  
temp.img showimg(270"era_gui_symbols.png"temp.pos[0] + 15temp.pos[1] + 1); 
  
temp.img.layer 26;  temp.img.partx 80;
  
temp.img.partw 16temp.img.parth 16;
}

function 
onMouseDown(click) {
  if (!(
temp.click in {"right""left"})) return false;
  
  
temp.= {mousescreenxmousescreeny};
  for (
temp.ithis.buttons) {
    if (
m[0in |i[1][0], i[1][0] + i[2][0]| && m[1in |i[1][1], i[1][1] + i[2][1]|) {
      if (
click == "right") {
        
client.inv_trans -= 0.2;
        if (
client.inv_trans 0client.inv_trans 1
        
this.onDisplay();
        break;
      }
      if (
i[3] == null) {
        
this.onToggleRow(i[0]);
        
this.onDisplay();
        break;
      } else {
        if (
mousebuttons 0) {
          
this.data i;
          
setTimer(0.05);
        }
      }
    }
  }
}

function 
onTimeout() {
  
temp.this.data;
  if (
mousescreeny in |i[1][1] + i[2][1], i[1][1] + (i[2][1] * 2)|) {
    if (
i[0] == (client.hud_barsorder.size() - 1)) return false;
            
    
temp.index client.hud_barsorder.index(getNameByID(i[0]));
    
temp.data client.hud_barsorder[temp.index 1];
            
    
temp.copy client.hud_barsorder;
    
temp.copy.replace(indexdata);
    
temp.copy.replace(index 1getNameByID(i[0]));
    
client.hud_barsorder temp.copy;
            
    
this.data = {i[0] + 1, {i[1][0], i[1][1] + 16}, {11212}, "row"};
    
this.onDisplay();
  }
   else 
  if (
mousescreeny in |i[1][1] - (i[2][1] + 12), i[1][1] - i[2][1]|) {
    if (
i[0] == 0) return false;
            
    
temp.index client.hud_barsorder.index(getNameByID(i[0]));
    
temp.data client.hud_barsorder[temp.index-1];
           
    
temp.copy client.hud_barsorder;
    
temp.copy.replace(indexdata);
    
temp.copy.replace(index 1getNameByID(i[0]));
    
client.hud_barsorder temp.copy;

    
this.data = {i[0] - 1, {i[1][0], i[1][1] - 16}, {11212}, "row"};            
    
this.onDisplay();
  }
  if (
mousebuttons 0setTimer(0.05);
}

function 
onToggleRow(flag) {
  
client.hud_barsactive[temp.flag] = !client.hud_barsactive[temp.flag];
}

function 
getRowByName(flag) {
  return 
client.hud_barsactive[client.hud_barsorder.index(temp.flag)];
}

function 
getRowByID(flag) {
  return 
client.hud_barsactive[temp.flag];
}

function 
getNameByID(flag) {
  return 
client.hud_barsorder[temp.flag];
}

function 
roundTo(valplace) {
  return 
int(temp.val temp.place 0.5) * temp.place;
}

function 
onUpdateVariable(temp.varName) {
  if (!(
varName in {"hp""hpmax""armor""armormax"}))
    return 
false;
    
  
this.onCreated();



help plz
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
Reply With Quote
  #2  
Old 11-30-2009, 04:40 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
i will Make my own Image's for this Script if this Scrip works !
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
Reply With Quote
  #3  
Old 11-30-2009, 04:52 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
See attached for the percent sign.

I really wish they would get rid of that protection, and just keep the forum software up to date.. or provide a bbcode or something.
Attached Thumbnails
Click image for larger version

Name:	percentsign.png
Views:	146
Size:	3.7 KB
ID:	49944  
__________________
Quote:
Reply With Quote
  #4  
Old 11-30-2009, 05:47 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
Thanks !
it works !
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
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 09:45 AM.


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