Problem

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Tethys
New User
Posts: 9
Joined: Sat Jul 14, 2007 2:37 am

Problem

Post 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
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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.
Tethys
New User
Posts: 9
Joined: Sat Jul 14, 2007 2:37 am

Post 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 :)
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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
Tethys
New User
Posts: 9
Joined: Sat Jul 14, 2007 2:37 am

Post 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 ?
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

Its not possible. You'll have to script the entire command in src and add those lines.
Tethys
New User
Posts: 9
Joined: Sat Jul 14, 2007 2:37 am

Post 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 :)
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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
Tethys
New User
Posts: 9
Joined: Sat Jul 14, 2007 2:37 am

Post 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
Post Reply