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 11-19-2003, 04:25 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
logs

Can somebody tell me ALL of the current log commands?

I know of these:

NPC Code:

savelog text;
savelog2 filename,text;



Thanks
Reply With Quote
  #2  
Old 11-19-2003, 04:38 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
That's all of them, besides
NPC Code:
sendrpgmessage message;


That's the command used on Graal Kingdoms for the RPG Message.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #3  
Old 11-20-2003, 01:49 AM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
Can anyone make use of the rpg window?
__________________
Reply With Quote
  #4  
Old 11-20-2003, 02:08 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Talking

Quote:
Originally posted by MrGannondorf
Can anyone make use of the rpg window?
Sure I can, easily. Here is a chat system, allthough basic. I submit it to the forums, anyone can use it.

NPC Code:

// NPC made by TGC
// NPC Weapon, weaponname: TGC Chat System.
if (actionserverside) {
for (a=0;a<allplayerscount;a++) {
with (allplayers[a]) {
if (strequals(#s(client.chatsystem),on)) sendrpgmessage #p(0);
}
}
}
//#CLIENTSIDE
if (weaponfired) {
if (strlen(#s(client.chatsystem))==0) setstring client.chatsystem,off;
if (strequals(#s(client.chatsystem),off)) {
setstring client.chatsystem,on;
setplayerprop #c,Chat Enabled, say /chat <message> to send a message;
} else {
setstring client.chatsystem,off;
setplayerprop #c,Chat disabled;
}
}
if (playerchats) {
tokenize #c;
if (strequals(#s(client.chatsystem),on)) {
if (strequals(#t(0),/chat)) {
triggeraction 0,0,serverside,TGC Chat System,"#n: #e(6,-1,#c)";
setplayerprop #c,Message Sent;
}
}
}


Fire the weapon to enable/disable it. Say "/chat <message>" to send a message. Press F2 to view the RPG Window. :-)
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #5  
Old 11-20-2003, 02:12 AM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
ah, intresting.

say, is there a flag for when an rc logs on to the server?
__________________
Reply With Quote
  #6  
Old 11-20-2003, 02:12 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally posted by MrGannondorf
Can anyone make use of the rpg window?
I think it would be best used for sending longer messages.
Such as paragraphs, info, help, stories.
Reply With Quote
  #7  
Old 11-20-2003, 02:26 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally posted by MrGannondorf
say, is there a flag for when an rc logs on to the server?
Nope, least not in the current engine. Possobly in the new engine. I check in a timeout loop to see how many rcs are on and who they are. If a new one comes on, then a message is sent to the new RC, greeting it.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #8  
Old 11-21-2003, 06:31 AM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
Intresting. How did you check to see if it was an rc?
__________________
Reply With Quote
  #9  
Old 11-21-2003, 07:38 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Check if the strlen of the level, #F, is 0.

if (strlen(#F)==0)
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #10  
Old 11-21-2003, 07:50 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by ForgottenLegacy
Check if the strlen of the level, #F, is 0.

if (strlen(#F)==0)
Note for Lunpa - #F is valid only within a with() statement.
Reply With Quote
  #11  
Old 11-21-2003, 08:00 AM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
Awsome! Thanks alot, guys
__________________
Reply With Quote
  #12  
Old 11-21-2003, 08:45 AM
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 Lance
Note for Lunpa - #F is valid only within a with() statement.
You're sure? I thought the only prerequisite was that an active player is set.
__________________
Reply With Quote
  #13  
Old 11-21-2003, 09:21 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by Kaimetsu


You're sure? I thought the only prerequisite was that an active player is set.
I wasn't specific enough; I'm at fault.

Revised statement: An active player has to be set within a with() statement for #F to be valid.
Reply With Quote
  #14  
Old 11-21-2003, 09:32 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Of course, there are other ways for active players to be set :-p
__________________
Reply With Quote
  #15  
Old 11-21-2003, 09:47 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by Kaimetsu
Of course, there are other ways for active players to be set :-p
List some...?
Reply With Quote
  #16  
Old 11-21-2003, 10:10 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Well, my message was kinda misleading. I mean that there are other circumstances in which an active player is set, such as when a player-specific event has occured. Otherwise we'd all be fumbling with ProjectShifter-esque 'with(#a)'s
__________________
Reply With Quote
  #17  
Old 11-21-2003, 10:25 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by Kaimetsu
Well, my message was kinda misleading. I mean that there are other circumstances in which an active player is set, such as when a player-specific event has occured. Otherwise we'd all be fumbling with ProjectShifter-esque 'with(#a)'s
Ah, I understand what you mean. ^_^

(Gasp! I was indeed suffering from a misconception. I blame the original explanation of #F I was fed. The way it works makes sense, though; I should have picked up on it earlier. o.O)
Reply With Quote
  #18  
Old 11-26-2003, 02:03 AM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
I got it somewhat working. This...
NPC Code:

if (actionplayeronline) {
//stuff
for(i=0; i<allplayerscount; i++) {
with(allplayers[i]) if (strlen(#F)=0) setplayerprop #3,head122.png;
}
//more stuff
}


...is what I have so far. Works nice, with the exeption that RCs don't seem to trigger actionplayeronline... so it ends up that the rc will have the default head when the log on untill a player logs on. Any ideas?

I was thinking of having it check for when the rc chat says "New RC: blah blah blah", but I've been having trouble getting the (rcchat) flag to work.
__________________
Reply With Quote
  #19  
Old 11-26-2003, 02:29 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally posted by MrGannondorf
I got it somewhat working. This...
NPC Code:

if (actionplayeronline) {
//stuff
for(i=0; i<allplayerscount; i++) {
with(allplayers[i]) if (strlen(#F)=0) setplayerprop #3,head122.png;
}
//more stuff
}


...is what I have so far. Works nice, with the exeption that RCs don't seem to trigger actionplayeronline... so it ends up that the rc will have the default head when the log on untill a player logs on. Any ideas?

I was thinking of having it check for when the rc chat says "New RC: blah blah blah", but I've been having trouble getting the (rcchat) flag to work.
I do believe that if (rcchat) only calls when /npc is used.
Reply With Quote
  #20  
Old 11-26-2003, 03:24 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by MrGannondorf
I got it somewhat working. This...
NPC Code:

if (actionplayeronline) {
//stuff
for(i=0; i<allplayerscount; i++) {
with(allplayers[i]) if (strlen(#F)=0) setplayerprop #3,head122.png;
}
//more stuff
}


Ugh! Unnecessarily laggy, improper way to compare values, and bad formatting.

Quote:
...is what I have so far. Works nice, with the exeption that RCs don't seem to trigger actionplayeronline... so it ends up that the rc will have the default head when the log on untill a player logs on. Any ideas?
Keep a list of currently logged in RCs. Loop through every so often and update the list. If there are new RCs, set their head using allplayers.

Quote:
I was thinking of having it check for when the rc chat says "New RC: blah blah blah", but I've been having trouble getting the (rcchat) flag to work.
Riot is correct about rcchat - it only works when you type /npc(command name).
Reply With Quote
  #21  
Old 11-26-2003, 07:41 AM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
Quote:
Ugh! Unnecessarily laggy, improper way to compare values, and bad formatting.
o.o free critique!


Isn't there a better way then looping through every so often?
__________________
Reply With Quote
  #22  
Old 11-26-2003, 07:43 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by MrGannondorf

Isn't there a better way then looping through every so often?
Currently, no. There've been quite a few requests for actionrconline, as it'd be really nifty. Of course, like all really nifty suggestions, it's got its disadvantages too: It could easily be exploited to do malicious things. It'd probably go through, though.
Reply With Quote
  #23  
Old 11-26-2003, 06:12 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by ForgottenLegacy


Sure I can, easily. Here is a chat system, allthough basic. I submit it to the forums, anyone can use it.

Fire the weapon to enable/disable it. Say "/chat <message>" to send a message. Press F2 to view the RPG Window. :-)
Whoever uses this is stupid - you have to close, reopen, close, reopen RPG window all the time if you want to be up-to-date with the chat :|
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #24  
Old 11-26-2003, 10:00 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by GoZelda

Whoever uses this is stupid - you have to close, reopen, close, reopen RPG window all the time if you want to be up-to-date with the chat :|
...Or you could just leave the RPG Window open?
Reply With Quote
  #25  
Old 11-26-2003, 10:09 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally posted by Lance
it's got its disadvantages too: It could easily be exploited to do malicious things. It'd probably go through, though.
actionplayeronline has the same disadvantages, if not more, and it got through.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #26  
Old 11-26-2003, 10:32 PM
MrGannondorf MrGannondorf is offline
Teh Lunpa
Join Date: Apr 2002
Location: usa, alas
Posts: 395
MrGannondorf is on a distinguished road
Send a message via AIM to MrGannondorf
Quote:
Originally posted by GoZelda

Whoever uses this is stupid - you have to close, reopen, close, reopen RPG window all the time if you want to be up-to-date with the chat :|
then don't use it for chat. I just use it for semi-important things, such as to help test a script (if it doesn't say something, then I know where it went wrong)...

if you use it for something like 2k2 does, I supose you could also do what they do, and inform the player when something is updated.
__________________
Reply With Quote
  #27  
Old 11-26-2003, 11:16 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by ForgottenLegacy


actionplayeronline has the same disadvantages, if not more, and it got through.
No (to the 'if not more')? Example: exploits used to crash a player on login are obviously less bad than exploits used to crash an RC on login.
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 09:32 PM.


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