[1st NPC] Pet Rental

WasteMan

Dedicated Member
Dedicated Member
This is my first NPc... Just learn't some commands and its pretty basic, I know.. But its ok for a first npc, aye? Here it is:

Edited it so it now works and doesn't untame ^^

Code:
[@main]
Hello <$USERNAME>\
You've heard mighty things?\
Well you've heard no lie..\
Yes, it is true I can bring mobs\
Into your power...\
But it isn't free!\
Whatcha' say?\
<Yes/@next> <Crazy man/@exit>

[@next]
Right, a believer eh?\
Good for you son\
What pets would you like?\
The better, the more expensive..\
Hope you've got some cash there <$USERNAME>\
<Aye I do/@pet> <No, Sorry./@exit>

[@pet]
#SAY
What level are you?\
<1-22/@22> <23-33/@33>\
<33-40/@40> <40-50/@50>\
<50-60/@60> <60-70/@70>\
<Or 70+/@80>\

[@22]
#SAY
Oh ok\
Best get leveling\
I have something for you\
It will only cost...\
Well, have it for free!\
<Ok/@ok> <Hmm, No ty/@exit>

[@ok]
#IF
checklevel 1
#ACT
RECALLMOB OmaWarrior 2
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

[@33]
#SAY
Oh, nice!\
Here, I hope it helps..\
At such a small fee of\
25k, it will pour the levels\
in... Whatcha' say?\
<Yeah SURE!/@sure> <No, FO./@exit>

[@sure]
#IF
checklevel 33
#ACT
Take gold 25000
RECALLMOB FireMinotaur 3
RECALLMOB FireMinotaur 3
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

[@40]
#SAY
Very good <$USERNAME>\
Well, at a fee of 100k\
I can summon 2 strong pets\
Well, I havent got all day!\
<Soz, Yeah Please!/@please> <Erm, No./@exit>

[@please]
#IF
checklevel 40
#ACT
Take gold 100000
RECALLMOB AxeOma 3
RECALLMOB AxeOma 3
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

[@50]
#SAY
You've been geeking it then eh?\
Only joking mate!\
Want some uber pets?\
These truely help alot!\
At a small fee of 250k\
Yeah?\
<Fo' Sho!/@50yes> <Lol, Or not./@exit>

[@50yes]
#IF
checklevel 50
#ACT
take gold 250000
RECALLMOB KingHog 3
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

[@60]
#SAY
Pfft, I look up to people like you..\
Anyways, back on buisness\
I can give you a NICE, lushious\
Kick ass mob, at a fee of 500k\
Well?\
<Hmph, OK/@60yes> <Maybe not../@exit>

[@60yes]
#IF
checklevel 60
#ACT
take gold 500000
RECALLMOB DarkDevil 3
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

[@70]
#SAY
Not much of a change now your this high\
But I can give you 2 DarkDevils now!\
Instead of 1... And, <$USERNAME>,\
At only 750k, And ermm\
Shh, I'll make them level 7!\
.....Well?\
<Fk YEAH!/@70yes> <I'll stick with solo/@exit>

[@70yes]
#IF
checklevel 70
#ACT
take gold 750000
RECALLMOB DarkDevil 7
RECALLMOB DarkDevil 7
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

[@80]
#SAY
My god sir <$USERNAME>\
You've grown so much!\
How can I help you my might friend?\
Pets you say?\
No problem, I'm feeling nice you see\
I'll give you a level 3 JinchonCaptain\
You WON'T regret it.\
At such a price of 1million\
<Yes you little rat/@80yes> <No, get some money!/@exit>

[@80yes]
#IF
checklevel 80
#ACT
take gold 1000000
RECALLMOB JinchonCaptain 3
#SAY
Syndicate2.3 - Enjoy Your New Pet <$USERNAME>!

thoughts?
/gelexx.
 
Last edited:

JoeAshton

Golden Oldie
Golden Oldie
Mar 4, 2006
641
1
124
lololol buged lol pets untame to soon and u can have as many pets as u like ?? ppl or ur server are buying DD letting them untame and killing for drops close server and wipe!
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
You need Checking Gold like this :

Code:
.... 
#IF
  CheckGold  100000
#ACT
  Take Gold 100000
#ELSEACT
  Goto @UserHaveNoGold

If you dislike to Many Pets Check have the User a Pet or not...
For a Basic Script is not bad...

Littel Tip : Make better Function name like this : [@Pet_Level_40] or [@Pet_Menue_1] [@Pet_Menue_2] and so one, it is better for you and latter to understand self fast your code ;-)
 

WasteMan

Dedicated Member
Dedicated Member
Erm.. I didn't know i had an online server :O
As i said, its my first NPC... And I think I know whats causing that to untame ^_^... Will re-edit when I cba.. Didn't exactly mean for you to use it, you can, but I was seeing whats right/wrong and how I can improve.. Lol ^_^..
/Gelexx.

edit:
You need Checking Gold like this :

