The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Guild attack
Author Message
Alias
Journeyman
*

Posts: 107
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2012
Reputation: 0



Post: #1
Guild attack
Hi, could some1 help me creat function on=@hittry, on=@spellcast and corpse looting, when if player is in a guild then he can't attack or loot players from his guild .
Thanks
05-15-2012 01:31 AM
Find all posts by this user Like Post Quote this message in a reply
Barnabus
Journeyman
*

Posts: 124
Likes Given: 0
Likes Received: 3 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #2
RE: Guild attack
There could be a problem there...

If you cant loot your guild mates corpse, then all you can do is watch the enemy loot him.
Which is bad espically when he is wearing the armour he borrowed from you Tongue

Also if your guild mate is paraylsed, how can you free him if your cannot hit him?
(This post was last modified: 05-15-2012 02:06 AM by Barnabus.)
05-15-2012 02:06 AM
Find all posts by this user Like Post Quote this message in a reply
Alias
Journeyman
*

Posts: 107
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2012
Reputation: 0



Post: #3
RE: Guild attack
(05-15-2012 02:06 AM)Barnabus Wrote:  There could be a problem there...

If you cant loot your guild mates corpse, then all you can do is watch the enemy loot him.
Which is bad espically when he is wearing the armour he borrowed from you Tongue

Also if your guild mate is paraylsed, how can you free him if your cannot hit him?
In my server it's normal when player's can't loot another player's if they are in one fraction and about paralyze
here trapepd i use for paralyze Smile

[itemdef i_trapped_pouch]
id=i_reag_serpent_scale
Name=Trapped Belt Pouch
VALUE=100
type=t_normal

on=@create
color=00

on=@CLICK

IF (<CONT>!=<SRC.FINDLAYER.21.UID>)
SRC.SYSMESSAGE This item must be in your backpack.
RETURN 1
ENDIF

IF (<SRC.FLAGS>&4)
SRC.DAMAGE <eval({30 50})>,1,<uid>
SRC.EFFECT=3,i_FIRE_COLUMN,6,15,1
src.flags &= ~statf_freeze
src.findid.i_rune_paralyze.remove
src.findid.i_rune_paralyze_field.remove
remove 1
ENDIF
05-15-2012 02:15 AM
Find all posts by this user Like Post Quote this message in a reply
Barnabus
Journeyman
*

Posts: 124
Likes Given: 0
Likes Received: 3 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #4
RE: Guild attack
Oh I see

Heres an Idea, im a bit rusty so if i make any mistakes hopefully someone will correct me.

ARGO is the Corpse that is created when a character dies.
I and SRC are both the guy that died.
http://wiki.sphere.torfo.org/index.php/@DeathCorpse

A Corpse will not tell you what guild it came from, so this is the first thing we must do.

Get the players guild UID on the corpse :
Using TAG.TheGuildIWasFromUID
Code:
ON=@DeathCorpse
    IF <GUILD.UID>
        SERV.UID.<ARGO.UID>.TAG.TheGuildIWasFromUID = <GUILD.UID>
    ENDIF

Next lets think about what happens, how does a corpse get looted?

Someone DClicks on the corpse to open it...

Ok So why not use ON=@ITEMDCLICK in the main player event ?
Where Act is the Item and I is the clicker..
http://wiki.sphere.torfo.org/index.php/@ItemDClick

Now how are we going to know that the item the player is clicking on is a corpse?
- we could check its ID, i_corpse or its type t_corpse

But what if there is a live player in the same guild called i_corpse?
- we could check it isnt a player

Code:
ON=@ITEMDCLICK
    IF <GUILD.UID>
        IF !<ACT.IsPlayer>
            IF <ACT.TYPE> == t_corpse
                IF <GUILD.UID> == <ACT.TAG0.TheGuildIWasFromUID>
                     SAY @35 You cannot loot your own guild mates.
                     RETURN 1 // The corpse should not open!
                ENDIF
            ENDIF
        ENDIF
    ENDIF

I imagine something like that might do the trick ^^
05-15-2012 06:12 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)