There is his Attack_Shop code:
mob/NPCs/Trainer/verb
Attack_Shop()
set src in oview(1)
set category = "Leveling"
if(length(usr.Attack) == 0)// as you levelup more attacks are added to usr.Attack
usr<<"You can not get anymore attacks at this level"
return
var/obj/Attacks/attack = input("Whict attack do you want to buy?","[src]:")in usr.Attack
var/Price = attack.PBI
switch(alert({"It will cost [Price] gold([usr.Gold]) to level your [attack.name] up.
Are you sure?"},"[src]:","Yes","No"))
if("No") return
if("Yes")
if(usr.Gold < Price)
usr<<"You need [Price-usr.Gold] more gold!"
return
usr.Gold -= Price
attack.Lv += 1
usr.Attack -= attack
usr.Attacks += attack
usr.verbs += /obj/Attacks/proc/Use// Use(attackname as text)
attack.suffix = "Lv[attack.Lv]"
gol
var/L = input("","") in list("Atk2","Atk3","Atk4","Atk5","Atk6","Atk7","Atk8","Atk9","Atk10","Cancel")
if(L == "Cancel") return
if(winget(usr,L,"Command") == "true")
switch(alert("You have attack([winget(usr,L,"Command")]) in button [L]","","Yes","No","Cancel"))
if("No") goto gol
if("Cancel") return
if("Yes")
winset(usr,L,"Command=Use \"[attack.name]\"")
winset(usr,L,"text=[attack.name]")
else
winset(usr,L,"Command=Use \"[attack.name]\"")
winset(usr,L,"text=[attack.name]")
world<<"[winget(usr,L,"Command")]"// outputs "Use " not "Use "attack1""
In my interface I've 10 attack buttons ("Atk1"-"Atk10") "Atk1" is peset to a basic attack the others are empty
I'm trying to make it when an attack is bought the user can set it to one of the Atk buttons but I need some help
Thank you for looking & any help be nice
Prf X