Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Right Click Player menu (https://forums.graalonline.com/forums/showthread.php?t=31584)

adam 06-14-2002 08:39 AM

Right Click Player menu
 
1 Attachment(s)
Done and Done


Not hard to script.

Only hard to make it short.

I think I failed.

If you think you are up to making it shorter. PM me maybe I'll send you the script. It has a few hundred functions in it. *exaggerating*

LilNiglet 06-14-2002 09:38 AM

Re: Right Click Player menu
 
Quote:

Originally posted by adam
Done and Done


Not hard to script.

Only hard to make it short.

I think I failed.

If you think you are up to making it shorter. PM me maybe I'll send you the script. It has a few hundred functions in it. *exaggerating*

Nice! Could be a good admin tool. :]

Falcor 06-14-2002 09:56 AM

Very easy to make short.... especially if you are doing it on an NPCs server

adam 06-14-2002 11:37 AM

Quote:

Originally posted by Falcor
Very easy to make short.... especially if you are doing it on an NPCs server
I wouldn't mind knowing how.

Mine is rather long compared to most of my scrips.


This is for a non- NPC Server server though. Becouse I am not friends with the owners of any NPC Server servers..

adam 06-15-2002 02:10 AM

Ok I managed to make it dynamic and 80% shorter. hehe

HisDog 06-15-2002 10:45 AM

wow, hey can ya send it to me too?

Saga2001 06-15-2002 12:23 PM

hahaha,
I wrote that same thing in like 4 mins.
It looks like precicely like mine, fun to script...

HisDog 06-15-2002 12:30 PM

i have no clue on how to script at all!

adam 06-15-2002 12:31 PM

Quote:

Originally posted by Saga2001
hahaha,
I wrote that same thing in like 4 mins.
It looks like precicely like mine, fun to script...


Good for j00.

I managed to get it up and running on Doomsday cuz I know da owner from back when.

Nice short easy to add buttons to and use for other things.

Few bugs though.


doesn't hurt that I showed you my script and you saw how I did it.

LilNiglet 06-15-2002 08:10 PM

Quote:

Originally posted by adam



Good for j00.

I managed to get it up and running on Doomsday cuz I know da owner from back when.

Nice short easy to add buttons to and use for other things.

Few bugs though.


doesn't hurt that I showed you my script and you saw how I did it.

If you don't mind, can I look at it? I want to look at a few things... and how did you disable the player profile?

Dark-Dragoon 06-15-2002 09:58 PM

I wouldnt mind taking a look. Must be a mighty fancy script.

adam 06-15-2002 11:15 PM

Quote:

Originally posted by LilNiglet


If you don't mind, can I look at it? I want to look at a few things... and how did you disable the player profile?


I didn't disable the player profile
I changed it ot a left click menu.

LilNiglet 06-16-2002 12:01 AM

Quote:

Originally posted by adam



I didn't disable the player profile
I changed it ot a left click menu.

Ah :x

Will you release it publicly? Or no?

adam 06-16-2002 04:01 AM

Quote:

Originally posted by LilNiglet


Ah :x

Will you release it publicly? Or no?


We'll see. :)

I just rescripted it entirely a 3rd time.

Now to add menu buttons you add the name of a weapon to a server string.

If you have the weapon in the server string it displays a button for it.

Then when you click it's button it sends the event actionMenu to that npc weapon

also sets an index string with the index of the player you clicked on

from then on you should have you you need to make any weapon requiring a click hehehe

adam 06-16-2002 12:28 PM

I think I understand how the good scripters feel now. haha


pm's asking for scripts and help.

all the time. aol messages :)

fun fun

HisDog 06-17-2002 01:05 AM

>.<
ill never be able to figure out scripting... >.<

Projectshifter 06-17-2002 08:51 PM

Heh, I tried to make a right-click menu, and I ran into the problem of using putnpc =/ :'( Ne chance I could take a look @ the script or a quick explanation? Heh, just asking, I know it gets annoying when ppl ask, b/c it happens to me too :(
---Shifter

adam 06-17-2002 09:09 PM

Quote:

Originally posted by HisDog
>.<
ill never be able to figure out scripting... >.<

You think I haven't said that about 10,000 times. :rolleyes:


Practice and learn to love math. it's your friend. :D

adam 06-17-2002 09:16 PM

Let's see how'd I get the menu to pop up..

Well the menuSystem is more complex than a menu for just a single weapon with afew buttons. Hmm..


NPC Code:

if (mousedown){
if (leftmousebutton&&this.menu_on==false){
draw_menu();
this.menu_on=true;
}elseif(leftmousebutton){
click_check();
}
}

function draw_menu(){
menux = mousescreenx;
menuy = mousescreeny;
showimg 6000,menu_picture,menux,menuy;
showimg 6001,@ButtonText,menux,menuy;
}

function click_check(){
if (mousescreenx in |menux,menux+imglenth| &&
mousescreeny in |menuy,menuy+imgheight|){
// do something =/
}else{
hideimg 6000;
hideimg 6001;
}
}



very simple version of what I did.... I did that just now without testing so =/ don't recomend using or even trying to use.
I aways make 3 dumb mistakes when doing stuff.


AHJ GOnna be LAte laterz

Falcor 06-17-2002 09:28 PM

I want friggen matricies :(

screen_name 06-17-2002 11:28 PM

Quote:

Originally posted by adam
love math
totally agree =D

adam 06-18-2002 10:06 AM

Quote:

Originally posted by Falcor
I want friggen matricies :(

pretend a simulated 2d array is a matrice. =/


All times are GMT +2. The time now is 06:59 PM.

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