Page 1 of 1

Problem

Posted: Sat Jul 14, 2007 3:04 am
by Tethys
Hello,

I want to make a script .piss


What that mean? let me explain

So this command will work only when you will drink two potions. You need to .piss if you want to drink more potions. And you cannot use .piss command when you are frozzen. How to make it ? is it possible ?

Thanks for help !


Tethys

Posted: Sat Jul 14, 2007 11:15 am
by CWO
First you have to edit your potion drinking script. You have to set a prop to the player char to count how many potions they're able to drink. Then .piss can erase that prop making it reset.

Posted: Sat Jul 14, 2007 1:18 pm
by Tethys
CWO wrote:First you have to edit your potion drinking script. You have to set a prop to the player char to count how many potions they're able to drink. Then .piss can erase that prop making it reset.
Hello !

Hmm i got a .piss script but this script is in .ecl its works but if you are frozen and you when you will use .piss command it will unfreeze you. Is it possible to make a new diffrent function to block .piss command when you are frozzen or paralized ? When players will try to use .piss when they are paralized/frozzen they will see "you cannot use this command when you are paralized/frozzen"


Sorry for my english its my first time when im writing on "global" forum :)

Posted: Sat Jul 14, 2007 4:32 pm
by CWO
hmm... you're not setting anything to paralyzed or frozen right? It should be done like...

Code: Select all

     if (who.frozen || who.paralyzed)
          SendSysMessage(who, "You cannot use this command when paralyzed or frozen.");
          return;
     endif

Posted: Sun Jul 15, 2007 2:35 am
by Tethys
CWO wrote:hmm... you're not setting anything to paralyzed or frozen right? It should be done like...

Code: Select all

     if (who.frozen || who.paralyzed)
          SendSysMessage(who, "You cannot use this command when paralyzed or frozen.");
          return;
     endif

Hmm yes but i cant add it to script because that .piss script is in .ecl . I need to place it somewhere else(not into .piss) its possible ?

Posted: Sun Jul 15, 2007 2:48 am
by CWO
Its not possible. You'll have to script the entire command in src and add those lines.

Posted: Sun Jul 15, 2007 3:48 am
by Tethys
CWO wrote:Its not possible. You'll have to script the entire command in src and add those lines.
Hm.. could you help me with .piss script? its hard to make it? as i said its works like that:

You can drink only two potions, and after you'll drink them you need to piss.


Thanks :)

Posted: Sun Jul 15, 2007 8:19 pm
by CWO
Is there any delay? Anything more than just typing the command and being done with it? Do you know the name of the prop thats being set?

Code: Select all

use uo;
use os;

program piss(who)
     if (who.frozen || who.paralyzed)
          SendSysMessage(who, "You cannot use this command when paralyzed or frozen.");
          return;
     endif
     sleep(5);
     EraseObjProperty(who, "potions"); // <--- REPLACE "potions" with the propname that counts your potions
     SendSysMessage(who, "You unzip and water some of the local plantlife.");
endprogram

Posted: Sun Jul 15, 2007 10:46 pm
by Tethys
CWO wrote:Is there any delay? Anything more than just typing the command and being done with it? Do you know the name of the prop thats being set?

Code: Select all

use uo;
use os;

program piss(who)
     if (who.frozen || who.paralyzed)
          SendSysMessage(who, "You cannot use this command when paralyzed or frozen.");
          return;
     endif
     sleep(5);
     EraseObjProperty(who, "potions"); // <--- REPLACE "potions" with the propname that counts your potions
     SendSysMessage(who, "You unzip and water some of the local plantlife.");
endprogram
Thank you very much for help ! its works