i have made an item and exported it but i cant seem to get it to drop ingame. can anyone tell me if i need a script or something for it to drop
getting item to drop ingame
Débuté par
Trionn
, nov. 20 2009 06:02
#1
Posté 20 novembre 2009 - 06:02
#2
Posté 20 novembre 2009 - 06:12
Wondering the same thing, I extracted 3 items that are .uti, how can I get them in game?
#3
Posté 20 novembre 2009 - 08:06
bump
Modifié par Trionn, 22 novembre 2009 - 12:29 .
#4
Posté 20 novembre 2009 - 08:13
*doublebump*
#5
Posté 20 novembre 2009 - 08:23
Couple ways to go about it. Probably the easiest way to is check out the script already used in game for drops, copy that script, create a new script and paste, and just substitute your unique ID.
There are also a couple of scripts floating around that will just make the item appear on your character the next time you log into the game, those are the ones I've been working on.
I haven't been working on dropped by mob scripts yet, but know what I know about how the game handles items, I'd think finding a similar script and just editing the unique ID would work fine. Of course their is a pretty good obstacle course of screwups you can get into when you start fiddling with the scripting in this game, most of it just remembering all the steps, and places where you need to change what's being called and from where.
Here's a simple script to get an item to show up in your inventory, it will also check to see if you have that item already, and if you do, won't give it too you every time you log in.
// All module events
#include "utility_h"
#include "wrappers_h"
#include "events_h"
void main()
{
event ev = GetCurrentEvent();
int nEvent = GetEventType(ev);
Log_Events("", ev);
switch (nEvent)
{
case EVENT_TYPE_MODULE_LOAD:
{
int iModuleLoaded = GetLocalInt(OBJECT_SELF, "prefix_youritemnamehere");
if (iModuleLoaded == 1)
break;
object oPlayer = GetHero();
int iItemCount = CountItemsByTag(oPlayer, "prefix_youritemnamehere");
if (iItemCount == 0)
UT_AddItemToInventory(R"prefix_youritemnamehere.uti",1);
SetLocalInt(OBJECT_SELF, "prefix_youritemnamehere", 1);
break;
}
default:
{
break;
}
}
}
There are also a couple of scripts floating around that will just make the item appear on your character the next time you log into the game, those are the ones I've been working on.
I haven't been working on dropped by mob scripts yet, but know what I know about how the game handles items, I'd think finding a similar script and just editing the unique ID would work fine. Of course their is a pretty good obstacle course of screwups you can get into when you start fiddling with the scripting in this game, most of it just remembering all the steps, and places where you need to change what's being called and from where.
Here's a simple script to get an item to show up in your inventory, it will also check to see if you have that item already, and if you do, won't give it too you every time you log in.
// All module events
#include "utility_h"
#include "wrappers_h"
#include "events_h"
void main()
{
event ev = GetCurrentEvent();
int nEvent = GetEventType(ev);
Log_Events("", ev);
switch (nEvent)
{
case EVENT_TYPE_MODULE_LOAD:
{
int iModuleLoaded = GetLocalInt(OBJECT_SELF, "prefix_youritemnamehere");
if (iModuleLoaded == 1)
break;
object oPlayer = GetHero();
int iItemCount = CountItemsByTag(oPlayer, "prefix_youritemnamehere");
if (iItemCount == 0)
UT_AddItemToInventory(R"prefix_youritemnamehere.uti",1);
SetLocalInt(OBJECT_SELF, "prefix_youritemnamehere", 1);
break;
}
default:
{
break;
}
}
}
#6
Posté 22 novembre 2009 - 12:29
i just got 2 questions to get the scribt to work do i make a script and add it to the item
and should i leve the prefix and just call it prefix_King Slayer or should it be the file name
and should i leve the prefix and just call it prefix_King Slayer or should it be the file name
#7
Posté 22 novembre 2009 - 08:26
yeah, do we exactly, create a new script, then apply, or just simply apply this script?
#8
Posté 22 novembre 2009 - 08:27
also, thanks for providing script
#9
Posté 22 novembre 2009 - 08:39
Eh... now im having trouble getting the script onto my item >.<
EDIT - Hmm... and i believe there was someway to use data files of a sort to just install correct? using daupdater.exe.
EDIT - Hmm... and i believe there was someway to use data files of a sort to just install correct? using daupdater.exe.
Modifié par kaisertrigun, 22 novembre 2009 - 08:40 .
#10
Posté 23 novembre 2009 - 07:19
well i tryed opening the uti file and adding the script but that didnt work





Retour en haut






