Granting Items?

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Granting Items?

Postby Paradox » Wed Oct 06, 2010 4:09 pm

sinkillerj wrote:
Pavitra wrote:Perhaps it would be a good idea if you explained where you were ultimately trying to go with this. I strongly suspect that the problem is much easier than you think.

The main goal is a open MagiQuest shard, no ages from the official, only user generated content. Most of the work is done, animations converted, GUI's made, etc. You can see more by requesting to join our dev forums on TMD, recruitment topic is in my signature. But given the nature of the shard no uru ages can be present, thus comes the problem that cleft activates blackbar. Changes that normally could not be included in a simple fan age can be done in this so don't be afraid to suggest python edits. We also welcome any of you to join the team, right now we have only 3 members including myself who are familiar with age creation and other plasma editing, the rest are simply MagiQuest fans.

Okay, as I suspected it is done in the Age Python code ( in this case)

Code: Select all
    def OnFirstUpdate(self):
        vault = ptVault()
        entry = vault.findChronicleEntry(kIntroPlayedChronicle)
        if (type(entry) != type(None)):
            PtSendKIMessage(kEnableKIandBB, 0)
            PtSendKIMessage(kDisableKIandBB, 0)

This checks if the user has seen the intro video. If they have, it enables the blackbar. If not, it keeps the bar disabled and shows the intro video GUI.

If you don't already have an Age Python file, you can simply create a file from a template (PlasmaShop 2.x has good templates if I recall). Then add the OnFirstUpdate function as above :)

EDIT: Erm, actually, if you're just replacing the Cleft files, decompyle the Cleft.pyc file and change that function so that it doesn't check the Vault entry.
"And one day I woke to find the future held no place for me. I was unwanted in a world, that with my hands I'd helped to build. Where once was honesty and pride, I now stand broken and alone."
Posts: 1261
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Granting Items?

Postby sinkillerj » Wed Oct 06, 2010 4:14 pm

Paradox wrote:Okay, as I suspected it is done in the Age Python code ( in this case)

Thanks Paradox, dont know how I missed such a simple command.
User avatar
Posts: 7
Joined: Mon Oct 04, 2010 7:02 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest