Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-05-2007, 02:26 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
NPC Dialog System

I've been lazy with working on this system so I went ahead and fixed it up some, including correcting my constant spelling mistake all over the scripts with "responce" to "response". Anyhow, feel free to use this and improve upon it but there is one condition and that is that you MUST share any changes you make with anyone who requests it. If you can't follow that I'll just keep all my junk to myself from now on.

The file is zipped since I don't know the maximum number of separate files you can upload. Do your paranoid half a favor and always virus scan things from people you don't know, like myself. I scanned it with NOD32 but don't take my word for it

If you have questions or I forgot to add something, speak now.
Attached Files
File Type: zip Inverness - NPC Dialog System 1.0.zip (10.7 KB, 212 views)
__________________
Reply With Quote
  #2  
Old 04-05-2007, 02:31 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Oh, awesome. Been waiting for this Inver. I'll hit you up on Aeon later. <3

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  if (
this.scriptrocks)
  {
    
findPlayer("Inverness").rep++;
  }



E: Half the work for Stone Henge NPCs done. <3 Inver
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.

Last edited by killerogue; 04-05-2007 at 03:07 AM..
Reply With Quote
  #3  
Old 04-05-2007, 02:33 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Awesome Invern
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 04-05-2007, 02:41 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Fixed up the temp variable declarations in stdlib.
Attached Files
File Type: txt stdlib.txt (2.6 KB, 179 views)
__________________
Reply With Quote
  #5  
Old 04-05-2007, 02:44 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Some description and/or screenies would be nice
Reply With Quote
  #6  
Old 04-05-2007, 02:52 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
http://forums.graalonline.com/forums...=Dialog+System
__________________
Reply With Quote
  #7  
Old 04-05-2007, 04:13 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Nice job invern
Reply With Quote
  #8  
Old 04-05-2007, 06:58 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Nice Inver!
__________________
Reply With Quote
  #9  
Old 04-05-2007, 10:57 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Much thanks. Here is another little script I made after the waitfor() was implemented.
PHP Code:
public function showInputDialog(titlelabeldefvalwaittime) {
  
temp.out 0// Return data

  
new GuiWindowCtrl("InputDialog") {
    
this.profile "GuiWindowProfile";
    
this.extent = {240,115};
    
this.position = {
      (
screenwidth this.extent[0]) / 2,
      (
screenheight this.extent[1]) / 2
    
};
    
this.canMaximize false;
    
this.canMinimize false;
    
this.canResize false;
    
this.canClose false;
    
this.text title;
    
this.visible true;

    new 
GuiTextCtrl("InputDialog_Label") {
      
this.profile "GuiDarkRedTextProfile";
      
this.position = {3030};
      
this.text label;
    }
    new 
GuiTextEditCtrl("InputDialog_Field") {
      
this.profile "GuiTextEditProfile";
      
this.position = {1550};
      
this.extent = {21020};
      
this.text defval;
    }
    new 
GuiButtonCtrl("InputDialog_Button") {
      
this.profile "GuiButtonProfile";
      
this.position = {9075};
      
this.extent = {6025};
      
this.text "OK";
    }
    new 
GuiButtonCtrl("InputDialog_ButtonCancel") {
      
this.profile "GuiButtonProfile";
      
this.position = {16075};
      
this.extent = {6025};
      
this.text "Cancel";
    }
  }
  
InputDialog.bringToFront();
  if (
waitfor("InputDialog_Button","onAction",waittime) == true) {
    
out InputDialog_Field.text;
    
InputDialog.destroy();
    return 
out;
  }
  else {
    
InputDialog.destroy();
    return 
null;
  }
}
public function 
InputDialog_ButtonCancel.onAction() {
  
InputDialog_Field.text "";
  
InputDialog_Button.performclick();

__________________
Reply With Quote
  #10  
Old 04-05-2007, 11:03 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Looking good :]
__________________
Reply With Quote
  #11  
Old 04-05-2007, 11:34 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I kinda edited it on the fly when I was posting it so I hope I didn't break something :P

Anyhow its like the JOptionPane from Java, it shows an Input Dialog and the calling function will wait until you get input from the window. I made it for Aeon as a way to input drop quantities and archetype names.
__________________
Reply With Quote
  #12  
Old 04-05-2007, 11:59 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Hmm, in the dialog system you still has functions that were from your old mudlib, like findMudPlayer()
__________________
Reply With Quote
  #13  
Old 04-06-2007, 07:15 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Chompy View Post
Hmm, in the dialog system you still has functions that were from your old mudlib, like findMudPlayer()
I had findMudArchetype(), findMudPlayer(), and findMudContainer() in the stdlib but I removed them.

In the new system containers will be an interface of a MudObject and not a seperate object in itself.
__________________
Reply With Quote
  #14  
Old 04-06-2007, 11:57 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Very nice.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #15  
Old 04-06-2007, 03:14 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Inverness View Post
I had findMudArchetype(), findMudPlayer(), and findMudContainer() in the stdlib but I removed them.

In the new system containers will be an interface of a MudObject and not a seperate object in itself.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:41 AM.


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