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-06-2005, 03:23 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
GS1 Radio help

Well, i tried to make a gs1 radio better than my last one, but for some reason this one refuses to work properly, and I can't figure out why. Any help would be greatly appreciated.
NPC Code:
//Made by *coreys (Vash-Aniki)

if (actionserverside) {
if (strequals(#p(0),update)) {
serverr.songtitle = #p(1);
serverr.songurl = #p(2);
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]) {
if (strequals(#w,Radio)) {
if (this.on = 1) {
showtext 201,400,400,b,Veridna,Song:#s(serverr.songtitle);
changeimgvis 201,4;
play #s(serverr.songurl);
}
}
}
}
}
if (strequals(#p(0),chat)) {
serverr.songchat = #p(1);
for (i=0;i<allplayerscount;i++) {
with (allplayers[i]) {
if (strequals(#w,Radio)) {
if (this.on = 1) {
showtext 202,400,410,b,Veridna,Chat:#s(serverr.songchat);
changeimgvis 202,4;
}
}
}
}
}
}
//#CLIENTSIDE
setstring this.a,coreys,CujoDaMan;
if (playerchats&&strequals(#c,radio on)) {
this.on = 1;
showtext 201,290,400,b,Veridna,Song:#s(serverr.songtitle);
changeimgvis 201,4;
showtext 202,95,420,b,Veridna,Chat:#s(serverr.songchat);
changeimgvis 202,4;
play #s(serverr.songurl);
}
if (playerchats&&strequals(#c,radio off)) {
this.on = 0;
hideimg 201;
hideimg 202;
stopsound #s(serverr.songurl);
}
if (playerchats&&startswith(/play,#c)) {
if (strequals(#a,#s(this.a)) {
tokenize #c;
triggeraction 0,0,serverside,Radio,update,#t(1),#t(2);
}
}
if (playerchats&&startswith(/chat,#c)) {
if (strequals(#a,#s(this.a)) {
tokenize #c;
triggeraction 0,0,serverside,Radio,chat,#t(1);
}
}

__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #2  
Old 05-06-2005, 04:55 AM
StanislavHunter StanislavHunter is offline
mangzilla
StanislavHunter's Avatar
Join Date: May 2004
Location: Oklahoma
Posts: 105
StanislavHunter is on a distinguished road
Send a message via AIM to StanislavHunter Send a message via MSN to StanislavHunter
Once again... your NPC works.
__________________

I'm totally Mexican.
Reply With Quote
  #3  
Old 05-06-2005, 03:21 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
=]
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #4  
Old 05-06-2005, 11:22 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Do I even need to say it? :|
__________________
Reply With Quote
  #5  
Old 05-06-2005, 11:36 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Nope, although if you could actually once point out what I do wrong, that would be nice. Considering I've read your KSI-GS.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 05-06-2005, 11:43 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by coreys
Nope, although if you could actually once point out what I do wrong, that would be nice. Considering I've read your KSI-GS.
You're breaking rules 1, 2A, 5 and 8.

Also, you're using strequals to check if a string is in a list. This won't work.
Furthermore, you're using presentational commands (showtext etc) on the serverside. This won't work.
Lastly, you're only checking security info on the clientside. This is poor security.
__________________
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 02:49 PM.


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