Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Need help on this NPC! (https://forums.graalonline.com/forums/showthread.php?t=31852)

mhermher 06-18-2002 10:13 PM

Need help on this NPC!
 
Hey guys, i need some help...
i want this npc to play the ganis...
but there is no way to trigger it self (what i think).

So...
can anyone help me make this move for EVERYBODY when someone clicks on it?
NPC Code:

if (actionserverside) {
setcharani #p(1),;
}
//#CLIENTSIDE
if (created) {
this.dontmove=false;
}
if (actionleftmouse&&keydown2(keycode(b),ignorecase)& &keydown2(keycode(r),ignorecase)&&this.dontmove==f alse){
this.dontmove=true;
triggeraction x,y,serverside,shelf1;
sleep 4;
triggeraction x,y,serverside,shelf2;
this.dontmove=false;
}


mikepg 06-19-2002 06:54 AM

if
 
if it's a showcharacter NPC, then you want to use

triggeraction x+1.5,y+2,serverside,;

because you can only triggeractions on a visible part of the NPC, and the NPC is normally set up like this:

NPC Code:

00000111100000
00001111110000
00001111110000
00001111110000
00001111110000
00001111110000
00001111110000



meaning x,y would be transparent/null

user13-xo 06-19-2002 01:26 PM

Re: Need help on this NPC!
 
I noticed another scripting problem other then the one mikepg pointed out.
NPC Code:

if (actionserverside) {
setcharani #p(0),#p(1);
}
//#CLIENTSIDE
if (created) {
this.dontmove=false;
}
if (actionleftmouse&&keydown2(keycode(b),ignorecase)& &keydown2(keycode(r),ignorecase)&&this.dontmove==f alse){
this.dontmove=true;
triggeraction x+1.5,y+2,serverside,shelf1;
sleep 4;
triggeraction x+1.5,y+2,serverside,shelf2;
this.dontmove=false;
}


screen_name 06-19-2002 08:26 PM

lol, you dont use ignorecase with the keys

you use i

mhermher 06-19-2002 09:24 PM

Quote:

Originally posted by screen_name
lol, you dont use ignorecase with the keys

you use i

[CODE]
if (actionserverside) {
setcharani #p(1),;
}
//#CLIENTSIDE
if (created) {
this.dontmove=false;
}
if (actionleftmouse&&keydown2(keycode(b),i)&&keydown2 (keycode(r),i)&&this.dontmove==false){
this.dontmove=true;
triggeraction x,y,serverside,shelf1;
sleep 4;
triggeraction x,y,serverside,shelf2;
this.dontmove=false;
}

mikepg 06-19-2002 09:40 PM

Re: Re: Need help on this NPC!
 
Quote:

Originally posted by user13-xo
I noticed another scripting problem other then the one mikepg pointed out.
NPC Code:

if (actionserverside) {
setcharani #p(0),#p(1);
}
//#CLIENTSIDE
if (created) {
this.dontmove=false;
}
if (actionleftmouse&&keydown2(keycode(b),ignorecase)& &keydown2(keycode(r),ignorecase)&&this.dontmove==f alse){
this.dontmove=true;
triggeraction x+1.5,y+2,serverside,shelf1;
sleep 4;
triggeraction x+1.5,y+2,serverside,shelf2;
this.dontmove=false;
}


Uhh....there isnt even a second param in that action...why would he put #p(1) in there?

screen_name 06-20-2002 12:26 AM

Re: Re: Re: Need help on this NPC!
 
Quote:

Originally posted by mikepg


Uhh....there isnt even a second param in that action...why would he put #p(1) in there?

same question

user13-xo 06-20-2002 08:01 AM

I wrote it in my script and forgot to take it out i was using the gralat gani


All times are GMT +2. The time now is 06:03 AM.

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