Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008094opensim[REGION] Scripting Enginepublic2016-12-14 16:032016-12-15 09:28
ReporterMandarinka Tasty 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Statuspatch includedResolutionopen 
PlatformUnix, Win, MacOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008094: New OSSL functions: osNpcSetProfileFirstLifeImage(LSL_Key npc, string image); osNpcSetProfileFirstLifeText(LSL_Key npc, string
DescriptionHello :)

The patch has been included.

The patch gives possibility to modify First Life tab in created NPC's profile.

Example of the script's code:

key npc = NULL_KEY;
string my_real_photo = "My Real Photo" // name of texture included in prim's inventory

default
{
    touch_start(integer num)
    {
        if(npc == NULL_KEY)
        {
            osOwnerSaveAppearance("MyClone");
            llSetTimerEvent(2);
        }
        else
        {
            osNpcRemove(npc);
            npc = NULL_KEY;
            llRemoveInventory("MyClone");
        }
    }
    timer()
    {
        llSetTimerEvent(0);
        npc = osNpcCreate("John","Smith",llGetPos()+<0,0,2>,"MyClone");
        osNpcSetProfileFirstLifeText(npc, "Scripted Agent");
        osNpcSetProfileFirstLifeImage(npc, my_real_photo);
    }
}
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics, ODE, BulletSim, ubODE
Script Engine
EnvironmentMono / Linux32, Mono / Linux64, Mono / Windows, Mono / OSX, .NET / Windows32, .NET / Windows64
Mono Version4.0.1
Viewer
Attached Filespatch file icon 0001-New-OSSL-functions.patch [^] (9,330 bytes) 2016-12-14 16:03 [Show Content]

- Relationships

-  Notes
(0031467)
Mandarinka Tasty (reporter)
2016-12-14 16:07
edited on: 2016-12-14 16:08

To make it run in OSGRID profile's system, one needs to download:

OpenSimProfile source, that can be taken from http://www.osgrid.org/index.php/downloads [^] [^] [^] [^] [^]

and replace line:

remoteClient.SendAvatarProperties(avatarID,
                                  ((INPC)(p.ControllingClient)).profileAbout,
                                  "5/25/1977",
                                  Utils.StringToBytes("Non Player Character"),
                                  "NPCs have no life.", 16,
                                  UUID.Zero, UUID.Zero, String.Empty, UUID.Zero);


with line:

remoteClient.SendAvatarProperties(avatarID,
                                  ((INPC)(p.ControllingClient)).profileAbout,
                                  ((INPC)(p.ControllingClient)).Born,
                                  Utils.StringToBytes("Non Player Character"),
                                  ((INPC)(p.ControllingClient)).profileFirstLifeText, 16,
                                  ((INPC)(p.ControllingClient)).profileFirstLifeImage,
((INPC)(p.ControllingClient)).profileImage,
String.Empty, UUID.Zero);

and next compile the source with this module.

After accepting this patch, appropriate profile dll library will be included

in OSGRID's distribution.

(0031470)
UbitUmarov (administrator)
2016-12-15 08:52

Sorry. NPCs do not have first life
(0031471)
Mandarinka Tasty (reporter)
2016-12-15 09:28

Ok :) No problem.

Anyone who would like to use my patch, please feel free to use it :)

- Issue History
Date Modified Username Field Change
2016-12-14 16:03 Mandarinka Tasty New Issue
2016-12-14 16:03 Mandarinka Tasty File Added: 0001-New-OSSL-functions.patch
2016-12-14 16:03 Mandarinka Tasty Status new => patch included
2016-12-14 16:04 Mandarinka Tasty Description Updated View Revisions
2016-12-14 16:07 Mandarinka Tasty Note Added: 0031467
2016-12-14 16:08 Mandarinka Tasty Note Edited: 0031467 View Revisions
2016-12-15 08:52 UbitUmarov Note Added: 0031470
2016-12-15 09:28 Mandarinka Tasty Note Added: 0031471


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker