Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  world bosses and happy hour  (Read 528 times)

0 Members and 0 Guests are viewing this topic.

Dolfo

« Reply #15 on: 05, January 2022, 21:24:19 »
Ok, but i only grapped a default mob, used a spawn point and put this in. I think i get a bugged one. My try was the first monster in list.
Object abomination_small
First it looked like he run away, but when seeing his arc definition, i think he tried to fight me with range weapon, without having one. There is no range attack skill in corpse.

randomitems loot;wealth_normal&D65;loot_base&D34;loot_magic&d12;loot_melee&d12

but he is defined with

has_ready_spell 1

looks like this triggers the default range ai and then ai can't find a spell?

ai_object i will try later, and yeah with my luck i used the friendly checkbox for one npc in town and one of my goals is to make the archer in guildhall auto heal players. And you say now, this is perhaps broken?  :P
« Last Edit: 05, January 2022, 21:26:07 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

_people_

« Reply #16 on: 05, January 2022, 21:31:27 »
Yep, I've just tested it - you're right, he's trying to cast a spell he doesn't have. Giving him an AI fixes it.
-- _people_ :)

Dolfo

« Reply #17 on: 19, January 2022, 12:09:31 »
I have implemented a global bonus object. A GM can mark an item and use /setbonusobject. When players kill non grey monsters, this bonus object is put in the corpse. Implemention is: We need a global object place first.
I put it in global.c
Code: [Select]
#include <global.h>
int global_exp_bonus = 0; // default exp bonus on server start in percent (-100 to 1000 or higher)
object_t *global_bonus_object=NULL;
then your ugly global extern definition in global.h
Code: [Select]
EXTERN int           global_exp_bonus; /* global exp bonus in percent -100 - +1000*/
EXTERN object_t  *global_bonus_object;
A gm command to load this object in gmaster.c
Code: [Select]
// set a global bonus object, object must be marked, not marked clear this
command_setbonusobject(object_t *op)
{
if (!op)
  return COMMANDS_RTN_VAL_ERROR;

if (global_bonus_object!=NULL) // to be save i used a second pointer before removing object
{
  object_t *temp = global_bonus_object;
  global_bonus_object = NULL;
  remove_ob(temp);
  ndi(NDI_UNIQUE, 0, op, "global bonus object = NULL");
}

object_t *mark;
if (!(mark = find_marked_object(op)))
{
  return COMMANDS_RTN_VAL_OK;
}

// object_t *newob = get_object(); // get_object flags objects with remove flag, we don't want our object will be removed at end of tick
object_t *newob = (object_t *) get_poolchunk(pool_object);
copy_object(mark, newob);

if (!newob)
  return COMMANDS_RTN_VAL_ERROR;

global_bonus_object = newob;
ndi(NDI_UNIQUE, 0, op, "%s %s set as global bonus object",global_bonus_object->name,global_bonus_object->title);
return COMMANDS_RTN_VAL_OK;
sproto.h
Code: [Select]
int command_setbonusobject(object_t *op);
commands.c
Code: [Select]
{"setbonusobject", command_setbonusobject,   0.0f, 1, NULL},
and finally implemention in KillMonster after loot is build in corspe in line 2104
Code: [Select]
if (global_bonus_object)
{
  object_t *newob = get_object();
  copy_object(global_bonus_object, newob);

  if (newob)
  {
    if (corpse) // we only give bonus when there is a valid corpse
    {
      insert_ob_in_ob(newob, corpse);
    }
  // normaly this is the place where we delete our not used object, but you like the dirty way
  // let's do more mess, object is flaged and will be removed on next tick.
  }
}
Of course this is only a prototyp, implemention on gm command could be improved. I also still try to learn your object behavior. This get_object and flag it to be removed, when it is not inserted before the tick, is really ugly fix for a really broken object handling. This shows me you have no good control of your generated objects at the places, where objects are builded and it took me again extra time, to find this behavior.  ???

When i call a function with a name get_object, i don't want my object deleted next tick. Ugly.  :o
« Last Edit: 19, January 2022, 13:24:33 by Dolfo »
Don't believe the shit, you hear in mainstream. Believe your own body. Your body is speaking always the true to you. But you need to understand your body. Hear to your body, not to your ego. And when body is calling to you: "Hey something is wrong!" find the reason(s) for that. Man in White don't go for that, they don't want to heal you. They want earn money and sell you medicine, you should take rest of your life. You are not the patient, you are their customer. Never forget this!

Tags:
 

Related Topics

  Subject / Started by Replies Last post
35 Replies
3734 Views
Last post 10, February 2007, 06:14:12
by Ellwoodblues
28 Replies
4823 Views
Last post 02, January 2009, 14:14:05
by Nite_Star
10 Replies
586 Views
Last post 08, May 2009, 16:07:27
by Nite_Star
8 Replies
3804 Views
Last post 19, September 2010, 04:59:55
by _etzio
1 Replies
71 Views
Last post 28, November 2021, 05:27:53
by Drunkmonkey2