Level

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Level

Post by runtest »

I have this in checklevel.inc.

Code: Select all

use uo;

function CheckExp(who)
	var player_exp := GetObjProperty(who, "Exp");
	
	case( player_exp )
		500:
			SetObjProperty(who, "Level", 1);
			SendSysMessage(who, "You have increased in experience.", color := 65 );
			break;
		1500:
			SetObjProperty(who, "Level", 2);
			SendSysMessage(who, "You have increased in experience.", color := 65 );
			break;
		4500:
			SetObjProperty(who, "Level", 3);
			SendSysMessage(who, "You have increased in experience.", color := 65 );
			break;
		default:
			break;
	endcase
endfunction
It does not seem to work though. Is there something here I am missing?
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Glancing quickly..


If you're testing the value using the text command to set it, it is probably being set as a string. Try CInt() around where you get the custom property.
Post Reply