Stealing Script

Just wondering, I had a great idea for a script and if someone didn’t beat me to it yet then I might need some help.
-Basically when a player enters the level and touches and NPC, either one of the two things will happen:
1.Player successfully gets a couple gralats. No harm done.
2.The NPC displays the text: “Help!” (message: “Help!”;) above him and the player is attacked by baddy’s.

-Here’s how I plan on proceeding… Though not yet knowing what GS1 is capable or doing I’d like some advice. :slight_smile:
I-The options 1 & 2 are randomly generated, <-I’m guessing kind of like the NPC’s playing RPS (Rock Paper Scissors) against you on Graal Classic.
So if the players touches the NPC whatever happens, happens.

(Also if someone already had the idea and finished it up, could you link me to it…)
-Thanks.

I had that on Armonston and was planning to expand its use to most npcs and add a quest for instance where you were stranded and had to steal your way out of the area.

Let me dig for it.

Great :excited:

Ok it’s going to make tricxta belch (it was one of the first npcs I made for Armonston so it’s very unneficient)

Weapon:

if(created){
hide;
showlocal;
}
if(playertouchsme){
  toweapons Stealing Glove;
  hide;
}
if(weaponfired){
  //init
  setani steal,;
  freezeplayer .3;

  //up
  if(playerdir==0){
    this.targettiles = {lowerleft,playerx+1,playery-1}
    callnpc testnpc(this.targettiles[1],this.targettiles[2]),actionstolenfrom,;
  }

  //down
  if(playerdir==2){
    this.targettiles = {lowerleft,playerx+1,playery+4}
    callnpc testnpc(this.targettiles[1],this.targettiles[2]),actionstolenfrom,;
  }

  //left
  if(playerdir==1){
    this.targettiles = {lowerleft,playerx-1,playery+2}
    callnpc testnpc(this.targettiles[1],this.targettiles[2]),actionstolenfrom,;
  }

  //right
  if(playerdir==3){
    this.targettiles = {lowerleft,playerx+3,playery+2}
    callnpc testnpc(this.targettiles[1],this.targettiles[2]),actionstolenfrom,;

  }
}

Npc you can steal from:

if(actionstolenfrom&&this.stolenfrom==0){
lay2 greenrupee,playerx,playery;
this.stolenfrom = 1;
}

It’s pretty basic actually, it could probably be centralized on the weapon with the stealable npc only having an ID saying what can be stolen/that it can be stolen from. Oh, and as you noticed I didn’t script any randomness… I probably was going to go for a “press-the-right-button-at-the-right-moment” thing for when I was going to script that stealing town.

Oh, and I made a steal gani :slight_smile:
Pretty much the only thing you might want to reuse as is I guess.

Looks good, I just started GS1 a couple days ago, as I’m reading over it, I’m beginning to understand a bit of what it does though, what is the consequence if the player does not successfully “steal”. (You probably added it I’m just a crappy programmer at the moment.)

Edit: didn’t see your post.