Quote:
The -best- alternative I can offer you is have a listening NPC to add the empty bottle after the red potion has been used. But unfortunately, that'll only provide a solution in that level because offline GS1 doesn't support with(levelname) stuff. Here's what I mean:
Random NPC:
PHP Code:
if (created) {
x = 0;
y = 0;
setshape 1,32,32;
dontblock;
}
if (actionaddemptybottle) {
setimg eman_water_potion.png;
toweapons Empty Bottle;
hide;
}
if (destroy) {
destroy;
}
Empty Bottle:
PHP Code:
if (playerenters) {
show;
setimg eman_water_potion.png;
}
if (playertouchsme) {
toweapons Empty Bottle;
hide;
}
if (destroy) {
destroy;
}
Red Potion:
PHP Code:
if (playerenters) {
setimg eman_red_potion.png;
show;
}
if (playertouchsme) {
if (hasweapon(Empty Bottle)) {
toweapons Red Potion;
removeEmptyBottle();
hide;
}else {
say2 You need an empty bottle.;
}
}
function removeEmptyBottle() {
for (i = 0; i < weaponscount; i ++) {
if (strequals(#w(i),Empty Bottle)) {
callweapon i,destroy;
break;
}
}
}
if (weaponfired) {
playerhearts = playerfullhearts;
setplayerprop #c, *gulp*;
triggeraction 0,0,addemptybottle,0;
destroy;
}
Those three scripts WILL actually do what you want, but like I said, it'll only work in that level.
|
That will work but I have to put the random npc in every room

but it gets the job done and does what I want it to do. Also how would the random npc work in a gmap?