gump display on npc dblclick

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

gump display on npc dblclick

Post by dragon slayer »

Here is what I'm trying to do

Code: Select all

function onCharDoubleClick( pUser, targChar )
{
    var ret=displaygump(srcSock, pUser);
}

function displaygump(srcSock, pUser) 
{ 
  // Make a noise as the gump opens 
  pUser.SoundEffect( 0x58, false ); 

  var myGump = new Gump; 

  // add a background 
  myGump.AddPage(1);  //Page 1 Felucca 
  myGump.AddBackground(20, 20, 260, 245, 0x23f0); 
  myGump.AddText( 40, 40, 0, "Test:" ); 
  //Cancel Button 
  myGump.AddButton( 47, 207, 0xfa5, 1, 0, 0 ); 
  myGump.AddText( 80, 210, 0, "CANCEL" ); 

  myGump.Send( srcSock ); 
}
I want to make it so when i double click a npc my gump pops up
This just a scrap gump from the moongate some code from two differant scripts

basicly once i get it so gump will pop up on double click of the npc i can start working ona much better gump
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

You might need a "return false;" (or "return true;" hehe) at the end of your onCharDoubleClick.
-= Ho Eyo He Hum =-
Post Reply