Code:
....
#IF
  CheckGold  100000
#ACT
  Take Gold 100000
#ELSEACT
  Goto @UserHaveNoGold
If you dislike to Many Pets Check have the User a Pet or not...
For a Basic Script is not bad...

Littel Tip : Make better Function name like this : [@Pet_Level_40] or [@Pet_Menue_1] [@Pet_Menue_2] and so one, it is better for you and latter to understand self fast your code ;-)

I see what you mean - never thought about that - seen it about... But that makes sense to me now.. before i didn't know all this #ACT/#IF things lal... anyways n1 m8 - ta.
/Gelexx
 
Last edited:

NewHope

Golden Oldie
Golden Oldie
Nov 18, 2005
1,311
28
154
The RECALLMOB line is wrong.

RECALLMOB DarkDevil 2 7

The 2 is the level of the mob that spawns.
The 7 is the amount of minutes the pet will last for.

Therefore RECALLMOB DarkDevil 7 60 will allow the person to obtain a level 7 DarkDevil for 60 minutes.

To get 2 mobs spawned you just need to copy the line of text and paste it underneath.

Like so:
RECALLMOB DarkDevil 7 60
RECALLMOB DarkDevil 7 60

I think this is right, i have no way to check my scripts right now but im about 95% sure it is. If its not please post. :eek:
 

Akuma

Golden Oldie
Golden Oldie
Dec 6, 2006
628
15
125
Crap script, too basic, dats why things going wrong, if u need a good one give me a shout

VirUs
 

Archa

LOMCN Veteran
Veteran
Loyal Member
Nov 13, 2003
465
1
115
Bristol ,England
Crap script, too basic, dats why things going wrong, if u need a good one give me a shout

VirUs

who are u to piss on other peoples work???

get a life & stfu :tongue1:

/Darkunit

p.s script working nicley, i've edited alot on it tho :P. but just saved me writeing it out ^_^.
 
  • Like
Reactions: Shabalabalong

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
[@taopet2]
#IF
CHECKJOB TAOIST
CHECKSLAVECOUNT = 0
checkitem JTPiece 3
checkitem BDDShard 15
checkgold 1000000
#ACT
RECALLMOB GreenSpider2 1 120 0 0
RECALLMOB GreenSpider2 1 120 0 0
take JTPiece 3
take BDDShard 15
take gold 1000000
LINEMSG 6 "Enjoy, The pet will return to me after 2hours!"
#ELSEACT
LINEMSG 6 "You do not meet the requirements, dont fool me."

use soemthing like that
 

Whoops

LOMCN Member
May 13, 2015
155
2
45
how do you make it so just 1 rent allowed

---------- Post Merged on 26-05-2015 at 09:58 AM ---------- Previous Post was on 25-05-2015 at 05:08 PM ----------

Come on ppl Anyone no how to fix this problem
 

Ardbeg

Legend
Legendary
Aug 8, 2004
3,211
1
144
260
Southern England
If Bon's reply works, you have your solution. (I'm not 100% on Heroes NPC commands)

CHECKSLAVECOUNT = 0 is what you should be looking at.

Add a clause to the start of your script to test if CHECKSLAVECOUNT > 0 (or CHECKSLAVECOUNT >=1) then tell the user they already have a pet and can't have another.

You could also do it by adding the user to a namelist when they get a pet. Test with CHECKNAMELIST and respond accordingly.
 
Last edited:

Whoops

LOMCN Member
May 13, 2015
155
2
45
CHECKSLAVECOUNT. I get that thing I do t get is

Is there >
=
Nothing*

then a number at the end what does that do
0
1
Is there a 3*
 

Carribean

I abused the reputation system, now I'm stuck with
Veteran
Feb 18, 2013
640
9
80
how do you make it so just 1 rent allowed

---------- Post Merged on 26-05-2015 at 09:58 AM ---------- Previous Post was on 25-05-2015 at 05:08 PM ----------

Come on ppl Anyone no how to fix this problem
lol your the same person
 

Ardbeg

Legend
Legendary
Aug 8, 2004
3,211
1
144
260
Southern England
> means greater than, < means less than.
So if you say
Code:
  #IF
  CHECKSLAVECOUNT => 1
you're asking if the count equals or is greater than one, this is the same as saying it doesn't equal zero but, instead of just checking if there's one, it checks for any number higher than one. Some of your pet scripts were offering multiple pets.

You must check if these tests work on your files as different M2Servers can have different commands.
 
Last edited:

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,354
52
305
England
how do you make it so just 1 rent allowed

---------- Post Merged on 26-05-2015 at 09:58 AM ---------- Previous Post was on 25-05-2015 at 05:08 PM ----------

Come on ppl Anyone no how to fix this problem

Wow, old thread is old. Nice revival.

If you mean 1 pet in total (1 use) then use a flag or a namelist.

If you mean 1 pet at a time (multiple uses) then use checkslavecount.