![]() |
new (weird) idea
is it possible to make a NPC that makes the player like
sleepy hungry and dirty if so can someone post the script ohh and it would be great if it could be noticed by other players |
yes it is
yes it is possible
but like I am not going to make the code (usually when I show people coding on the forum I do it all off the top of my head) well it deals with some flags ie client.sleep=100 and you could have something like 100 = full sleepness. and like if they are at 100 then they can't walk and just start to sleep on the ground.. (you would have to make your own sleep gani because the sleep gani only shows the head) |
if(playerenters) toweapons -System;
if(isweapon||timeout){ if(strequals(#m,sleep)){ setstring sleepy,#v(strtofloat(#s(sleepy))-1); }else{ setstring sleepy,#v(strtofloat(#s(sleepy))+0.01); } if(playerswimming){ setstring dirty,#v(strtofloat(#s(dirty))-1); }else{ setstring dirty,#v(strtofloat(#s(dirty))+0.01); } setstring hungry,#v(strtofloat(#s(dirty))+0.01); //insert what effect these strings have here timeout=0.05; } Then for all food items, setstring hungry,#v(strtofloat(#s(hungry))-10); or so. Note: It is possible under this system to stockpile cleanliness and sleep and food...not necessarily a bad thing, but you probably want to put SOME limits on how negative hungry and dirty and sleepy can be. |
thats great but there is a problem with that script the player would be constantly Sleeping hungry and Dirty
whats the timer command |
what about make it with day/night script?
|
or you could
you could make the timeout longer...
like insted of timeout=0.05 but like timeout=5 |
what about it random?
|
that wouldn't be hard to program in also
that wouldn't be hard to program in also
NPC Code:if(playerenters) toweapons -System; |
| All times are GMT +2. The time now is 07:26 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.