Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2007, 01:14 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
mousescreenx question

Ok i am just making a simple thing where if the mouse goes over the npc it shows the name and this is what i got. I don't understand why you have two x's and two y's.
PHP Code:
function onActionServerside() {
  
setstring this.item,"Onion Rings",food,james-onionrings.gif,"f""f""f",20,1;
  
setstring this.itemtype,food;
  
setstring this.guild,Burger Shack;
  
this.price=8;
}
//#CLIENTSIDE
function onCreated (){
  
setstring this.item,"Onion Rings",food,james-onionrings.gif,"f""f""f",20,1;
}
    if (
mousescreenx in |47,10|){

      if (
mousescreeny in |11,158|){

        
showtext 220,mousescreenx+5,mousescreeny-10,Tempus Sans ITC,b,Inventory;

        
changeimgvis 220,7;

        
changeimgzoom 220,.5;

}



__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #2  
Old 06-10-2007, 01:16 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I misread....
Anyways, I don't exactly get your question? Two x and y's? Do you mean in |x1,x2|? Then that's because you're checking if the mousescreen x is greater than the first check, but lesser than the second check.
Reply With Quote
  #3  
Old 06-10-2007, 01:20 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Quote:
Originally Posted by DustyPorViva View Post
I misread....
Anyways, I don't exactly get your question? Two x and y's? Do you mean in |x1,x2|? Then that's because you're checking if the mousescreen x is greater than the first check, but lesser than the second check.
Well my question is how would i get the test to show up? It won't show up for me. I have the script in a level.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #4  
Old 06-10-2007, 02:01 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
PHP Code:
//#CLIENTSIDE
function onCreated (){
  
this.item = {"Onion Rings""food""james-onionrings.gif""?"201};
  
setTimer(0.05);
}
function 
onTimeout()
{
    if (
mousescreenx in |10,47|){

      if (
mousescreeny in |11,158|){

        
showtext 220,mousescreenx+5,mousescreeny-10,Tempus Sans ITC,b,Inventory;

        
changeimgvis 220,7;

        
changeimgzoom 220,.5;
        
setTimer(0.05);

}


Re-arranged some stuff, not even sure that will work though. The script was coded very poorly.
Reply With Quote
  #5  
Old 06-10-2007, 02:26 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
You're missing a bracket on the end, three {'s, and two }'s.
Reply With Quote
  #6  
Old 06-10-2007, 02:50 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Lol twinny helped me figure it out = ) i was using mousescreenx and thats for gui co-ords.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
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 11:56 AM.


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