Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   #g problem (https://forums.graalonline.com/forums/showthread.php?t=16022)

Googi 11-03-2001 03:46 AM

#g problem
 
Is there a way to use the #g string (or any other script), to make an NPC do something only if the person is NOT in a specific guild.

(For example, everyone in a room without a specific guild tag has 5 halfhearts of damage done to them)

Xaviar 11-03-2001 03:54 AM

Re: #g problem
 
Quote:

Originally posted by Googi
Is there a way to use the #g string (or any other script), to make an NPC do something only if the person is NOT in a specific guild.

(For example, everyone in a room without a specific guild tag has 5 halfhearts of damage done to them)

There is a special operator specifically for things like that, it is the !, or the "Not operator"..It will reverse the true/false value of whatever it is assigned to. so if (!strequals(#g,guildname)) { stuff; }

Poogle 11-03-2001 05:30 AM

Re: #g problem
 
Quote:

Originally posted by Googi
Is there a way to use the #g string (or any other script), to make an NPC do something only if the person is NOT in a specific guild.

(For example, everyone in a room without a specific guild tag has 5 halfhearts of damage done to them)

if (strequals(#g, Pirate Crew )) {
hurt 5;
} (hopefully that above goes online lol)

Vinvect 11-03-2001 05:31 AM

'!' before actions means when its not true, or when its not running.:D

Xaviar 11-03-2001 05:58 AM

Poogle: he wanted it to do it to anyone except for a specific guild

Vinvect: Umm, sort of, what it does is if something is false, it makes it true, and if its true, it makes it false, "means when its not true, or when its not running" doesn't work as a complete sentance.

Python523 11-03-2001 07:13 AM

You could do this:
if (strequals(#g,Pirate Crew)) {playerhearts+=5;}
else
{hurt 10;}

SSRobgeta 11-03-2001 08:08 AM

A Quote:
One who dies... Well... Dies

TDO2000 11-03-2001 10:04 AM

Now we know what u want >=(

mhermher 11-03-2001 04:50 PM

if (!strequals(#g,GUILD NAME HERE)) {
hurt 5;
{


All times are GMT +2. The time now is 08:52 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.