Jump to content
Sign in to follow this  
telles0808

Spawn and Save NPC positions

Recommended Posts

Hello,

 

I'm new here on Hercules, so, I hope to be welcome =]

 

Last day I was playing with Hercules and trying to make my own NPCs and quests. Hopeful it was easy to write the NPC script, but not so easy to position the npc on the map.

 

Maybe it was my lack of experience, or, simple unaccustomed with the interface between client and server scripts.

 

But, was remembering about the first WOW private servers and how the GMs are able to place and script NPCs in game.

 

Well, maybe the first part of it could be added to the Hercules, so, you could be able to place a NPC in real time in front of you by giving the same syntax as the script do, them, another command to save it inside a NPC script file.

 

Should be nice, btw, alt+tab and script, alt+tab and reload scripts, should work good enough too.

 

That's a simple suggestion and maybe not the best.

 

If you catches the idea and know how to improve it, feel free to contribute.

Edited by telles0808

Share this post


Link to post
Share on other sites

It's doable, but using the client as a text editor would be awful... If you're having trouble to position a npc in the map just go to that place and type /where it'll give you your coordinates in-game. I'm not sure if you're aware of but there's an atcommand called @reloadscript.

Share this post


Link to post
Share on other sites

you can ask in the plugin/source mod request and someone can make a combination of getmapxy and writing the npc header in a .txt file, but I personally don't think that it is necessary to be in the main branch :P

 

 

@kidding

- script at_getnpc -1,{
OnInit:
bindatcmd("getnpc",strnpcinfo(0)+"::OnAtcommand",60,99);
end;
OnAtcommand:
getmapxy .@map$,.@x,.@y,0;
dispbottom "-------------------------";
dispbottom "[Posição]";
dispbottom ""+.@map$+","+.@x+","+.@y+"";
dispbottom "-------------------------";
dispbottom "[Olhar do NPC]";
dispbottom "1.0.7";
dispbottom "2.X.6";
dispbottom "3.4.5";
dispbottom "-------------------------";
end;
}
Edited by evilpuncker

Share this post


Link to post
Share on other sites

 

you can ask in the plugin/source mod request and someone can make a combination of getmapxy and writing the npc header in a .txt file, but I personally don't think that it is necessary to be in the main branch :P

 

 

@kidding

- script at_getnpc -1,{
OnInit:
bindatcmd("getnpc",strnpcinfo(0)+"::OnAtcommand",60,99);
end;
OnAtcommand:
getmapxy .@map$,.@x,.@y,0;
dispbottom "-------------------------";
dispbottom "[Posição]";
dispbottom ""+.@map$+","+.@x+","+.@y+"";
dispbottom "-------------------------";
dispbottom "[Olhar do NPC]";
dispbottom "1.0.7";
dispbottom "2.X.6";
dispbottom "3.4.5";
dispbottom "-------------------------";
end;
}

Amazing script! I'll try it today =]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.