ID:149175
 
i've made my cobat code and its working nicely, now i wonder if anyone knows how to make it so when i level up the user can add battle points to their stats? like in RaeKwon's game Temple of Time.
DthKllr wrote:
i've made my cobat code and its working nicely, now i wonder if anyone knows how to make it so when i level up the user can add battle points to their stats? like in RaeKwon's game Temple of Time.

mob
verb
Train_Battle_Points()
set category = "Actions"
traintp
if (usr.tp > 0)
var/tp1 = input("Below, pick a stat that you wish to train, you currently have [usr.tp] Battle Points.", "**Train Battle Points**") in list ("Health","Magic","Strength","Defense","Dexirity","Agility","Gold","Nothing")
if (tp1 == "Health")
var/Healthtobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < Healthtobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (Healthtobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= Healthtobe1
Healthtobe1 *= 1
usr.Health += Healthtobe1
usr.MaxHealth += Healthtobe1
usr << "You gain [Healthtobe1] health"
if (usr.tp > 0) goto traintp
if (tp1 == "Magic")
var/Magictobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < Magictobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (Magictobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= Magictobe1
Magictobe1 *= 1
usr.Magic += Magictobe1
usr.MaxMagic += Magictobe1
usr << "You gain [Magictobe1] Magic"
if (usr.tp > 0) goto traintp
if (tp1 == "Strength")
var/strtobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < strtobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (strtobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= strtobe1
usr.maxdamage += strtobe1
usr << "You gain [strtobe1] strength"
if (usr.tp > 0) goto traintp
if (tp1 == "Defense")
var/strtobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < strtobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (strtobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= strtobe1
usr.DEF += strtobe1
usr << "You gain [strtobe1] defense"
if (usr.tp > 0) goto traintp
if (tp1 == "Gold")
var/strtobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < strtobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (strtobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= strtobe1
usr.gold += strtobe1
usr << "You gain [strtobe1] Gold."
if (usr.tp > 0) goto traintp
return
if (tp1 == "Dexirity")
var/Magictobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < Magictobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (Magictobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= Magictobe1
usr.DEX += Magictobe1
usr << "You gain [Magictobe1] Dexirity"
if (usr.tp > 0) goto traintp
return
if (tp1 == "Agility")
var/Magictobe1 = input("How many Battle Points you like to use? Currently: [usr.tp] Battle Points.") as num
if (usr.tp < Magictobe1)
usr << "[src]: Sorry not enough Battle Points."
return
if (Magictobe1 < 0)
usr << "Cant enter negative numbers."
return
usr.tp -= Magictobe1
usr.AGI += Magictobe1
usr << "You gain [Magictobe1] Agility"
if (usr.tp > 0) goto traintp
return


thats from ToT
Lets hope you didn't try and Copy TOT's combat *cracks knuckles* =)

RaeKwon