|
You last visited: Today at 07:13
Advertisement
Redux v2 - Official 5065 Classic Source
Discussion on Redux v2 - Official 5065 Classic Source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
05/15/2016, 06:32
|
#2281
|
elite*gold: 0
Join Date: Oct 2006
Posts: 46
Received Thanks: 24
|
Thanks for the reply, but I'm not sure if we are on the same page.
That's the price I'm having trouble updating. When I sell that super to the NPC, it sells for *50 that price, but I can't figure out where/how to make it display the *50 price when hovered over in the inventory.
Sorry if I'm being dense. Thanks again for everything.
|
|
|
05/15/2016, 06:52
|
#2282
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,256
Received Thanks: 4,159
|
Why isn't this thread stickied to the top of the section?
|
|
|
05/16/2016, 01:25
|
#2283
|
elite*gold: 0
Join Date: Nov 2013
Posts: 1
Received Thanks: 0
|
Can Someone help me set this up with TeamVieuwer?
|
|
|
05/16/2016, 04:28
|
#2284
|
elite*gold: 0
Join Date: Oct 2006
Posts: 46
Received Thanks: 24
|
Quote:
Originally Posted by Dollabillz
Can Someone help me set this up with TeamVieuwer?
|
For someone that signed up 3 years ago, you sure bombed your first post..
|
|
|
05/17/2016, 15:43
|
#2285
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
|
Quote:
Originally Posted by TG_FIEND
Thanks for the reply, but I'm not sure if we are on the same page.
That's the price I'm having trouble updating. When I sell that super to the NPC, it sells for *50 that price, but I can't figure out where/how to make it display the *50 price when hovered over in the inventory.
Sorry if I'm being dense. Thanks again for everything.
|
Not being rude btu we already said... price is determined by the itemtype.dat in the client. You then need to update the server to match so that the actual price it gives is different.
The actual calculation for sell price is hardcoded in the client and not something easy to change. It's something like 1/3 the gold cost for the item.
|
|
|
05/17/2016, 23:45
|
#2286
|
elite*gold: 0
Join Date: Oct 2006
Posts: 46
Received Thanks: 24
|
Quote:
Originally Posted by pro4never
Not being rude btu we already said... price is determined by the itemtype.dat in the client. You then need to update the server to match so that the actual price it gives is different.
The actual calculation for sell price is hardcoded in the client and not something easy to change. It's something like 1/3 the gold cost for the item.
|
Actually in your 2nd to last reply to me, you said it was in the itemtype - no .dat, and didn't mention it was the client's itemtype.dat - but now that you have told me in more detail, I understand just fine. Thanks! (I sure can tell the years of all the noobs and 1-posters wanting teamviewer help and hand-holding has taken it's toll on you! ahaha)
I already have ref/uni/elite/super stuff selling for more by editing GamerServer.cs and having ItemAction.SellToNPC check sellItem.EquipmentQuality.... but if displaying the real sell prices on game requires editing the client, I guess I won't. It will just be a nice surprise for anyone selling ahaha.
|
|
|
05/24/2016, 22:19
|
#2287
|
elite*gold: 0
Join Date: Apr 2016
Posts: 16
Received Thanks: 4
|
ány one know how we can know the number of online players in lets say 1002 map?
|
|
|
05/25/2016, 13:18
|
#2288
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by coolco
ány one know how we can know the number of online players in lets say 1002 map?
|
Personally I would not do this as the amount people jump from map to map will make any way of doing this terribly inefficient and will draw resources from the server.
Directly pull from MySql
Code:
SELECT * FROM Character WHERE 'Online' = 1 and 'MapID' = 1002;
This probably is not the most efficient way of doing it but at least its a start for you.
N.B: This code will NOT work this is only as a guide for you.
You can make a Dictionary and store the Maps you want to check and then add and remove players as they enter/leave maps. e.g
Code:
Dictionary<string, int> OnlineMaps = new Dictionary<string, int>();
OnlineMaps.Add("TwinCity", 0);
OnlineMaps.Add("ApeCity", 0);
OnlineMaps.Add("Market", 0);
public static void UpdateOnline(string MapName){
if (OnlineMaps.ContainsKey(MapName)){
OnlineMaps[MapName] += 1;
}
}
Shall let you work out where to put it and where to call it from
Both of these ways will work and I would suggest the second with a Dictionary. This is all my own opinion and the way I would do it. If anyone thinks of a better way then please add it.
|
|
|
05/25/2016, 14:41
|
#2289
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
|
If you just want a command I'd just use linq. It saves so much time that any minor performance hit is not really relevant (again, we're talking about a command, micro optimization is never really worth while)
EG: want to know how many players are on twin city? Do something like this where the command uses the map id such as /playersinmap 1002
var onlineCount = Managers.PlayerManager.Players.Values.Where(I => I.MapID == ushort.Parse(command[1])).Count();
If you want to be fancy, step it up and group players by map id, order by descending and loop through the top X entries to output a handy
Map ID: Map Name : Player Count
|
|
|
05/25/2016, 20:30
|
#2290
|
elite*gold: 0
Join Date: Apr 2016
Posts: 16
Received Thanks: 4
|
@ and @ thx for the ideas it helped me a lot if not asking too much can you guys point me to how to spawn a monster but not save it in DB
|
|
|
05/28/2016, 00:43
|
#2291
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by coolco
@ and @ thx for the ideas it helped me a lot if not asking too much can you guys point me to how to spawn a monster but not save it in DB
|
Could you elaborate on this? What do you mean spawn a monster and not save it in the database? Mobs are spawned from the database but that only pulls the x, y and map coords of the mob(plus the other info needed, they dont save there). If you look at a few 5165 sources (LOTF but I know most of them have it) under the commands section (chat.cs or something) there is a command to spawn a mob at a specific place. Hope that helps
|
|
|
05/28/2016, 01:25
|
#2292
|
elite*gold: 0
Join Date: Apr 2016
Posts: 16
Received Thanks: 4
|
@ yes is somthing like that to code titans and ganoderma didn't find a way to spawn it in x time the timers and stuff like that isnt much of a problem but i failed to do the spawn thing i know it is a noob questions but i dont want ready to copy past codes just examples or something similar
also is just me(that i might fuked somthing in source) or the damage pvp are a bit mess?
|
|
|
06/06/2016, 08:42
|
#2293
|
elite*gold: 0
Join Date: Jul 2005
Posts: 249
Received Thanks: 49
|
I'm sure its possible that this might have been answered already though I did actually search and didn't find a direct answer. So I see portal locations are handled in the database but what determines the location they warp to because i've found some portals that seem to be warping to incorrect locations. Example the portal in bird island thats located at 476,384 should warp to 344,206 but instead takes you back 538,695 sorry if this has been answered and I do have to say this is easily one of the best source's ive actually looked over it was actually harder to get the client running over the server.
|
|
|
06/18/2016, 15:41
|
#2294
|
elite*gold: 0
Join Date: Jul 2008
Posts: 31
Received Thanks: 3
|
I followed your directions in the video and it keeps giving me this error when logging into the server...
but the server says I'm connecting...
I'm not very good at coding, so this might be an easy fix. However, I do not plan on running my server for other people to use, I'm about to deploy and I am trying to run a server offline for myself while on deployment. I'd appreciate any help I can get.
|
|
|
06/18/2016, 15:47
|
#2295
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
|
Game up/port not working.
It's hitting login server, the server sends the info to forward it to the game server and then cannot connect to the IP/port it was given
|
|
|
All times are GMT +1. The time now is 07:13.
|
|