Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 06-22-2012, 06:42 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
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?
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.