![]() |
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. |
Re: Medal Maker
Quote:
|
Nice idea on the medal thing ;)
good idea for that medal thing heh heh
|
Re: Nice idea on the medal thing ;)
Quote:
|
~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 |
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 |
~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; } |
Thanks for the help everyone! =)
I will try these methods and see if they work |
| All times are GMT +2. The time now is 11:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.