Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Scripting a Pause/NoPK system (https://forums.graalonline.com/forums/showthread.php?t=63855)

jake13jake 02-02-2006 01:44 AM

Scripting a Pause/NoPK system
 
As I stray away from using the default system with my systems that I'm preparing for the Classic server, I've encountered quite a few complications with the default pausing system, and the system that determines whether players block or don't block.

I see a lot of potential in straying away from that system and implementing a scripted one, but the amount of structuring that would go into it might scare anyone.

You can't detect whether a player should or shouldn't be blocking on the clientside without using onwall/onwall2, though it seems you should. However, my movement system doesn't use these commands. In fact, I'm waiting on the next release of v4 to complete the handling of NPCs not blocking.

The ideas for a new pausing system flow out of my mind like a great river of disarray. I've been trying to design a structure for this using diagrams.

So far I've figured: (serverside)
serverr.noblocking: players not blocking
serverr.nohurting: players that can't be hurt

The catch is that the noblocking list needs to be accessable to any client where the player might run into a player in the serverr.noblocking list. What my biggest fear is: the server vars being overloaded with a list of noblocking or paused players.

Yea, I've decided to rescript nicks in this system too. The problem is that it doesn't pick up paused as part of the nickname. I also am going to add different forms of pausing.

serverr.paused: players that are paused
serverr.spectate: players that are spectating

Having two different server vars for something as simple as drawing (paused) or (spectating) at the end of a nick display? This is starting to sound a little bit outrageous to even myself :whatever:. I think I need to find a different approach for making paused/spectating players decipherable.

ZeLpH_MyStiK 02-02-2006 02:09 AM

Why would you need to use so many serverr strings? I'm sure many of those can be substituted with other more efficient methods. Especially the serverr string used for (paused) tags. What's wrong with doing a showimg with index less than 200 on the client of the user that is paused?

jake13jake 02-02-2006 02:28 AM

Quote:

Originally Posted by ZeLpH_MyStiK
Why would you need to use so many serverr strings? I'm sure many of those can be substituted with other more efficient methods. Especially the serverr string used for (paused) tags. What's wrong with doing a showimg with index less than 200 on the client of the user that is paused?

Well, the trick is that the individual clients would control the nick display.
The modes currently are: show all nicks except your own nick, show all nicks, show only your nick, or show no nicks (this includes NPC nicks). I seriously don't think of using a serverr var for paused and spectate tags is efficient, but I don't know what might be a good way of informing other players that this player is paused. The best idea I can think of is player attribute modification. I'd have to mess around with it though, putting in

The first two serverr vars mentioned make the most sense, and in particular the nohurting one, but then of course, the entire damage system is serverside so I could just to clientr.vars for that, so eliminate that one.

The noblocking one... I don't know...

maybe setting some attr[#] to ".paused.spectate.dontblock" and then tokenize it with a delim "."? I don't know if that would work... could try it though.

Prozac 02-02-2006 02:59 AM

(takes a look ... walks away from the people who want to put themselves through the torment of essentially reinventing the wheel)

ZeLpH_MyStiK 02-02-2006 03:44 AM

Quote:

Originally Posted by jake13jake
Well, the trick is that the individual clients would control the nick display.
The modes currently are: show all nicks except your own nick, show all nicks, show only your nick, or show no nicks (this includes NPC nicks). I seriously don't think of using a serverr var for paused and spectate tags is efficient, but I don't know what might be a good way of informing other players that this player is paused. The best idea I can think of is player attribute modification. I'd have to mess around with it though, putting in

The first two serverr vars mentioned make the most sense, and in particular the nohurting one, but then of course, the entire damage system is serverside so I could just to clientr.vars for that, so eliminate that one.

The noblocking one... I don't know...

maybe setting some attr[#] to ".paused.spectate.dontblock" and then tokenize it with a delim "."? I don't know if that would work... could try it though.

Oh I see what you're doing with the nicks. Basically a player can choose which type of nicks he/she can see. Why not script showing nicks in the ganis so by simply using a flag check, you can choose whether or not to display the nicks.

jake13jake 02-02-2006 04:38 AM

Quote:

Originally Posted by ZeLpH_MyStiK
Oh I see what you're doing with the nicks. Basically a player can choose which type of nicks he/she can see. Why not script showing nicks in the ganis so by simply using a flag check, you can choose whether or not to display the nicks.

There are an awful lot of ganis, so it wouldn't seem to practical. However, I might want to see what I can do for using attr[] with values that have no image or gani. I can't do it now though, because I'm not in my dorm room.
I'm kind of peaved of at my CS instructor for giving me a 0 on an assignment that I did perfectly well. If she won't do anything about it, I'm just going to withdraw and go for credit by examination. Unfortunately the drop deadline has passed, but the withdrawal deadline has not. So now I'm just going to stay up all night studying in the math college building to get ahead in other courses so that I may have the time to study for dropping the class, if indeed my instructor won't act.
And yea, reinventing the wheel isn't hard if you understand what it's supposed to do.

Oh God, this is ridiculous. I get a 0 because Visual C++ 2003 doesn't support declaration of arrays based on a dynamic expression? Oh god, one line of code. All because Bloodshed Dev C++ is different from Microsoft Visual C++ 2003... -_-
(even though I'm required to have Microsoft Visual C++ :( )

int key_count[key_size];
becomes
int key_count[KEY_MAX];

Considering the rest of the program is based on key_size anyway, what the hell is the difference? If this doesn't get fixed, I'm going to be very upset.

ZeLpH_MyStiK 02-02-2006 05:25 AM

I thought this was the NPC Scripting forum, not the complain-about-my-computer-science-course forum. x.X

Lance 02-02-2006 05:50 AM

Quote:

Originally Posted by jake13jake
Oh God, this is ridiculous. I get a 0 because Visual C++ 2003 doesn't support declaration of arrays based on a dynamic expression? Oh god, one line of code. All because Bloodshed Dev C++ is different from Microsoft Visual C++ 2003... -_-
(even though I'm required to have Microsoft Visual C++ :( )

int key_count[key_size];
becomes
int key_count[KEY_MAX];

Considering the rest of the program is based on key_size anyway, what the hell is the difference? If this doesn't get fixed, I'm going to be very upset.

If you want it to be dynamic, perhaps you should instead have declared it dynamically...?

jake13jake 02-02-2006 06:56 AM

Quote:

Originally Posted by Lance
If you want it to be dynamic, perhaps you should instead have declared it dynamically...?

lol, dynamic memory allocation for something so simple... nah. If you wanted to mimic Graal tokens, however, that would be required.

ApothiX 02-02-2006 03:49 PM

Quote:

Originally Posted by jake13jake
lol, dynamic memory allocation for something so simple... nah. If you wanted to mimic Graal tokens, however, that would be required.

If you're not willing to declare it dynamic the appropriate way, why are you complaining about not being able to do it a way in which you shouldn't have been able to?


All times are GMT +2. The time now is 01:26 AM.

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