I was Wondering on How to make a verb or system on how do i make a way for somone who is donating power or hp points to the other person for a certain amount of time like say 5 mins or so and then it turns back to the owner of the power.
Thanks for the headstart
ID:168225
Nov 23 2005, 9:46 am
|
|
Nov 23 2005, 9:52 am
|
|
In response to Mysame
|
|
Now i get this error when i define the proc switch
mob/proc/switch() and i get powerlend.dm:9:error:switch :invalid proc name: reserved word Heres the coding mob/verb/Lend(mob/M in view()) |
In response to Govegtos
|
|
Remove the switch proc from the input. When inputing a number, the switch proc is not neccesary.
|
In response to Kija
|
|
So like this
mob/verb/Lend(mob/M in view()) ??? |
In response to Govegtos
|
|
Without the outer parenthesis.
|
In response to Govegtos
|
|
You might want to incorporate some factors such as not enough power to lend, or to give back.
mob/verb/Lend(mob/M in view()) |
In response to Govegtos
|
|
Govegtos wrote:
Now i get this error when i define the proc switch Considering switch wasn't a reserved word and all, what do you think defining mob/proc/switch() would have done? Especially if you kept it empty. |
In response to Blakdragon77
|
|
No that'd still be buggy. What if one of the players log out? You'd have to mess have mob/Login() and call a proc for both players rather than continuing on in the verb.
|
In response to DeathAwaitsU
|
|
mob/Logout() |
In response to Mysame
|
|
Not really. We've only defined lending in a verb, not as a variable for mobs.
Plus mob/Logout() has problems. |
In response to Govegtos
|
|
Programming by cookbook. Wonderful. *cough*
|
In response to DeathAwaitsU
|
|
Then it should be called in client/Del(), in a way that actually works. You could just have the proc check for the M.client, and if it's not there, you can load up the savefile and remove it from there, or just add it to the player and add the person's key that has logged out into a list. Check for the key upon client/New() or mob/Login() and take away the associated number from that user's powerlevel, and remove it from the list.
|