![]() |
I need some help with this...
I'm having some problems with the following script, i don't see what's wrong, please help me...
// NPC made by Cyrin setimg beer.png if (playertouchsme) toweapons Dagger; if (weaponfired) { if (strequals(#s(client.equipment),fists)){ setstring client.equipment,dagger; setplayerprop #c,Equipped Dagger; setstring client.weaponpower,2;} if (strequals(#s(client.equipment),dagger)){ setstring client.equipment,fists; setplayerprop #c,Unequipped Dagger; setstring client.weaponpower,1;}} The beer stuff isn't in th original script >.> And you also need to set a flag "client.equipment=fists". |
you don't need those "#s()"s around the string, I don't remember if that'll kill the script or not, but don't use them there
|
Re: I need some help with this...
Quote:
Quote:
|
That didn't help, it even stopped the script from working :o
|
Nobody else spotted this?
NPC Code: Use some kind of small modification like this to check whether or not the equipment has already been changed. Oh, and have the default weapon set automatically. NPC Code: |
OMG, other than the two obvious facts:
(1) You didn't even put if (created). That is like a BIG no-no to put just setimg like that x-x (2) It's a flat out bish to read, you didnt' really use any formatting! x-x But other than that, I thought it would be obvious. If you tell it if you are using fists, then it switches to a dagger, but then directly underneath it checks it to switch a dagger to a fist. It changes it to a dagger, but then right back. There is a little thing known as return; that is very helpful x-x ---Shifter |
Re: I need some help with this...
Quote:
|
Re: Re: I need some help with this...
Quote:
|
I followed the aid of Growlz and... succeeded! :)
|
Re: Re: I need some help with this...
Quote:
I just realized I have not once had to check my own strings in any script I have ever made!!! Gyayayaya, and to think I've scripted for almost 3 years now! |
Re: Re: Re: I need some help with this...
Quote:
|
Re: Re: Re: I need some help with this...
Quote:
|
Re: Re: Re: Re: I need some help with this...
Quote:
|
Re: Re: Re: Re: Re: Re: I need some help with this...
Quote:
|
if (created) variable=5*5;
evaluation? |
All times are GMT +2. The time now is 09:47 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.