Jump to content
MakeWebGames

Recommended Posts

Posted

I have not seen this around, but If I am wrong go ahead and link me to the page...

Would anyone be able to make a mod that :

Gives you maybe 3-5 items

Which give you a 10% or 20% of extra will for 5 or 10 mins

Something that can improve a users training.

If this can be made and is not hard to do, go crazy :P

If this is a good idea and worth making some money from making it, mail me with a price.

Posted

Re: Will Modification

This is an interesting idea.

I'd like it better if it put the will to 150% (or your own choice)

And like you say stays like it for a certain amount of time without deducting with gym workouts ect

Posted

Re: Will Modification

this is very simple to do...

create an item called whatever you want ie Will Drink...

set the effect 1 to on but leave the rest of the effect options blank...

make a note of what the item number is...

create a new field in the users table of database...

 

ALTER TABLE users ADD willtime INT(11) NOT NULL DEFAULT 0

 

open itemuse

find

 

if($r['effect1_on'])
{

 

add below it...

change 999 to the item number you just made...

 

if($r['itmid']==999)
{

$db->query("UPDATE users SET will=will+will/2,willtime=10 WHERE userid={$userid}");
}

 

note.

will=will+will/2 will increase their will by 50%

will=will+will/4 will increase their will by 25%

willtime=10 will be 10 minutes (change to suit)

open up your cron_minute...

add

 

$db->query("UPDATE users SET willtime=willtime-1 WHERE willtime>0");
$db->query("UPDATE users SET will=maxwill WHERE willtime=0");

 

there you go job done...

Posted

Re: Will Modification

 

just make an item that gives them 10%, 20% will :wink:

It won't go to 150 % it would just refill it until the use it.

We need an item that is added through a Sql I believe.

Like the Taser mod, it's an item and it works for a set amount of mins.

Normal will is 100%

Say you make the item a drink.

A user drinks a drink and instead of 100% will they get 150% will for 10 mins.

drink 1 - 150%

drink 2 - 200%

drink 3 - 300%

If someone is thinking about making it, you need to make it so only one drink can be drank at a time.

Posted

Re: Will Modification

 

this is very simple to do...

create an item called whatever you want ie Will Drink...

set the effect 1 to on but leave the rest of the effect options blank...

make a note of what the item number is...

create a new field in the users table of database...

 

ALTER TABLE users ADD willtime INT(11) NOT NULL DEFAULT 0

 

open itemuse

find

 

if($r['effect1_on'])
{

 

add below it...

change 999 to the item number you just made...

 

if($r['itmid']==999)
{

$db->query("UPDATE users SET will=will+will/2,willtime=10 WHERE userid={$userid}");
}

 

note.

will=will+will/2 will increase their will by 50%

will=will+will/4 will increase their will by 25%

willtime=10 will be 10 minutes (change to suit)

open up your cron_minute...

add

 

$db->query("UPDATE users SET willtime=willtime-1 WHERE willtime>0");
$db->query("UPDATE users SET will=maxwill WHERE willtime=0");

 

there you go job done...

 

You posted just before me lol

I will try this out, wish me luck.

Oh would there be a way to make it so that only one drink could be used at a time?

Posted

Re: Will Modification

to make it so only one drink can be used at a time...

change

 

if($r['itmid']==999)
{

$db->query("UPDATE users SET will=will+will/2,willtime=10 WHERE userid={$userid}");
}

 

to

 

if($r['itmid']==999)
{


if($ir['willtime'] > 0){die("Sorry only one drink can be drank at a time");}
else
{
$db->query("UPDATE users SET will=will+will/2,willtime=10 WHERE userid={$userid}");
}
}
Posted

Re: Will Modification

I like it, And made one lol

Go me, but the will does not last as soon as you train it goes

I'd like to make it stay at 150% for the whole 5 mins even when training

Posted

Re: Will Modification

ok i think this is what you mean...

open gym.php

find

 

$db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid");
   $db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid");

 

change to

 

$db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid");
if ($ir['willtime'] > 0)
{
   $db->query("UPDATE `users` SET energy = energy - {$_POST['amnt']} WHERE `userid` = $userid");
}
else
{
$db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid");[/
}

Posted

Re: Will Modification

Hey Strats do you mind posting your code?

Or

If you want to sell it PM me with a price :)

Oh and yes it would be great to be able to train without using ANY will while using this.

Not only would it be a great additional item but a great donation item.

 

EDIT: Someone posted before this so dont know the accuracy of this comment

Posted

Re: Will Modification

 

Hey Strats do you mind posting your code?

Or

If you want to sell it PM me with a price :)

Oh and yes it would be great to be able to train without using ANY will while using this.

Not only would it be a great additional item but a great donation item.

 

EDIT: Someone posted before this so dont know the accuracy of this comment

 

what you on about mate i've just posted this for anyone to use lol

not using any will while using this item i have just posted

Posted

Re: Will Modification

Shrek I get an error for the gym now

Parse error: syntax error, unexpected '[' in /home/*****/public_html/gym.php on line 47

Which is :

$db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid");[/

 

Is it something to do with : $userid");[/ ?

maybe [/] ?

Posted

Re: Will Modification

 

Hey Strats do you mind posting your code?

Or

If you want to sell it PM me with a price :)

Oh and yes it would be great to be able to train without using ANY will while using this.

Not only would it be a great additional item but a great donation item.

 

EDIT: Someone posted before this so dont know the accuracy of this comment

If someone makes something for me I would never sell it.

Posted

Re: Will Modification

 

$db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid");
if ($ir['willtime'] > 0)
{
   $db->query("UPDATE `users` SET energy = energy - {$_POST['amnt']} WHERE `userid` = $userid");
}
else
{
$db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid");
}

 

the [/ shouldn't have been there dunno where it came from :?

Posted

Re: Will Modification

I did that but for some reason the first try it chose not too work lol

It works perfect now :)

One more question lol

If I want to make another drink do I add the same thing to item use again, just different item number ect?

I don't need to put a new Sql in do I?

Posted

Re: Will Modification

 

I did that but for some reason the first try it chose not too work lol

It works perfect now :)

One more question lol

If I want to make another drink do I add the same thing to item use again, just different item number ect?

I don't need to put a new Sql in do I?

just different item number and then add the edit into itemuse again. with the new item number...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...