![]() |
Small NPC Help please
I made a small npc so as long as the player had this npc in his/her inventory they could say like /add 10 gralet etc..... yet i dont know how to do it so that its if the player has the weapon, i knowh owt o do it if its weaponfired but not by chat if they are holding the weapon yet i can do it while it is on the ground somewhere in the level. can anyone please explain to me the certain commands I can use to get it to work for when the player is holding the weapon.
:) |
playerchats, same as if it were on the ground.
|
hasweapon(name) perhaps?
|
I'm a little confused on what you mean. You want a weapon that drops things only when its a weapon and you have it?
NPC Code: Is that around what you need? |
Im not sure if what you said was what i needed but
hasweapon ended up working and this was my final script if (playertouchsme){ toweapons Stuff Adder!; } if (hasweapon(Stuff Adder!)) if (playerchats&& strequals(#c,Add 1000)){ players[index].rupees+=1000; } but for some reason it adds 2000? |
Because you say it several times. Try using "setplayerprop #c,;" after players[index].rupees+=1000. Maybe it also could be useful using tokenize to define how much the player wants.
|
Quote:
|
You also need to use if (playerchats) before if (hasweapon()).
|
Quote:
|
All times are GMT +2. The time now is 05:25 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.