Author Topic: Insurance (Still needs work!)  (Read 57174 times)

Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #45 on: February 24, 2007, 09:20:11 am »
Very nice so far, some improvements I'd like to see are these:

PM user when his/her insurance is completely gone
Somehow show how much insurance a certain user has

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #46 on: February 24, 2007, 01:24:52 pm »
Ya, those are the exact ideas i have for it as well....who knows...maybe I will have enough spare time this weekend to figure out how to do that!
Don't tell me to get into shape...I have a shape...It is round!


Offline Kimojuno

Re: Insurance (Still needs work!)
« Reply #47 on: February 25, 2007, 03:58:51 am »
Very nice so far, some improvements I'd like to see are these:

PM user when his/her insurance is completely gone
Somehow show how much insurance a certain user has

I'm afraid I cannot be of much help, however how about having it so a user is PMed say five days before, a day before, and then right when it expires? This way they can keep track of it ahead of time, or if possible just add a counter to their profile so that someone can see someones insurance that way, and they can also find out manually that way. Being PMed five days before, a day before, and then right when it expires, would also help those who are just plain lazy.

Jeff.

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #48 on: February 25, 2007, 11:55:03 am »
well, the day timing won't work, because it sets a "counter" that degrades each time it is used...  I am working on something that would allow a user to see how many uses htey have left
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #49 on: March 05, 2007, 10:37:08 am »
The Rob the Bank item you uploaded isn't working for me :(

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #50 on: March 05, 2007, 12:07:20 pm »
it is generating any errors?
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #51 on: March 08, 2007, 06:26:05 am »
Yes, it is

If you want I can check which error, but I'm sure you know what error it is anyways :p

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #52 on: March 08, 2007, 08:28:42 am »
actually no...it seems to be working fine on my forum...let me attach my version and see if that fixes it for you...just remember to change the board number in the code for the item
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #53 on: March 10, 2007, 08:46:18 pm »
actually no...it seems to be working fine on my forum...let me attach my version and see if that fixes it for you...just remember to change the board number in the code for the item
Thanks so much

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #54 on: March 10, 2007, 11:33:50 pm »
You are very welcome!

Ok, I have added the tinsurance count so members can see how much they have left (This only show the particular member and noone else)
in shop.template.php find:
Code: [Select]
<b>',$txt['shop_money_in_pocket'],': </b>',$context['shop_money'],'<br />
',$context['shop_money_in_bank'],'<br />
add after:
Code: [Select]
';<b>',$txt['shop_money_in_pocket'],': </b>',$context['shop_money'],'<br />
',$context['shop_money_in_bank'],'<br />';
if ($context['shop_shieldleft'] > 5){
echo'
<b>',$txt['shop_insurance'],':</b> ',$context['shop_shieldleft'],'<br />';
}
elseif ($context['shop_shieldleft'] >1 && $context['shop_shieldleft'] < 5){
echo'
<font color="red">',$txt['shop_insurance_low'],'</font><br />
<b>',$txt['shop_insurance'],':</b> ',$context['shop_shieldleft'],'<b> ',$txt['shop_insurance_left'],'</b><br />';
}
else{
echo'
<font color="red">',$txt['shop_insurance_none'],'</font><br />
<b>',$txt['shop_insurance'],':</b> ',$context['shop_shieldleft'],'<b> ',$txt['shop_insurance_left'],'</b><br />';
}
echo'
in shop.php find:
Code: [Select]
// The current member's money
$result = db_query("SELECT money, moneyBank
add after:
Code: [Select]
, insurance
find:
Code: [Select]
$context['shop_money_bank'] = formatMoney($row['moneyBank']);
add after:
Code: [Select]
$context['shop_shieldleft'] = $row['insurance'];
add these strings to the shop.english.php
Code: [Select]
$txt['shop_insurance'] = "Dragon Shield";
$txt['shop_insurance_low'] = "Your Dragon Shield is getting low! You may want to stock up!";
$txt['shop_insurance_none'] = "You have no Dragon Shield...Be Warned, this makes you a target for those that like to steal!";
$txt['shop_insurance_left'] = "Remaining";

make sure to change them to reflect what you call the insurance on your forum.

this will display their current amount left as well as change what message displays based on how much they have left
Don't tell me to get into shape...I have a shape...It is round!


Offline Lew_Cipher

Re: Insurance (Still needs work!)
« Reply #55 on: March 15, 2007, 11:48:30 am »
Wow. Interesting thread. Is there a complete version somewhere so I can try to add this item or is TechnoDrago's code just above this post the complete code so far?

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #56 on: March 15, 2007, 11:55:17 am »
well, there is no complete installpackage if that is what you mean...the zip file i have at my site should add the item and the database field, but the code above has to be manually installed to have the current shield count show up for the member in the shop
Don't tell me to get into shape...I have a shape...It is round!


Offline xfollowthereaperx

Re: Insurance (Still needs work!)
« Reply #57 on: March 15, 2007, 12:03:06 pm »
Has anyone gotten one to work with Egg Avatar or Karma Bash?

Offline TechnoDragon

Re: Insurance (Still needs work!)
« Reply #58 on: March 15, 2007, 02:23:58 pm »
I haven't implemented it yet for either of those items, but I am sure it wouldn't be much harder than any of the other items
Don't tell me to get into shape...I have a shape...It is round!


Offline CRONUS

Re: Insurance (Still needs work!)
« Reply #59 on: March 16, 2007, 09:19:58 pm »
Karmagedon would be nice ;)