Small QoL update for RS3 servers; Changing the home teleport button text with a varbit sent based on lodestone.
Go from this:
To this:
This is the varbit you need to send:
Code:
getVarsManager().sendVarBit(41, previousLodestoneVarbit);
Using this decompiled script 10905, you can replace the variable (int) previousLodestoneVarbit with the lodestone you need:
Code:
/*
* Script decompiled by jagdecs2 v3.5
* Decompiler opts:
* --------------
* t1LocalAnalyzer:true
* t2LocalAnalyzer:true
* beautifier:true
* --------------
* Made by mgi125 ;)
*/
void script_10905(int a0) {
string var1;
string var0 = "";
switch (domain_0['cfg3'].bitcfg41) {
case 1:
var1 = "Bandit Camp";
break;
case 2:
var1 = "Lunar Isle";
break;
case 3:
var1 = "Al Kharid";
break;
case 4:
var1 = "Ardougne";
break;
case 5:
var1 = "Burthorpe";
break;
case 6:
var1 = "Catherby";
break;
case 7:
var1 = "Draynor";
break;
case 8:
var1 = "Edgeville";
break;
case 9:
var1 = "Falador";
break;
case 10:
var1 = "Lumbridge";
break;
case 11:
var1 = "Port Sarim";
break;
case 12:
var1 = "Seers' Village";
break;
case 13:
var1 = "Taverley";
break;
case 14:
var1 = "Varrock";
break;
case 15:
var1 = "Yanille";
break;
case 16:
var1 = "Canifis";
break;
case 17:
var1 = "Eagles' Peak";
break;
case 18:
var1 = "Fremennik Province";
break;
case 19:
var1 = "Karamja";
break;
case 20:
var1 = "Oo'glog";
break;
case 21:
var1 = "Tirannwn";
break;
case 22:
var1 = "Wilderness Volcano";
break;
case 23:
var1 = "Ashdale";
break;
case 24:
var1 = "Prifddinas";
break;
case 26:
var1 = "Menaphos";
break;
default:
var1 = "Previous Destination";
}
_if_setop(2, a0, var1);
return;
}
I won't provide the exact method on how you will do this to function properly. You must add that yourself. But just a little tip, to send this varbit on login and everytime a player uses the lodestone network.