scn name
short choose1
short choose2
short choose3
short button1
short button2
short button3
short upgrade
short downgrade
short change
short swordlevel
begin onactivate
if player.getitemcount SCHWERT1==1
messagebox"Was wollt ihr tun?" "Schwert aufwerten" "nichts tun"
set swordlevel to 1
set choose1 to 1
elseif player.getitemcount SCHWERT2==1 || player.getitemcount SCHWERT3==1 || player.getitemcount SCHWERT4==1 || player.getitemcount SCHWERT5==1 || player.getitemcount SCHWERT6==1
messagebox"Was wollt ihr tun?" "Schwert aufwerten" "Schwert abwerten" "nichts tun"
set choose2 to 1
elseif player.getitemcount SCHWERT7==1
messagebox"Was wollt Ihr tun?" "Schwert abwerten" "nichts tun"
set choose3 to 1
else
messagebox"Ihr besitzt nicht den nötigen Gegenstand"
endif
end
begin gamemode
if choose1==1
set button1 to getbuttonpressed
if button1==0
set upgrade to 1
set choose1 to 0
set button1 to 5
elseif button1==1
set choose1 to 0
endif
elseif choose2==1
set button2 to getbuttonpressed
if button2==0
set upgrade to 1
set choose2 to 0
elseif button2==1
set downgrade to 1
set choose2 to 0
elseif button2==2
set choose2 to 0
endif
elseif choose3==1
set button3 to getbuttonpressed
if button3==0
set downgrade to 1
set choose3 to 0
set button3 to 5
elseif button3==1
set choose3 to 0
endif
endif
end
begin gamemode
if upgrade==1
set swordlevel to (swordlevel + 1)
set change to 1
set upgrade to 0
elseif downgrade==1
set swordlevel to (swordlevel - 1)
set change to 1
set downgrade to 0
endif
if change==1
if swordlevel==1
player.additem SCHWERT1 1
set change to 0
elseif swordlevel==2
player.additem SCHWERT2 1
set change to 0
elseif swordlevel==3
player.additem SCHWERT3 1
set change to 0
elseif swordlevel==4
player.additem SCHWERT4 1
set change to 0
elseif swordlevel==5
player.additem SCHWERT5 1
set change to 0
elseif swordlevel==6
player.additem SCHWERT6 1
set change to 0
elseif swordlevel==7
player.additem SCHWERT7 1
set change to 0
endif
else
return
endif
end