Graal Forums  

Go Back   Graal Forums > PlayerWorlds > PlayerWorlds Main Forum
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #181  
Old 04-23-2006, 06:55 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Quote:
Originally Posted by xXziroXx
Errr, or even better:

(im guessing you use GS2)

NPC Code:

function onCreated()
{
this.oldNames = {"Bomb", "Bow"};
this.newNames = {"Weapons/Bomb", "Weapons/Bow"};
for (this.i = 0; this.i < this.oldNames.size(); this.i ++)
{
if ( hasweapon( this.oldNames[this.i]) ) {
removeweapon( this.oldNames[this.i]);
addweapon( this.newNames[this.i]);
}
}
}

I'm a crappy scripter. I can do some stuff to get me by, but no of the real good stuff. I wasn't sure how to do that.

Just recently I learned how to read server.strings and client.strings - and I'm not exactly sure wtf #I is :P
Reply With Quote
  #182  
Old 04-23-2006, 07:35 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388 Send a message via Skype™ to excaliber7388
True, but I'd still have to make all the new weapons, AND I would have to set up a string array for each new name and each old one, making sure they match. No matter what, this is going to be a long and difficult process. You forget, DR has over 100 weapons , a lot more i think (i never counted)
Reply With Quote
  #183  
Old 04-23-2006, 07:38 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by excaliber7388
True, but I'd still have to make all the new weapons, AND I would have to set up a string array for each new name and each old one, making sure they match. No matter what, this is going to be a long and difficult process. You forget, DR has over 100 weapons , a lot more i think (i never counted)

Well, you´re not lazy, or are you?
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #184  
Old 04-23-2006, 07:40 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Quote:
Originally Posted by xXziroXx
Well, you´re not lazy, or are you?
I know I am
Reply With Quote
  #185  
Old 04-23-2006, 07:49 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388 Send a message via Skype™ to excaliber7388
Quote:
Originally Posted by xXziroXx
Well, you´re not lazy, or are you?
Running that NPC would cause the NPC server to crash though x_X
I could just rename the old weapons and make an NPC that does that when they log on, more local stuff
Reply With Quote
  #186  
Old 04-23-2006, 08:02 PM
CidNight1142 CidNight1142 is offline
I Fight Bears
CidNight1142's Avatar
Join Date: Oct 2005
Location: CT, USA
Posts: 2,197
CidNight1142 is on a distinguished road
You could just delete the old weapons and make the new ones and consider an item reset. Would your playerbase suffer horribly if they had to get weapons anew?
__________________
Cid Night
Retired GK Staff
Golden Pluffy Winner in Poetry
A poet never takes notes. You never take notes in a love affair.
Robert Frost
Reply With Quote
  #187  
Old 04-23-2006, 08:25 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388 Send a message via Skype™ to excaliber7388
Quote:
Originally Posted by CidNight1142
You could just delete the old weapons and make the new ones and consider an item reset. Would your playerbase suffer horribly if they had to get weapons anew?
Of course not, this is what I plan to do, I will not make an NPC that converts their weapons, because though it would be easy to make, the NPC server would never be able to handle it. I'm going to have to reset weapons (something I've wanted to do for a while. Catagories will include Misc, Rings, Keys, Ancient Relics, Spells, Physical attacks, tools, and more. it should help sort it out a bit more, but don't expect it to happen overnight, this will take many weeks.
Reply With Quote
  #188  
Old 04-23-2006, 08:35 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Uhm, if you put the script in the Control-NPC and make it run on login, the lag should be close to nothing.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #189  
Old 04-23-2006, 08:38 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388 Send a message via Skype™ to excaliber7388
Quote:
Originally Posted by xXziroXx
Uhm, if you put the script in the Control-NPC and make it run on login, the lag should be close to nothing.
It would have to loop through hundreds of items, and replace them, all serverside. x_X I've done stuff serverside like that before, it wasn't pretty, especially if you have multiple logings. And lets not forget that all the levels that give you those weapons will have to be changed.
Reply With Quote
  #190  
Old 04-25-2006, 07:25 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
In the Control-NPC, just do this:


NPC Code:

function onActionPlayerOnline()
{
this.oldNames = {"Bomb", "Bow"};
this.newNames = {"Weapons/Bomb", "Weapons/Bow"};
for (this.i = 0; this.i < this.oldNames.size(); this.i ++)
{
if ( hasweapon( this.oldNames[this.i]) ) {
removeweapon( this.oldNames[this.i]);
addweapon( this.newNames[this.i]);
}
}
}




If it lags, remove it. This is the best way to replace all your new items with old, and I doubt it will cause any lag.. I have more then one loop in my Control-NPC, and several other stuff and that doesnt cause any lag.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #191  
Old 04-25-2006, 09:10 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388 Send a message via Skype™ to excaliber7388
Quote:
Originally Posted by xXziroXx
In the Control-NPC, just do this:


NPC Code:

function onActionPlayerOnline()
{
this.oldNames = {"Bomb", "Bow"};
this.newNames = {"Weapons/Bomb", "Weapons/Bow"};
for (this.i = 0; this.i < this.oldNames.size(); this.i ++)
{
if ( hasweapon( this.oldNames[this.i]) ) {
removeweapon( this.oldNames[this.i]);
addweapon( this.newNames[this.i]);
}
}
}




If it lags, remove it. This is the best way to replace all your new items with old, and I doubt it will cause any lag.. I have more then one loop in my Control-NPC, and several other stuff and that doesnt cause any lag.
I'll try it ^_^ I havn't had any server problems in a long while, so it should be fire
Reply With Quote
  #192  
Old 04-25-2006, 09:13 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Although, you might want to change this.newNames and this.oldNames :P
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #193  
Old 05-02-2006, 03:37 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388 Send a message via Skype™ to excaliber7388
All of the PWAs have inspected DR for the hosted tab....
AND
WE
PASSED!!!!

So...what next?
Reply With Quote
  #194  
Old 05-02-2006, 03:42 AM
MysticX2X MysticX2X is offline
Prince
MysticX2X's Avatar
Join Date: Sep 2005
Posts: 2,529
MysticX2X will become famous soon enough
congradulations ill say for the first time. Good luck man
__________________
-Mystic

former acc: mystic2k


RIP Matt (NBK)
Reply With Quote
  #195  
Old 05-02-2006, 05:54 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by excaliber7388
All of the PWAs have inspected DR for the hosted tab....
AND
WE
PASSED!!!!

So...what next?
My guess is youll soon be moved to the hosted tab?

Good job by the way.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:14 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.