tutorial on adding function= wizard_action and wizard_logic?

General Chat, Comments
Post Reply
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

tutorial on adding function= wizard_action and wizard_logic?

Post by KaL »

Can anybody make a tutorial on adding new features or function on the wizard_action and wizard_logic? there's a few things i want to add:

timeExpired= expired an item object

BlockItem= block an item from selling,trade and send

NewCurrency= add,withdrawl new currency from player or clan bank

Tax= tax feature allow the setting in the amount in percentage form
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: tutorial on adding function= wizard_action and wizard_lo

Post by a_bertrand »

None would actually work like that... it will be much harder... item time as said need quite some work and same for the others as far as I can tell.
Creator of Dot World Maker
Mad programmer and annoying composer
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: tutorial on adding function= wizard_action and wizard_lo

Post by KaL »

Yes! It is hard but I was able to use work module to require "item x" and run the "duration" for time and use the "Effect" table to removed "item::InventoryRemove('item x',1);" this works but if the item is removed from the inventory doing the time frame running. It will cause a script error= stated no such item. So I figure if i can block the item from dropping, sending, and trading this will solve my problem. So far I was able to disable send and drop but not
Trade. By the way I love your wizard table!!! I'm going to see if I can modify it to yell out "hello world" as a wizard_action. Baby step ;)
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: tutorial on adding function= wizard_action and wizard_lo

Post by KyleMassacre »

KaL wrote:Yes! It is hard but I was able to use work module to require "item x" and run the "duration" for time and use the "Effect" table to removed "item::InventoryRemove('item x',1);" this works but if the item is removed from the inventory doing the time frame running. It will cause a script error= stated no such item. So I figure if i can block the item from dropping, sending, and trading this will solve my problem. So far I was able to disable send and drop but not
Trade. By the way I love your wizard table!!! I'm going to see if I can modify it to yell out "hello world" as a wizard_action. Baby step ;)
I don't think people would make a tutorial on the wizards like you want because it basically just applies to you. when I get a chance I'm more than willing to show how to maybe "create" some conditions or actions since it really isn't that tough.

Now, I suppose this all goes together but from every conversation I have had with you about this particular thing where you are requiring some sort of item, WHY?

Sure you can do that but I believe the method in the item class is really supposed to be or was intended to be used as like a "questing" thing. For example you enter the dungeon and have tons of key but you require a certain key. Flag them that they don't have it before hand. But again this is my interpretation of It and you can do what you wish.

Now here is what you should do and what I told you to do:
You need a uservariable, and a lib.php file. And for this you can use the funcs for putting someone in the hospital/jail as a template for your function(s) inside your lib.php. And what you want to do is a function to check if they have a certain amount of time left.on their user variable much like IsInJail (). And create a function that will edit the user variable much like PutInJail ().

Now In your condition table you want to sort of use the others as a template here as well and add in your function that checks for their time. Remember this should be a (bool).

Now in your actions you can add your function to update the uservariable and when you.do that you can then create an item and for the item action you would select that.

Now when a player uses this item the timer will start per se` and update the uservariable.

Ta-Da!!!! There is the first installment of the wizards table tutorial.
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: tutorial on adding function= wizard_action and wizard_lo

Post by KaL »

To tell you the truth Kyle, after reading this paragraph. I'm still lost! :lol: But no worries, i didn't give up. So I decided to make a copy of Alain "Jail" Module to "ExpireTime" Module. I basically copy everything and just change the name around. Just to see for myself if that would work. And what do you know it works! I even learn how to add the "Wizard table" to some of the module on the config.xml -I can't believe it! i finally got it to work. I guess i really have to jump into the pool and learn to swim the hard way. :lol: :lol: :lol: Maybe after i finish my game or so, I'll make a an outline tutorial- step by step for the next guy that is coming off the street. Thanks again! :D :mrgreen: :D
Post Reply

Return to “General”