Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 03:24:54 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Recording the amount of kills  (Read 338 times)
Scyther
Full Member
***
Posts: 120


View Profile Email
« on: June 29, 2011, 06:42:02 AM »

This is for the pokemod ive been basing of war3source (actually superhero) but ill put it in war3source terms so hopefully people understand this.
I need it to record the amount of kills everyone has on each race and allow you to make things happen because of it.
Example (don't ask why you would want this, its just an example!)
If the player has over 100 kills on undead they would have weaker chain lightning on orc done by some sort of if..
if(undead kills <100)
{
 do 50 damage
}
else
{
do 20 damage
}

Can someone help me make this? ><
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #1 on: June 29, 2011, 08:10:53 AM »

learn SQL if you want to record lifetime kills
Logged

DarkEnergy
Scyther
Full Member
***
Posts: 120


View Profile Email
« Reply #2 on: June 29, 2011, 04:55:08 PM »

Could you or anyone help me with this? I don't know SQL and it seems like a lot to learn if someone else could just do it or help me with it ><
Logged
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« Reply #3 on: June 29, 2011, 07:32:10 PM »

I don't have access to my db right now to check, but doesn't each race have its own table? How about some native functions to add/remove columns and read/write rows? Something like War3_SQL_AddColumn(thisRaceID, "kills", INTEGER) (INTEGER coming from constants.inc) wich you can later access with War3_SQL_ReadColumn(thisRaceID, client, "kills"), War3_SQL_WriteColumn(thisRaceID, client, "kills", 1). Seems more comfortable than to have a seperate space for that kinda stuff... I already have a few vague ideas for things that could benefit from a persistant variable store like this.
« Last Edit: June 30, 2011, 06:37:28 AM by Glider » Logged

Scyther
Full Member
***
Posts: 120


View Profile Email
« Reply #4 on: June 30, 2011, 01:10:12 AM »

Awesome, i'll probably talk to you tonight and maybe we can get it done or something Smiley

Like I said I plan to use it for a totally different reason (Planning to have it so after X kills pokemon evolve Tongue) but could also see the things you could do with it in terms of linking races together and such Cheesy
Logged
Scyther
Full Member
***
Posts: 120


View Profile Email
« Reply #5 on: June 30, 2011, 08:13:28 AM »

Okay Ownz this is exactly what I want for superhero (preferably as a new engine please)
- I want it to store the number of kills each player has on each hero
... That's it. Smiley
Logged
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« Reply #6 on: June 30, 2011, 10:43:27 AM »

... That's it. Smiley

You make it sound like nothing...
I'd recommend coding this as a standalone addon for your pokemod wich automatically creates new columns as you add more races, hooks the death event and gives credit where credit is due.
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #7 on: June 30, 2011, 11:05:57 AM »

hes modifying the core the point its nearly unpossible to merge
Logged

DarkEnergy
Scyther
Full Member
***
Posts: 120


View Profile Email
« Reply #8 on: July 01, 2011, 12:19:59 AM »

I never asked for it to be merged.. I also wanted it as an addon or a separate plugin which is why i asked if it could be a new engine.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!