Staff Block

I am looking to see if anyone has an advanced staff block NPC, with commands like message display, and removal by hitting etc, and any other useful or cool commands you may have.

Re: Staff Block

Not quiet sure what you mean by staff block. Just a npc for admins to do things like setplayerprop #C, message; and if(playerhit){setlevel jail.graal;} type of thing or what. Sorry If I'm not understanding right,

Re: Staff Block

By Staff Block, i mean a weapon i can use to lay blocks in front of me, and set a message to display when touched, etc and any other cool features … :stuck_out_tongue: kinda like on Era?

Re: Staff Block

Oh I see, never played Era. By the sounds of it, it's something like this.

// If you want it to constantly lay either a tile or object behind the player.
if (playertouchsme) {
toweapons blocklayer;
}
if(weaponfired){
if(this.status!=1){
this.status=1;
timeout=.1;
}
elseif(this.status==1){this.status=0;}
}

if (timeout&&this.status==1){
// use board if you want to use an undefined tile.
// board[64playery+playerx]=2470;
// board[64
playery+playerx+1]=2471;
// board[64*(playery+1)+playerx]=2486;
// board[64*(playery+1)+playerx+1]=2487;
// use Object if the tile has a name in the editor. (capitals matter)
putobject Bush,playerx,playery;
sleep .1;
updateboard playerx,playery,2,2;
timeout=.1;
}

//OR if you want it to just do it once.
if (playertouchsme) {
toweapons blocklayer2;
}
if(weaponfired){
putobject Bush,playerx,playery;
}

// You can add any tile to it pretty easy by going,
if (playertouchsme) {
toweapons blocklayer2;
setstring blocktype,Bush;
}
if(weaponfired){
putobject #s(blocktype),playerx,playery;
}
if (playerchats && startswith(setblock,#c)) {
tokenize #c;
setstring blocktype,#t(1);
setplayerprop #c,Set to #s(blocktype);
}

Re: Staff Block

Not really what I was looking for … but thanks. I need a block layer that displays the same chat I spoke when i layed it, and never changes for that block

Re: Staff Block

if(weaponfired){
setstring chattext = #c;
putnpc frog.png,chattext.txt,playerx,playery;
}

::in chattext.txt::
if(created||playerenters&&!this.runonce==1){
message #s(chattext);
this.runonce=1;
}

Re: Staff Block

O.o Whats really wierd was that when I gave up on this (before this post) and was trying out your script, I replaced it with my earlier attempts to make frogger lol.

Re: Staff Block

lol classy

Re: Staff Block

Hmm, I'm pretty sure this isn't the right place to ask, but here it goes; I am looking for an NPC (staff weapon) if you swing (like the sword swing) and hit them with it, it warps them to jail. Sounds pretty simple but I'm having some kind of trouble.

Re: Staff Block

Well, you could use a warp bomb instead that destroys itself after it warps itself

Re: Staff Block

I believe triggeraction would be the way to go. You make the sword trigger action the spot it should hit, and in the action script just put setlevel2 jail.nw,32,18;

Re: Staff Block

Hmmm… How would that look?

Re: Staff Block

In the reciever npc put, !Note: the recieving player must have this in an npc somewhere, sys npc or otherwise.

if (actionjail) {
setlevel2 jail.nw,32,18;
}


if(playertouchsme){
toweapons Jail Sword;
}

if(weaponfired){
if(dir==0){
showimg 2,swordup.png,playerx,playery-.5;
changeimgvis 2,3;
triggeraction playerx,playery-1,jail,;
}
if(dir==1){
showimg 2,swordleft.png,playerx-.5,playery-.5;
changeimgvis 2,3;
triggeraction playerx-1,playery-.5,jail,;
}
if(dir==2){
showimg 2,sworddown.png,playerx,playery+.5;
changeimgvis 2,3;
triggeraction playerx,playery+1,jail,;
}
if(dir==3){
showimg 2,swordright.png,playerx+.5,playery-.5;
changeimgvis 2,3;
triggeraction playerx+1,playery-.5,jail,;
}
sleep 0.5;
hideimg 2;
}

I'm sure you could do something much fancier for directions, but i'm lazy. Also instead of using a special sword showimg you could just do setani sword,; and add setplayerprop #1,jailsword.png;