Raised This Month: $ Target: $400
 0% 

NPC Shop (alpha 0.3)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 03-03-2013 , 12:36   NPC Shop (alpha 0.3)
Reply With Quote #1

Hello everybody,

I'm planning for a NPC shop module. You can request features now
I talked to alongib, he will add needed natives on 1.1.1-alpha.
Note: This plugin is experimental and can change total during development.

Commands (preview):

sm_npcshop_admin - Opens admin main menu for this module.
sm_npcshop_create - You will be able to spawn only a default shop, for custom NPCs you need to edit mapconfigs here: configs/shops/maps/<mapname>.cfg
sm_npcshop_delete - Delete NPC Shop you're looking at from your mapconfig
sm_npcshop_deleteall - Delete all NPC Shops from your mapconfig

Cvars:

sm_npcshop_version
sm_npcshop_enable "1"
sm_npcshop_canfollow "0" // 0=disable, 1=all, 2=red team, 3=blue team (like hostages in css)
sm_npcshop_teamid_red "2"
sm_npcshop_teamid_blue "3"

Events (preview):

You will be able to add dynamics for chat. Look whichone are provided each event (exampe: "{shopname}: {playername} welcome to my shop.").

OnBuyItem - {shopname} {playername} {credits} {creditsleft} {itemname}
OnBuyFailed - {shopname} {playername} {reason} {credits} {creditsleft} {itemname}
OnShopCommand - {shopname} {playername}
OnNpcShopTouch - {shopname} {playername}
OnNpcShopHurt - {shopname} {playername}
OnNpcShopInRange - {shopname} {playername}
OnNpcShopOutRanged - {shopname} {playername}

Events Settings (preview):

Also you can add settings for events to customize them at bit more: (example: "notifiyall, center")
text_notifyall - print text msg. to all players
text_notifyinrange - print text msg. to all player which are in range for the same npc shop
center - print text msg. to center text instead of using chat
sound_playeronly - plays event sound on to a player instead of using it as an ambient sound

Settings (preview):

Code:
"NPCShops"
{
"Shop1" //Shopname
{
"health" "0" // default 0 for godmode //repsawn on round start
"range" "500" // max. range to unlock shop (0 only on touch)
"model" "models/barney.mdl" //npc model path
"buyzone" "0" //set this to "1" if you like to enable buyzone for player which are in range
"x" "0.0"
"y" "0.0"
"z" "0.0"
"default_animation" "<animationname>" //this animation will apply if no other animation is triggered or last animation ends
"<eventname>_animation" "<animationname>" //set interactive animations
"<eventname>_sound" "<filepath>" //play a sound
"<eventname>_text" "<animationname>"
"<eventname>_settings" "<settings>"
}
}
Animations:

You can list all Animation strings with Hammer Editor for each model you like to use.
Some models don't have animations!

Shop Interaction:


Shop will open if a player is in range.
Players can press USE while in range to open shop menu or use !store or !shop.
In other words: the shop is unlocked while in range.

PHP Code:
Changelog:

03/03/13 v0.1a
-first alpha code

03
/03/13 v0.2a
-added animation stuff
-added shop range
-added example config

03
/04/13 v0.3a
-added hurt animation 
-fixed some bugs
-prevented hostage follow/hurt/etc.
-
added new npc shop examples 


# READ FIRST: #
This plugin is NOT stable and ONLY a PREVIEW and does not contain all features listed above.
If you like to use this on your public server wait for a stable or at least beta.


Last edited by asherkin; 01-14-2015 at 20:01.
zipcore is offline
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 03-03-2013 , 12:46   Re: NPC Shop (status: planning)
Reply With Quote #2

That would be a really great feature, looking forward to it
__________________
Arrow768 is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 03-03-2013 , 14:06   Re: NPC Shop (status: planning)
Reply With Quote #3

For what game going to be?
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 03-03-2013 , 14:38   Re: NPC Shop (status: planning)
Reply With Quote #4

Quote:
Originally Posted by Franc1sco View Post
For what game going to be?
ANY, maybe some features won't work for some games, but main support is CS:S

Last edited by zipcore; 03-03-2013 at 14:38.
zipcore is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 03-03-2013 , 14:55   Re: NPC Shop (status: planning)
Reply With Quote #5

Quote:
Originally Posted by zipcore View Post
ANY, maybe some features won't work for some games, but main support is CS:S
good


Compatible with Linux or only for windows? I said it for this http://forums.alliedmods.net/showthread.php?t=161331


Or maybe using similars NPCs of this? https://forums.alliedmods.net/showthread.php?p=1470189


I wanted to make a plugin of NPCs (and release it) but I never have time to do it xD
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 03-03-2013 , 15:40   Re: NPC Shop (status: planning)
Reply With Quote #6

Quote:
Originally Posted by Franc1sco View Post
good


Compatible with Linux or only for windows?
I don't like to create moveable shops, there is no need to.
I like to keep it simple with animations.
There will be an option to script model animations:

PHP Code:
SetVariantString(animation);
AcceptEntityInput(entity"SetAnimation"); 
EDIT: Released a first alpha code

Last edited by zipcore; 03-03-2013 at 15:41.
zipcore is offline
alongub
Veteran Member
Join Date: Aug 2009
Location: Israel
Old 03-03-2013 , 15:48   Re: NPC Shop (alpha 0.1)
Reply With Quote #7

Awesome project! I'm still thinking what is the best way to implement Store_EnableFeature and Store_DisableFeature.
__________________
alongub is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 03-03-2013 , 20:06   Re: NPC Shop (alpha 0.1)
Reply With Quote #8

updated should kind of useable now

EDIT: again

Last edited by zipcore; 03-04-2013 at 02:43.
zipcore is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 03-05-2013 , 05:33   Re: NPC Shop (alpha 0.3)
Reply With Quote #9

If nobody has found bugs to fix, I will wait for store-1.1.1 to continue coding.
zipcore is offline
vodka00
Veteran Member
Join Date: Jun 2012
Location: Los Angeles
Old 03-05-2013 , 20:49   Re: NPC Shop (alpha 0.3)
Reply With Quote #10

What exactly is NPC Shop? I am confused.
__________________
cw main:

cw speedruns:
vodka00 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode