Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-02-2001, 01:24 AM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
fromweapons <weapon name>;

Instead of adding a weapon, it takes away a weapon from your inventory.

So, for example, if I wanted to talk weapon "Nukeshot" out of the players inventory,

NPC Code:

if(playertouchsme){
fromweapons Nukeshot;
}



Sound interesting?
Reply With Quote
  #2  
Old 09-02-2001, 02:01 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Re: fromweapons <weapon name>;

Um. "removeweapon"?
Reply With Quote
  #3  
Old 09-02-2001, 03:00 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
This exists on the NPC Server. Although it'd be neat if Stefan could add it for offline uses too (Even though I usually just code my weapons I want to do that with seperately for that)
__________________

Reply With Quote
  #4  
Old 09-02-2001, 09:38 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Hers an idea. Making the Test program regonize with as a standerd operation rather than a variable syntax problem @.@;
__________________

subliminal message: 1+1=3
Reply With Quote
  #5  
Old 09-02-2001, 09:44 AM
General General is offline
Banned
Join Date: Apr 2001
Location: Station Square
Posts: 984
General is on a distinguished road
Send a message via ICQ to General Send a message via AIM to General Send a message via Yahoo to General
maybe an option to switch the debugger to NPCServer mode, so it wont detect NPCServer realated *****ings and let you debug your scripts like a man
Reply With Quote
  #6  
Old 09-02-2001, 12:06 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
If you code your own nukeshot, add this line:
if(isweapon&&deletenukeshot){
unset deletenukeshot;
destroy;
}

Voila.

Personally, I'd rather have setweapon weaponname;
__________________
"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
  #7  
Old 09-02-2001, 08:35 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 Tyhm
Personally, I'd rather have setweapon weaponname;
...

You mean a command to set the currently selected weapon? How about "selectedweapon=whatever;" ? I'm sure you can figure out how to achieve the same effect from there.
Reply With Quote
  #8  
