Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Can someone help me with walkie talkie (https://forums.graalonline.com/forums/showthread.php?t=25264)

Deadly_Killer 03-08-2002 07:55 AM

Can someone help me with walkie talkie
 
Can someone fix this i need it so when they fire it it works and so when they fire it off it stops and i need it so when someone chat it appears on walkie talkie if on.
NPC Code:

if (playertouchsme) {toweapons Walkie talkie;
}
if (weaponfired) {
setplayerprop#c,#s(server.walkie1);
timeout=.05;
}
if (playerchats) {
setstring server.walkie1,#n:#c;
}


neomaximus2k 03-08-2002 03:15 PM

Re: Can someone help me with walkie talkie
 
Quote:

Originally posted by Deadly_Killer
Can someone fix this i need it so when they fire it it works and so when they fire it off it stops and i need it so when someone chat it appears on walkie talkie if on.
NPC Code:

if (playertouchsme) {toweapons Walkie talkie;
}
if (weaponfired) {
setplayerprop#c,#s(server.walkie1);
timeout=.05;
}
if (playerchats) {
setstring server.walkie1,#n:#c;
}


i would if it was a script that you made from scratch but i recognize the script to much

Spanko 03-08-2002 06:28 PM

NPC Code:
if (playertouchsme) toweapons Walkie Talkie;
if (weaponfired) this.enabled=1-this.enabled;
if ((created||timeout)&&isweapon) {
if (this.enabled==1) {
if (!(startswith(#n,#s(server.walkie1))) setplayerprop #c,#s(server.walkie1);
}
timeout=0.05;
}
if (playerchats&&isweapon) {
if (this.enabled==1) setstring server.walkie1,#n: #c;
}

I'd have preferred to make it otherwise myself, but I'm not going to do more then you're asking for.

SaijinGohan 03-09-2002 04:50 AM

Odd script to me in the first place but it is rather easy but the origional script I saw somewhere else.. hmm

darkriders_p2p 03-11-2002 06:44 AM

Re: Can someone help me with walkie talkie
 
Quote:

Originally posted by Deadly_Killer
NPC Code:

if (playertouchsme) {toweapons Walkie talkie;
}
if (weaponfired) {
setplayerprop#c,#s(server.walkie1);
timeout=.05;
}
if (playerchats) {
setstring server.walkie1,#n:#c;
}


That looks so much like a certian Enigma Radio script....
Except missing a tiny bit...

amonrabr 03-11-2002 10:37 AM

Quote:

Originally posted by Spanko
if (weaponfired) this.enabled=1-this.enabled;
on/off mode.. huh?!?.. smart... too smart.. y didnt I think it before?..lol

nyghtGT 03-11-2002 11:41 AM

Quote:

Originally posted by Spanko
NPC Code:
if (playertouchsme) toweapons Walkie Talkie;
if (weaponfired) this.enabled=1-this.enabled;
if ((created||timeout)&&isweapon) {
if (this.enabled==1) {
if (!(startswith(#n,#s(server.walkie1))) setplayerprop #c,#s(server.walkie1);
}
timeout=0.05;
}
if (playerchats&&isweapon) {
if (this.enabled==1) setstring server.walkie1,#n: #c;
}

I'd have preferred to make it otherwise myself, but I'm not going to do more then you're asking for.

you should use accountnames cause you can just change your name and intercept messages to anyone ...

neomaximus2k 03-11-2002 03:45 PM

Quote:

Originally posted by Spanko
[code]
if (!(startswith

forgive me if i am wrong but you cant have !(startswith
the command simply doesn't work

:):confused:

Saga2001 03-11-2002 04:17 PM

Quote:

Originally posted by Kaimetsu
Huh. "Script X for me" has evolved into "Look at this thing I made in 5 minutes and fix it so that it is X". I'm not sure what to do about this.
heehe, destroy, destroy...

Spanko 03-11-2002 07:02 PM

Quote:

Originally posted by neomaximus2k


forgive me if i am wrong but you cant have !(startswith
the command simply doesn't work

:):confused:

Actually it does, it's contained in an if in an if ! always means not, so it checks to see if it doesn't start with a certain person's name.

neomaximus2k 03-12-2002 12:45 AM

Quote:

Originally posted by Kaimetsu


I don't see any reason why it wouldn't.

just never worked for me that is why i tohught.


All times are GMT +2. The time now is 05:43 PM.

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