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-nmm7 (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-nmm7 (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-nmm7 (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
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 


Messages In This Thread
Guild attack - Alias - 05-15-2012, 01:31 AM
RE: Guild attack - Barnabus - 05-15-2012, 02:06 AM
RE: Guild attack - Alias - 05-15-2012, 02:15 AM
RE: Guild attack - Barnabus - 05-15-2012 06:12 AM

Forum Jump:


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