Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Add-On] The Way Of NPC Scripting.

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

New update. Some style added.
 
Initiate Mage
Joined
May 24, 2010
Messages
4
Reaction score
0
Re: Big NPC Scripting tutorial

Wow ... i must say that this tutorial ....you put it a lot of effort into making this ! i haven't read it yet but I think its good ! i will read it when I have time =] and Also ... it would also be nice if you could make this into a file ? and let us download it .. just like BazzCreative said =] i would definitely read this ! I'm a newb in scripting lol .. i have a server but I dont know anything about coding lol.. though i wanna learn it.
 
Dead & gone...
Joined
Aug 22, 2008
Messages
269
Reaction score
5
Re: Big NPC Scripting tutorial

Well, good effort.

It's evident that there are still some architectural technicalities that you don't completely understand due to the way you've explained certain things, but with that being said, well done.
 
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

Well, good effort.

It's evident that there are still some architectural technicalities that you don't completely understand due to the way you've explained certain things, but with that being said, well done.


Yes, I know. I'm still learning so I can guarantee I've made some mistakes in the tutorial, but if people does at least learn from this guide, it's good to me.

Wow ... i must say that this tutorial ....you put it a lot of effort into making this ! i haven't read it yet but I think its good ! i will read it when I have time =] and Also ... it would also be nice if you could make this into a file ? and let us download it .. just like BazzCreative said =] i would definitely read this ! I'm a newb in scripting lol .. i have a server but I dont know anything about coding lol.. though i wanna learn it.

Thanks. I will be making a file for you to download when nothing else is coming in my way.
 
Last edited:
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

New update:
Downloadable guide added
 
Experienced Elementalist
Joined
Dec 27, 2009
Messages
254
Reaction score
86
Re: Big NPC Scripting tutorial

Added to library.
 
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

Thanks. I hope even more people will get help from this guide.
 
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

Yeah, I hope. Thanks.
 
Newbie Spellweaver
Joined
Jun 18, 2010
Messages
17
Reaction score
0
Re: Big NPC Scripting tutorial

i was just wondering how i can use the text from cm.sendGetText that the user inputed??
 
bleh....
Loyal Member
Joined
Oct 15, 2008
Messages
2,898
Reaction score
1,129
Re: Big NPC Scripting tutorial

i was just wondering how i can use the text from cm.sendGetText that the user inputed??

PHP:
function start() {
	cm.sendGetText("What's my name?");
}

function action(m,t,s) {
	if (m > 0) {
		var answer = cm.getText();
		if (answer == "shawn") { // I think this is how you do it -_-
			cm.sendOk("Yay");
		}else{
			cm.sendOk("Boo");
		}
		cm.dispose();
	}
	cm.dispose();
}
 
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

i was just wondering how i can use the text from cm.sendGetText that the user inputed??
I think I did mentoin that in the guide but very well. Devon told you how to do.

PHP:
function start() {
	cm.sendGetText("What's my name?");
}

function action(m,t,s) {
	if (m > 0) {
		var answer = cm.getText();
		if (answer == "shawn") { // I think this is how you do it -_-
			cm.sendOk("Yay");
		}else{
			cm.sendOk("Boo");
		}
		cm.dispose();
	}
	cm.dispose();
}
Thanks for helping me answer questions when I'm not on :)
 
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

How do i spawn a mob?

The command is cm.spawnMonster();. Found it in get's guide, if you wanna know.
You can find out more in the cm. commands spoiler. I've added it in there.
If you want to spawn a mob without the help of a npc, type "!spawn <Mob id>" for a temporary spawn or "!pmob <Mob id>" for a permanent spawn without quotes in game.
 
Last edited:
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

Bump. Anyone needs help or have any questions? Just ask!
 
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
78
Reaction score
51
Re: Big NPC Scripting tutorial

Well thank you :)
 
Newbie Spellweaver
Joined
Apr 21, 2008
Messages
75
Reaction score
4
Re: Big NPC Scripting tutorial

I'm getting back into private servers after 2 years and I'm having a small problem. I made three NPCs using the same basic code with cm.haveItem(ID, amount); and the first one I made works fine. The other two do the same thing regardless if I have the item or not. I made it so if you have an item you can warp, and if you don't have it you don't warp. But it warps me either way. I can't think of a way to fix it, any ideas?
 
Status
Not open for further replies.
Back
Top