Quick question. I’m trying to implement a clan tax for
my guild system. I’d like it to take clan.taxrate of
the gold from killing a mob (mob’s wealth) and put it
into the clan.account. I have the code set up already.
I’m just not sure where I have to put it. I’m looking
through do_get, but can’t seem to figure it out.

 

  /* clan tax time */

 

  if ( ( is_clan(ch) ) &&
     (
clan_table[clan_lookup(player_clan(ch))].taxrate > 0 )
)
  {
       temp1 = ( obj->value[1] *
/* <---- I need the variable name of the mob’s wealth
*/
       (
clan_table[clan_lookup(player_clan(ch))].taxrate /
100) );

       if ( (temp1 > .5) && (temp1 < 1) )

                temp1 = 1;

 

            if ( (temp1 < .5) )

                temp1 = 0;

 

            if ( temp1 > 0 )

            {

                sprintf( buf, "{WYour clan taxes you
{Y%d {Wcoins.{x\n\r", temp1 );

                send_to_char( buf, ch );

 

               
clan_table[clan_lookup(player_clan(ch))].account +=
temp1;

                save_guilds( ch, "all" );

 

                ch->gold -= temp1;

            }

        }


-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to