Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-03-2002, 11:06 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
weapons and log-on

When you are logging on, you get all your weapons added, and the script of the weapons is executed imediatly.
My problem is that on Classic we are having such a command in our system NPC:
NPC Code:

if (!hasweapon(whatever)) {
setlevel onlinestartlocal.graal;
}


Now this will be executed before the weapon "whatever" was loaded, and so the player will always be warped when logging in.

It could be solved by not executing any scripts until all the weapons are loaded.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #2  
Old 10-03-2002, 01:59 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: weapons and log-on

Couldn't ya just use a timeout?
__________________
Reply With Quote
  #3  
Old 10-03-2002, 10:05 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Get an NPC Server, then you can define which weapons must be loaded first.
Reply With Quote
  #4  
Old 10-03-2002, 10:57 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Yes, an NPCServer!

Oh wait! There are over 6000 levels to be converted manually!

=_=

We'd need either a customized NPCServer that can still allow certain aspects to be handled clientside (which Stefan suggested might be possible, though he hasn't even started on it) or a really smart batcher to automatically NPCServerize everything.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #5  
Old 10-03-2002, 11:54 PM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
Quote:
Originally posted by Loriel
Get an NPC Server, then you can define which weapons must be loaded first.
you mean weaponorder = ?
__________________
GONE, BAI
Reply With Quote
  #6  
Old 10-04-2002, 04:01 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Quote:
Originally posted by Kaimetsu
Couldn't ya just use a timeout?
How can I know how long it takes until it is loaded?

Quote:
Originally posted by Tyhm
a really smart batcher to automatically NPCServerize everything.
I will try to write one.
Basically it will just check simple events like playerenters and playertouchsme and will move every clientside command (like setbackpal, play, ...) into the clientside part.
If it finds any clientside commands it can't convert automatically, it will report the level and the position of the NPC. It would report toweapons, too.

Only problem: how can you read .graal files?

Ok, not the only problem...I need to convert a lot of flags, too. If I'd just keep the old flags they couldn't be read clientside. I need to add client. or clientr. in front of some flags. I would buld some flag database, where I add every flag and string and tell the levels in which it is used. Then I'd have to see which of them need to be changed. I would notice it, because only those flags need to be changed which are used in NPCs I need to convert manually. (I guess it would be quite a lot).

So we'd basically need a second server, to debug everything. We cannot destroy thousands of player accounts.

A converter graal to nw would be usefull, too.

I'd also rename the levels on the map to main_*.nw to be able to use gmaps.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #7  
Old 10-04-2002, 04:15 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
Quote:
Originally posted by Com013

How can I know how long it takes until it is loaded?


I will try to write one.
Basically it will just check simple events like playerenters and playertouchsme and will move every clientside command (like setbackpal, play, ...) into the clientside part.
If it finds any clientside commands it can't convert automatically, it will report the level and the position of the NPC. It would report toweapons, too.

Only problem: how can you read .graal files?

Ok, not the only problem...I need to convert a lot of flags, too. If I'd just keep the old flags they couldn't be read clientside. I need to add client. or clientr. in front of some flags. I would buld some flag database, where I add every flag and string and tell the levels in which it is used. Then I'd have to see which of them need to be changed. I would notice it, because only those flags need to be changed which are used in NPCs I need to convert manually. (I guess it would be quite a lot).

So we'd basically need a second server, to debug everything. We cannot destroy thousands of player accounts.

A converter graal to nw would be usefull, too.

I'd also rename the levels on the map to main_*.nw to be able to use gmaps.
1.) only the tiles are encrypted in .graal files
2.) a converter for graal - nw does exist, you can contact me to get it
3.) gmaps have a feature where you open in wordpad and do
LEVELNAMES
levels (kindof like map text file formats)
LEVELNAMESEND
__________________
GONE, BAI
Reply With Quote
  #8  
Old 10-04-2002, 06:16 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 Com013

How can I know how long it takes until it is loaded?
Oh, I see. Well, how about using a flag to store whether or not the person has the weapon? They load before any weapons, don't they?
__________________
Reply With Quote
  #9  
Old 10-04-2002, 08:20 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Heey, there's a real .graal to .nw converter? I heard about it a few months ago, then someone said it just changed filenames, then nobody had a copy. If it exists and it does what it should, we're set! Writing batchers for .nw files is a snap!
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #10  
Old 10-04-2002, 08:31 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
But it wouldnt change level links would it?
__________________
- R0bin
Reply With Quote
  #11  
Old 10-04-2002, 09:12 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by R0b1n-NPC
But it wouldnt change level links would it?
It changes everything.

I had it, unfortunately I do not anymore.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #12  
Old 10-04-2002, 09:31 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
tyhm, I emailed you the converter, well, I hope I got the right email, I just assumed it was [email protected]
__________________
GONE, BAI
Reply With Quote
  #13  
Old 10-04-2002, 10:10 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
thought you said you werent to give it out?

:'(
__________________
- R0bin
Reply With Quote
  #14  
Old 10-04-2002, 10:23 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Shweet, got it, thanks!
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #15  
Old 10-05-2002, 04:16 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Due to some strange problems with e-mail, I didn't get the converter now, but Tyhm has to run it anyway.

I started writing my script converter.
I guess that the NPC Server is still unable to load images and I have to add setshape in front of every NPC?
I wrote it so it looks for every image in your graal folder and its subdirectories, and it loads the dimensions of it. It does not support gif files, but we only use pngs and mngs on Classic, so that shouldn't be a problem.
I already wrote the setshape part. It does not support setimgpart or setimg, it is using the image assigned to the NPC. I hope I won't have to do setshape for showcharacter NPCs.
We'd have to search all the levels for setimgpart and edit those...I hope that is not too much.
Let's hope I'll finish the rest soon.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #16  
Old 10-05-2002, 04:19 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Sorry for the double-post....

Quote:
Originally posted by Kaimetsu


Oh, I see. Well, how about using a flag to store whether or not the person has the weapon? They load before any weapons, don't they?
That might work. I'll do so until we get the NPC Server.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #17  
Old 10-05-2002, 05:31 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 Com013
I started writing my script converter.
I guess that the NPC Server is still unable to load images and I have to add setshape in front of every NPC?
Well, in the if(created) of the serverside section.

Quote:
I hope I won't have to do setshape for showcharacter NPCs.
Nope.
__________________
Reply With Quote
  #18  
Old 10-05-2002, 06:32 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Quote:
Originally posted by Kaimetsu


Well, in the if(created) of the serverside section.
Yeah, already did that.
It does the following:
NPC Code:

fprintf (lfile,"// \"setshape\" was added by Com013's Script Converter\n"
"if (created) setshape 1,%d,%d;\n\n",
curimg->width,curimg->height);

__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
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 12:03 AM.


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