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-14-2001, 04:57 AM
Blaikie Blaikie is offline
Registered User
Join Date: Nov 2001
Posts: 6
Blaikie is on a distinguished road
Medal Maker

I am making an NPC that lays Gold, Silver and Bronze NPC medals.

The medals are just for show in the players inventory it's mainly for my guild but i'm having some problems with certain areas.

It's just a simple script, I can get the NPC to lay all the medals
but only once and then never again! I am also trying to make it so that I can only operate the NPC and no one else.
It would be great if someone could help me out.

-Lay the medals more than once!
-Only I can operate the NPC!


Medal layer -

if (playerenters && !strequals(#a,this.owner))
setlevel2 houseoutside.graal,35.5,14;

if (playerenters) {show;
}
if (playerchats&&strequals(#c,Gold Medal) {
show();

}

if (playerenters&&!strequals(#a,this.owner))
setlevel2 houseoutside.graal,35.5,14;

if (playerenters) {show;
}
if (playerchats&&strequals(#c,Silver Medal) {
show();



}

if (playerenters&&!strequals(#a,this.owner))
setlevel2 houseoutside.graal,35.5,14;

if (playerenters) {show;
}
if (playerchats && strequals(#c,Bronze Medal) {
show();



Medals -



if (playerenters) {
}
if (playertouchsme) {
}

if (playerenters) hide;
if (strcontains(#c,Gold Medal)) show;



if (playerenters) {
}
if (playertouchsme) {
dontblock;
toweapons Gold Medal;
toinventory flag;
hide;
}

if (weaponfired) {
say2 This is a Gold Medal!;
i = strtofloat(#s(Ammo)) - 1;
play goal.wav;
if (i == 0) {
setstring Ammo,;


}
setstring Ammo,#v(i);
}

if (weaponfired)
damage = 1.damage;
damagegetype = 1;
this.active = 1;




The silver and bronze medals are just the same as above.
__________________
"Life is like an ashtray, full of little doubts!"

-mØØnÇãLƒ
Reply With Quote
  #2  
Old 11-14-2001, 05:15 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Re: Medal Maker

Quote:
Originally posted by Blaikie
I am making an NPC that lays Gold, Silver and Bronze NPC medals.

The medals are just for show in the players inventory it's mainly for my guild but i'm having some problems with certain areas.

It's just a simple script, I can get the NPC to lay all the medals
but only once and then never again! I am also trying to make it so that I can only operate the NPC and no one else.
It would be great if someone could help me out.

-Lay the medals more than once!
-Only I can operate the NPC!


Medal layer -

if (playerenters && !strequals(#a,this.owner))
setlevel2 houseoutside.graal,35.5,14;

if (playerenters) {show;
}
if (playerchats&&strequals(#c,Gold Medal) {
show();

}

if (playerenters&&!strequals(#a,this.owner))
setlevel2 houseoutside.graal,35.5,14;

if (playerenters) {show;
}
if (playerchats&&strequals(#c,Silver Medal) {
show();



}

if (playerenters&&!strequals(#a,this.owner))
setlevel2 houseoutside.graal,35.5,14;

if (playerenters) {show;
}
if (playerchats && strequals(#c,Bronze Medal) {
show();



Medals -



if (playerenters) {
}
if (playertouchsme) {
}

if (playerenters) hide;
if (strcontains(#c,Gold Medal)) show;



if (playerenters) {
}
if (playertouchsme) {
dontblock;
toweapons Gold Medal;
toinventory flag;
hide;
}

if (weaponfired) {
say2 This is a Gold Medal!;
i = strtofloat(#s(Ammo)) - 1;
play goal.wav;
if (i == 0) {
setstring Ammo,;


}
setstring Ammo,#v(i);
}

if (weaponfired)
damage = 1.damage;
damagegetype = 1;
this.active = 1;




The silver and bronze medals are just the same as above.
Firsit oh all you need { and }
Reply With Quote
  #3  
Old 11-14-2001, 10:52 AM
SlayerOfDarkness SlayerOfDarkness is offline
Registered User
Join Date: Nov 2001
Location: I kinda forgot
Posts: 24
SlayerOfDarkness is on a distinguished road
Send a message via ICQ to SlayerOfDarkness Send a message via AIM to SlayerOfDarkness Send a message via Yahoo to SlayerOfDarkness
Talking Nice idea on the medal thing ;)

good idea for that medal thing heh heh
__________________

bya? -my ary take and die!
Reply With Quote
  #4  
Old 11-14-2001, 08:52 PM
TDK_Admin1 TDK_Admin1 is offline
Registered User
Join Date: Nov 2001
Location: Northern Harkoonia
Posts: 33
TDK_Admin1 is on a distinguished road
Re: Nice idea on the medal thing ;)

Quote:
Originally posted by SlayerOfDarkness
good idea for that medal thing heh heh
*watchers slayer copy and paste the script into level editor*
__________________
-Shard IceFire-
Reply With Quote
  #5  
Old 11-15-2001, 10:33 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~

I rarely suggest this, but you might want to consider just using putnpc for that... unless you know arrays enough to do it that way... :-P
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #6  
Old 11-16-2001, 04:29 AM
Redwizard Redwizard is offline
Official Graal Oldbie
Redwizard's Avatar
Join Date: Oct 2001
Location: South Wales, United Kingdom
Posts: 601
Redwizard is on a distinguished road
Send a message via ICQ to Redwizard Send a message via AIM to Redwizard Send a message via MSN to Redwizard Send a message via Yahoo to Redwizard
Or a simple way of tiying it up is to create the medal script itslef on a .txt file in your graal folder, and then have ur usual weaponfired script like:
if (weaponfired) {putnpc gfx.gif,medal.txt,x,y,;
}
that will take care of your laying only once problem. sry, but thats all i know
Reply With Quote
  #7  
Old 11-16-2001, 04:52 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~

I just noticed... but why oh why are you using a variable to keep track of how many medals you have? You could easily solve that problem by using:

toweapons /the-medal; (yes, include the /)

and

if (weaponfired){
blahblah;
destroy;
}
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #8  
Old 11-17-2001, 06:13 AM
Blaikie Blaikie is offline
Registered User
Join Date: Nov 2001
Posts: 6
Blaikie is on a distinguished road
Thanks for the help everyone! =)


I will try these methods and see if they work
__________________
"Life is like an ashtray, full of little doubts!"

-mØØnÇãLƒ
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 04:13 AM.


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