Aller au contenu

Photo

getting item to drop ingame


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
Trionn

Trionn
  • Members
  • 4 messages
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

#2
Zenthar Aseth

Zenthar Aseth
  • Members
  • 655 messages
Wondering the same thing, I extracted 3 items that are .uti, how can I get them in game?

#3
Trionn

Trionn
  • Members
  • 4 messages
bump

Modifié par Trionn, 22 novembre 2009 - 12:29 .


#4
Dreadthreat

Dreadthreat
  • Members
  • 37 messages
*doublebump*

#5
Ultrazennn

Ultrazennn
  • Members
  • 81 messages
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;

}

}

}

#6
Trionn

Trionn
  • Members
  • 4 messages
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

#7
kaisertrigun

kaisertrigun
  • Members
  • 4 messages
yeah, do we exactly, create a new script, then apply, or just simply apply this script?

#8
kaisertrigun

kaisertrigun
  • Members
  • 4 messages
also, thanks for providing script :D

#9
kaisertrigun

kaisertrigun
  • Members
  • 4 messages
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.

Modifié par kaisertrigun, 22 novembre 2009 - 08:40 .


#10
Trionn

Trionn
  • Members
  • 4 messages
well i tryed opening the uti file and adding the script but that didnt work