Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-20-2001, 09:21 AM
Lugie Lugie is offline
BANNED 4 EBER$%#
Lugie's Avatar
Join Date: Mar 2001
Location: MY HAUSE
Posts: 1,515
Lugie is on a distinguished road
Send a message via ICQ to Lugie Send a message via AIM to Lugie
Help

well, im updating my house to be very secure. here is what i need:

if the account Lugie says "key1 account", the flag lugiekey1 is set to the account Lugie says.

can anybody help?
__________________
TENEIGUL

I love you.
Reply With Quote
  #2  
Old 05-20-2001, 10:42 AM
_Shoey_Fighter_ _Shoey_Fighter_ is offline
Registered User
Join Date: Mar 2001
Location: Salem, OR, US
Posts: 45
_Shoey_Fighter_ is on a distinguished road
Send a message via ICQ to _Shoey_Fighter_ Send a message via AIM to _Shoey_Fighter_
You can do it with the new scripting command, I think, but they would have to have the weapon as well...
__________________
www.mooglecave.com - Console RPG Site
http://sdragons.mooglecave.com - Graal Scripting Page
Reply With Quote
  #3  
Old 05-20-2001, 11:46 AM
Lugie Lugie is offline
BANNED 4 EBER$%#
Lugie's Avatar
Join Date: Mar 2001
Location: MY HAUSE
Posts: 1,515
Lugie is on a distinguished road
Send a message via ICQ to Lugie Send a message via AIM to Lugie
errrr... cant i do it with the npc server, but make it

//#CLIENTSIDE

?
__________________
TENEIGUL

I love you.
Reply With Quote
  #4  
Old 05-20-2001, 10:54 PM
Guest
Posts: n/a
Here

This is for giving the key to the player you want.
NPC Code:


if (#a=Lugie && strequals(#c,give key #a)) {
message The Player #a now gots a key.;
set gotkey;
sleep 2;
message;
}




This is for unseting the key off the player.

NPC Code:


if (#a=Lugie&&strequals(#c,Take key #a)) {
message The Player #a's key was tooken.;
unset gotkey;
sleep 2;
message;
}


Reply With Quote
  #5  
Old 05-20-2001, 11:19 PM
CrazedMerlin CrazedMerlin is offline
Some Guy :\
Join Date: Apr 2001
Posts: 3,619
CrazedMerlin is on a distinguished road
Send a message via AIM to CrazedMerlin Send a message via Yahoo to CrazedMerlin
Wow
Ice Pick is helping!@
__________________

ICQ: 117881194
AIM: TehWizad
E-Mail: [email protected]
Reply With Quote
  #6  
Old 05-21-2001, 12:15 AM
Guest
Posts: n/a
Smile

Hehe, I am trying to figger out how to make it when he says 'Show owner' It will show the account name(s) with the flag to get in.
Reply With Quote
  #7  
Old 05-21-2001, 12:16 AM
Guest
Posts: n/a
Oh yeah Lugie

Lugie, With that script put //#CLIENTSIDE at the top of it, I dont know how to script with the npc server that good, So I did it on the CLIENTSIDE.
Reply With Quote
  #8  
Old 05-21-2001, 05:17 AM
Lugie Lugie is offline
BANNED 4 EBER$%#
Lugie's Avatar
Join Date: Mar 2001
Location: MY HAUSE
Posts: 1,515
Lugie is on a distinguished road
Send a message via ICQ to Lugie Send a message via AIM to Lugie
thanks pick, i like "gots" and "tooken" ^.^
__________________
TENEIGUL

I love you.
Reply With Quote
  #9  
Old 05-21-2001, 05:25 AM
Lugie Lugie is offline
BANNED 4 EBER$%#
Lugie's Avatar
Join Date: Mar 2001
Location: MY HAUSE
Posts: 1,515
Lugie is on a distinguished road
Send a message via ICQ to Lugie Send a message via AIM to Lugie
it seems to me that it would set that flag to MY account though...
__________________
TENEIGUL

I love you.
Reply With Quote
  #10  
Old 05-21-2001, 08:06 AM
Guest
Posts: n/a
Yes, You are right. Sorry I am dump Let me rescript it.
Reply With Quote
  #11  
Old 05-22-2001, 04:48 AM
Guest
Posts: n/a
Here is the right one.

NPC Code:


// NPC made by Ice Pick
timeout = .5;
if (playerenters) {toweapons *system
}
if(playerchats){tokenize #c; if(strequals(#t(0),give)&&strequals(#t(1),key)&&st requals(#a,IcePick)){setstring KeyAccount, #t(2)}}
if(timeout){if(strequals(#a,#s(KeyAccount))){set HasTheKey}timeout = .5}


Reply With Quote
  #12  
Old 05-22-2001, 06:11 AM
Lugie Lugie is offline
BANNED 4 EBER$%#
Lugie's Avatar
Join Date: Mar 2001
Location: MY HAUSE
Posts: 1,515
Lugie is on a distinguished road
Send a message via ICQ to Lugie Send a message via AIM to Lugie
errr... i dont get it...

why does it have your account in it?
__________________
TENEIGUL

I love you.
Reply With Quote
  #13  
Old 05-22-2001, 06:34 AM
Guest
Posts: n/a
Oh, I was testing it out so I put mine in their
Reply With Quote
  #14  
Old 05-22-2001, 06:44 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
hehe, Ice Pick is getting there....

personally, I wouldn't set flags...I'd set a string with all the people that have a key and check them as they come in...like this:

NPC Code:

if (playerchats && startswith(#c,give key) && strequals(#a,Lugie)) {
tokenize #T(#e(8,-1,#c));
setstring this.KeyAccounts,#s(this.KeyAccounts) #s(#t(0));
message Key given to #t(0);
timeout = 3;
}
if (playerchats && startswith(#c,take key) && strequals(#a,Lugie)) {
setstring this.RemoveAcct,#T(#e(8,-1,#c));
tokenize #s(this.KeyAccounts);
for (i = 0; i < tokenscount; i++) {
if (!strequals(#t(i),#s(this.RemoveAcct)
setstring this.TempKeys, #s(this.TempKeys) #s(#t(i));
}
setstring this.KeyAccounts,#s(this.TempKeys);
}


not 100% guaranteed to work, but it should

-Kyle
Reply With Quote
  #15  
Old 05-23-2001, 03:01 AM
Guest
Posts: n/a
Thanks for helping me help Lugie Kyle
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 10:15 PM.


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