Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 09:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Question ABout Prize NPC

Discussion on Question ABout Prize NPC within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 28
Received Thanks: 0
Exclamation Question ABout Prize NPC

Does anyone know how to get the prize npc to give the items that they have one?
I really need help Please reply!
edgdro2 is offline  
Old 10/26/2009, 03:56   #2
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
I never say this but use, "search" for "npc that gives items". It works I've done it. Pretty simple.
blade911 is offline  
Old 10/26/2009, 04:00   #3
 
.Matt's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 145
Received Thanks: 34
I remember seeing something about the prize npc and what not in the Paze Co source when I was going through it, I don't know if it actually worked or anything but maybe look through that source.
.Matt is offline  
Old 10/26/2009, 04:18   #4
 
elite*gold: 0
Join Date: Oct 2008
Posts: 28
Received Thanks: 0
OKay thanks. I have him working but i want to be able to give an acccount a certain item and them go to him to get it
@blade im not dumb ive got plenty of those its just i want prize npc to work
edgdro2 is offline  
Old 10/26/2009, 04:33   #5
 
raidenx123's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 1,705
Received Thanks: 438
well you have to make the NPC check if the player has the itemID in his inventory, then if he does put up the dialog and award the item, maybe like this:
Code:
if Control = 1;
{
// Check for the item in inventory
{
Text("Thank you for your item, here ill reward you with a meteor!");
Link("Thanks." 255);
AwardItem(1088001-0-0-0-0-0, 0)//theres more to this....
}
else
{
Text("Sorry you dont have the required item");
Link("Darnskies" 255);
its a structure not the actual code
raidenx123 is offline  
Old 10/26/2009, 04:50   #6
 
elite*gold: 0
Join Date: May 2006
Posts: 828
Received Thanks: 235
Quote:
Originally Posted by edgdro2 View Post
t
@blade im not dumb ive got plenty of those its just i want prize npc to work
I didn't say you were dumb.
blade911 is offline  
Old 10/26/2009, 14:07   #7
 
elite*gold: 0
Join Date: Oct 2008
Posts: 28
Received Thanks: 0
@blade: Well I have made npcs.
@raiden: Will that work for 5095 because my npcs for 5095 arent coded like that.
edgdro2 is offline  
Old 10/27/2009, 05:23   #8
 
.Matt's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 145
Received Thanks: 34
Quote:
Originally Posted by edgdro2 View Post
@blade: Well I have made npcs.
@raiden: Will that work for 5095 because my npcs for 5095 arent coded like that.
Sure it would, you would just need to put it the way yours(or CoEmu I believe) is written.
.Matt is offline  
Old 10/27/2009, 16:04   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Could be two ways you want it done.

#1 Predetermined items (db's? pre-set items?) for players with a certain database value (such as donation, won a pk event, was awarded by gm etc)

In that case add a database value for it such as Prize and have it = True through some function (gm command is easy enough to do, or a web based donation system, or the ever simple ingame reward for events)

Then have it donated.

You could also do a really neat system by creating a new table in the database where it stores player id, item number, +, bless, enchant, sockets etc. That way you can have a player command OR donation based system where it changes the reward to ANYTHING you want and then the npc simply loads out of the database what to give you and then clears it from database (so you can't claim more than once)

The benefits for the second system would be you could do a player command that functions exactly like /item except it has a target player name. That will then allow the player to claim the item when they come online (would be useful to add a check when they logon to see if they have anything to claim and alert the player via msg's)
pro4never is offline  
Old 10/27/2009, 18:21   #10
 
elite*gold: 0
Join Date: Oct 2008
Posts: 28
Received Thanks: 0
WOw thanks I think i will add the second one.
edgdro2 is offline  
Old 10/27/2009, 18:55   #11
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by edgdro2 View Post
WOw thanks I think i will add the second one.
Second one would be a bit harder to code but just remember, you already have examples of just about every section of code required.

#1: Getting player target name (Look at any gm command that targets a player such as kick, bringmeto/bringtome, ban etc)

#2: Spawning item stats: Just check the add item code and instead load it from database

#3: Saving to database: Make the gm command save it to the database for the target id


Only one that wouldn't have some sort of example out there as far as I can think of is a web based donation system (so you could let players create their own specific items for x amount of donation *cough* selling *cough* and then it save to database...) That part would be far more complicated though.
pro4never is offline  
Thanks
1 User
Old 10/27/2009, 21:25   #12
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by pro4never View Post
Could be two ways you want it done.

#1 Predetermined items (db's? pre-set items?) for players with a certain database value (such as donation, won a pk event, was awarded by gm etc)

In that case add a database value for it such as Prize and have it = True through some function (gm command is easy enough to do, or a web based donation system, or the ever simple ingame reward for events)

Then have it donated.

You could also do a really neat system by creating a new table in the database where it stores player id, item number, +, bless, enchant, sockets etc. That way you can have a player command OR donation based system where it changes the reward to ANYTHING you want and then the npc simply loads out of the database what to give you and then clears it from database (so you can't claim more than once)

The benefits for the second system would be you could do a player command that functions exactly like /item except it has a target player name. That will then allow the player to claim the item when they come online (would be useful to add a check when they logon to see if they have anything to claim and alert the player via msg's)
You always come with very good explanations, very good
Fish* is offline  
Reply


Similar Threads Similar Threads
Help to Changing PKT Prize
04/05/2010 - EO PServer Hosting - 5 Replies
How do I change the prize PKT? Anyone have any query? the item ID is "742806" For those who can help me thank you. Att Corey88:cool:
[Help]NPC Fam War Can't Claim Prize..
01/11/2010 - EO PServer Hosting - 2 Replies
Hey all.. I need some help to fix this.. i use search button but not find it... How to fix it...My NPC fam war can't claim Prize..?
Do u think that u get the ali baba prize?
09/15/2009 - Silkroad Online - 15 Replies
hello there ... do u think u gonna win the SOx i dont think so ;p how many alibaba seals u got ?? i have 93 now ^^ im gonna buy this car when i win the Sox ^^
Prize hack
06/07/2009 - Say Hello - 0 Replies
Prize hack
prize hack
03/07/2009 - CO2 Programming - 16 Replies
i used it befor it`s wrok like that you see what monster have befor it die like see inside monster Db or meteor or gem and kill it than get what you see yeah that ture and i listen about it back agine if some one can get it i will be thanks for him



All times are GMT +2. The time now is 09:09.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.