Page 1 of 1

can i add the requirement = condition to

Posted: Thu Jan 23, 2014 6:45 pm
by KaL
i want to add the requirement = Condition to the usage_code = Action:

example: day hour >= X ( i want this in the usage_code= Action)

can you show how to do this?

i'm talking about the ingame "object" under Table
when you are about to create a new object.

i want to the player to purchase the object from the shop
and use it for a few hours then it will be removed from their inventory.

also how do i add the "duration" from the module "works" to the object as another feature. i did copy the table but don't know how to link it or add the extra roll box in the object creation for ingame.

Re: can i add the requirement = condition to

Posted: Thu Jan 23, 2014 8:28 pm
by a_bertrand
The game doesn't contain objects usable only for a given time. You will have to code it somehow. Keep in mind that if a player remove the item, the left usage should follow the object, so you must change basically all the item handling.

Re: can i add the requirement = condition to

Posted: Thu Jan 23, 2014 9:55 pm
by KaL
Actually I prefer it to follow the item. How about the "duration" feature? Just like the one on "works" module. Can I use phpmyadmin to create a table like that one? I want to use that feature and added to the object creation.

Re: can i add the requirement = condition to

Posted: Fri Jan 24, 2014 12:55 am
by KyleMassacre
Why not add something to a user variable like a time limit or something? This way when they use the item its gone and they have X amount of time to do something before it runs out.

I believe I showed you before where you can create a function in a lib file for a module and then add it to your wizard tables to execute the function(s). Then when you create your new object you have those as a condition (some sort of fucntion to check) and an action (this would add to the user variable).

Re: can i add the requirement = condition to

Posted: Fri Jan 24, 2014 4:44 am
by a_bertrand
Sure you can use phpmyadmin to create tables. Nothing that bad can happen. If you break everything, nothing prevent you to re-install the engine ;)