Coding Desert Treasure:
I'm coding the part where the player adds the diamonds to the obelisk and it requires a change in objectID. I am able to change it when the item is used, but I am wondering how to update the player files or what not to make it permanent so that it doesn't resort back to the default.
Code:
case 6482:
if(itemId == 4670) { //blood pillar
c.getItemAssistant().deleteItem(4670, 1);
c.getActionSender().sendMessage("The diamond is absorbed into the pillar...");
Objects o = (Objects) Server.objectHandler.getObjectByPosition(3220, 2909);
Server.objectHandler.removeObject(o);
Server.objectHandler.createAnObject(6484,3220, 2909);
}
case 6491:
if(itemId == 4673) { //shadow pillar
c.getItemAssistant().deleteItem(4673, 1);
c.getActionSender().sendMessage("The diamond is absorbed into the pillar...");
Objects o = (Objects) Server.objectHandler.getObjectByPosition(3220, 2885);
Server.objectHandler.removeObject(o);
Server.objectHandler.createAnObject(6493, 3220, 2885);
}
case 6488:
if(itemId == 4671) { //ice pillar
c.getItemAssistant().deleteItem(4671, 1);
c.getActionSender().sendMessage("The diamond is absorbed into the pillar...");
Objects o = (Objects) Server.objectHandler.getObjectByPosition(3244, 2885);
Server.objectHandler.removeObject(o);
Server.objectHandler.createAnObject(6490, 3244, 2885);
}
break;
case 6485:
if(itemId == 4672) { //smoke pillar
c.getItemAssistant().deleteItem(4672, 1);
c.getActionSender().sendMessage("The diamond is absorbed into the pillar...");
Objects o = (Objects) Server.objectHandler.getObjectByPosition(3244, 2909);
Server.objectHandler.removeObject(o);
Server.objectHandler.createAnObject(6487, 3244, 2909);
}
break;
However, obviously, when i log out and back in, it resorts back to the default load ins. How can i change it such that the players progress in adding the diamonds is saved?
cheers!