Old 09-03-2001, 02:49 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
That would make sense, I suppose, except that = denotes an integer value, and I'm fairly certain the code
for(this.i=-;this.i<weaponscount;this.i++){
if(strequals(#w(this.i),Nukeshot)) selectedweapon=this.i;
}
would fail horribly.

I might have to try setplayerprop #w,Nukeshot; though. ^_^


Amazing....while that didn't work, this did!
if(hasweapon(Fishing Rod)){
while(!strequals(#w,Fishing Rod)&&selectedweapon>0) selectedweapon--;
if(selectedweapon=0){
while(!strequals(#w,Fishing Rod)) selectedweapon++;
}
}
It's pretty much bulletproof too, or so it seems...Yup! Works if the weapon it seeks is above or below the current selected one.
__________________
"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

Last edited by Tyhm; 09-03-2001 at 03:53 AM..
Reply With Quote
  #9  
Old 09-03-2001, 07:11 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
NPC Code:

for (i=0;i<weaponscount;i++) {
if (strequals(#w(i),Bow)) {
selectedweapon=i;
}
}


That would be how to find the Bow.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #10  
Old 09-03-2001, 12:34 PM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~The Fool~

Getting off topic here...

Anyway, I think a fromweapon command would be handy ^_^
Put an NPC in the starting levels or throughout the server to get rid of illegal NPCs, or the such... hmm...

<Various RCs> *starts to protest then realizes they wouldn't have to check accounts for illegal items* YAYYYYYY!
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #11  
Old 09-03-2001, 04:14 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 Tyhm
That would make sense, I suppose, except that = denotes an integer value, and I'm fairly certain the code
for(this.i=-;this.i<weaponscount;this.i++){
if(strequals(#w(this.i),Nukeshot)) selectedweapon=this.i;
}
would fail horribly.

I might have to try setplayerprop #w,Nukeshot; though. ^_^


Amazing....while that didn't work, this did!
if(hasweapon(Fishing Rod)){
while(!strequals(#w,Fishing Rod)&&selectedweapon>0) selectedweapon--;
if(selectedweapon=0){
while(!strequals(#w,Fishing Rod)) selectedweapon++;
}
}
It's pretty much bulletproof too, or so it seems...Yup! Works if the weapon it seeks is above or below the current selected one.
I dunno why the original one wouldn't work. What do you mean by "except that = denotes an integer value"?
Reply With Quote
  #12  
Old 09-03-2001, 09:42 PM
T3CK T3CK is offline
Banned
Join Date: Aug 2001
Location: Atlanta, GA
Posts: 557
T3CK is on a distinguished road
Send a message via AIM to T3CK Send a message via MSN to T3CK Send a message via Yahoo to T3CK
Methinks that either the flag-in-level or server-string-purge method is perfect for ALL WEAPONS. That way, to remove them, you just have to plop NPCs in a lot of levels, or with server-string-purge just one in a staff area with:

if(washit){
server.purgesystemv1=1;
}

where the version 1 system NPC being removed has:

if(server.purgesystemv1=1){
message Removing Outdated System NPC...;
sleep 3;
destroy;
}


Or you can set a server string with the current version of *System or *Bankcard or whatever...thus,

In the new version:

if(created){
...
server.systemversion=2
...
}

In the old version:

if(server.systemversion>1){
message Removing Outdated System NPC...;
sleep 3;
destroy;
}
Reply With Quote
  #13  
Old 09-03-2001, 10:13 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 T3CK
Methinks that either the flag-in-level or server-string-purge method is perfect for ALL WEAPONS. That way, to remove them, you just have to plop NPCs in a lot of levels, or with server-string-purge just one in a staff area with:

if(washit){
server.purgesystemv1=1;
}

where the version 1 system NPC being removed has:

if(server.purgesystemv1=1){
message Removing Outdated System NPC...;
sleep 3;
destroy;
}


Or you can set a server string with the current version of *System or *Bankcard or whatever...thus,

In the new version:

if(created){
...
server.systemversion=2
...
}

In the old version:

if(server.systemversion>1){
message Removing Outdated System NPC...;
sleep 3;
destroy;
}
Um... you do know what a server string is, don't you?
Reply With Quote
  #14  
Old 09-03-2001, 10:24 PM
SagaTCN SagaTCN is offline
Registered User
Join Date: Aug 2001
Location: West Michigan
Posts: 190
SagaTCN is on a distinguished road
Send a message via ICQ to SagaTCN Send a message via AIM to SagaTCN Send a message via Yahoo to SagaTCN
Eh..

Wasn't there a post by Stefan in which he stated that system NPCs and such would be automatically updated if a new version of the level was uploaded?
Reply With Quote
  #15  
Old 09-03-2001, 11:01 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
I think It would be quite usefull if removeweapon and addweapon had messagecode support.
__________________

subliminal message: 1+1=3
Reply With Quote
  #16  
Old 09-03-2001, 11:07 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
And maybe have removeweapon work clientside but only for weapons that dont have a * or an - in front of them
__________________

subliminal message: 1+1=3
Reply With Quote
  #17  
Old 09-03-2001, 11:46 PM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
....

If you dont want the player to have a weapon....put something in a systems weapon like

if (hasweapon(nukeshot) {putnpc gfx,dienukeshotdie.txt,x,y;
}
in the txt file...put
if (created || playerenters) {toweapons nukeshot; timeout = .1;
}
if (timeout) {
if (isweapon) {destroy;}
destroy;
}


And that will get rid of your nuke shot...or, it should atleast. Although, putnpc isnt the best of commands.
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
Reply With Quote
  #18  
Old 09-04-2001, 12:08 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
NEVAR USE PUT NPC!!!!! AAARRRRR!!!!!!

*catches breath* Sorry i jusyt hate that command deeply. Especially now that there is putnpc2 wich is SOOOO much better.

But if your non p2p i guess putnpc will have to do. But it would be so sucky to put lines of code in every weapon just so they can be deleted. Id rather have removeweapon clientside and allow messagecodes. Somuch EZer.
__________________

subliminal message: 1+1=3
Reply With Quote
  #19  
Old 09-04-2001, 12:14 AM
oscarjf1 oscarjf1 is offline
Registered User
Join Date: Aug 2001
Location: I live in the US
Posts: 107
oscarjf1 is on a distinguished road
Send a message via AIM to oscarjf1
Quote:
Originally posted by Falcor
NEVAR USE PUT NPC!!!!! AAARRRRR!!!!!!

*catches breath* Sorry i jusyt hate that command deeply. Especially now that there is putnpc2 wich is SOOOO much better.

But if your non p2p i guess putnpc will have to do. But it would be so sucky to put lines of code in every weapon just so they can be deleted. Id rather have removeweapon clientside and allow messagecodes. Somuch EZer.
*Cough* Lazy *Cough*
__________________
I speek on behalf of my staff.
~laterz

Lagoonia Staff
-Tiki God Of Power
Reply With Quote
  #20  
Old 09-04-2001, 12:32 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Efficiency is what counts. Putting the same line of code in every weapon isnt efficient. Its just stupid.
__________________

subliminal message: 1+1=3
Reply With Quote
  #21  
Old 09-04-2001, 12:33 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
And i am lazy for the fact that id rather not waist time on something that need not be done?
__________________

subliminal message: 1+1=3
Reply With Quote
  #22  
Old 09-04-2001, 04:50 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
NPC Code:

for(i=0; i<weaponscount; i++) if (strequals(#w(i),Bow)) {
selectedweapon = i;
break;
}



works
Reply With Quote
  #23  
Old 09-05-2001, 07:59 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
Ack! There really IS a weaponscount variable!
*dok*
__________________
"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
  #24  
Old 09-05-2001, 10:40 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
You didnt know that? *smacks Tyhm*


har har
__________________

subliminal message: 1+1=3
Reply With Quote
  #25  
Old 09-13-2001, 08:10 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

Is it just me, or did Stefan look at this thread and see it as something to do with setting the selected weapon?

Fromweapons would be good... as in, next version type good u.u
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #26  
Old 09-13-2001, 08:23 AM
JeffTL JeffTL is offline
Registered User
Join Date: Sep 2001
Posts: 374
JeffTL is on a distinguished road
I guess I should have used #v or something to read my server string there...silly me.
__________________
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 11:35 PM.


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