Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Script Problem.


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
45 odpowiedzi w tym temacie

#1 supertaranta

    Pomocny

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 19.04.2009 02:53

Im english, but this is the best place to find support for this mod. ill write it in english and have it translated by a translator, i dont think it will do a good job though.

I was trying to take out the sql part of the diablo and have it as nvault. I have a problem. The skill menu does not add points to any of the 4 skills. and is there a way to make the save for nvault, so it saves each class separately?


JA próbowało (wypróbowujący) wyjmować *sql* rozdzielać (część) *diablo* i ma to jak (ponieważ) *nvault*. mam kwestia. jadłospis zręczności nie dodaje punkty (sprawy) do wszelkiego 4 zręcznoś&. I jest tam droga (środek) wyrabiać oszczędzać na *nvault*, tak (więc) to ratuje każdy klasa (klasowy) oddzielnie?

If anyone could help me out on this?

Załączone pliki


  • +
  • -
  • 0

#2 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 19.04.2009 10:11

It doesn't bother me when you write in English but i don't know if others will understand you.

To tell the truth, it was really hell on earth to make from vault an sql version and I don't think it will be easy to make it back (even for me, who know the mod better then anybody else).

Tell my why you want to have vault on it? There are some free (not best but work*) sql host for online server. There are even a game host that provides an sql database with your game (you need too look for host like that it in your county).

Even if you change your sql version to vault it won't be supported (I can't support others people versions because i don't know what they have changed in it [source is tooooo big for that]). And when new, better version will appear you have to change it back to vault and so with every version - thats isn't worth the work with it.
  • +
  • -
  • 0

#3 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 19.04.2009 19:08

Well im not really a fan of sql, and i think that vault is easier for me to access, without the hassle of going on websites, or even paying for it. But thats not the issue well i dont believe its the issue, the menus arent working. and i dont know why... if you could help me out on that i would be greatful. i really didnt do much, i took out the sql, and put in the old vault from the eariler versions, so maybe there i messed up. For the saving wise though, is it possible to make it save on vault for each class differently, because at the moemnt eevery calss has the same level. And when you come out with new things, its not that hard to place them in =) hehe. But it would help a lot of the skills worked >< and also the /classes. becasue its not showing. which is really wierd. i think its coded correctly but maybe missing something.


And like yea im nto a fan of sql, even though its slightly easier, i still rather use nvault, because i know if the sql servers go down or something, ill still ahve all ym data, because sometimes you know. it happens. =/. So if anything, i would be greatful =)
  • +
  • -
  • 0

#4 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 19.04.2009 19:45

supertaranta coding changed A LOT when I made it from vault to sql and don't count on if you think that I can help you with it there is way to many things that could go bad in your code and even after looking truth it, it could still not work - those versions haw totally different concept of thinking about experience and lvl.

But more... I'm to lazy to event try to do something that have low chances of succes...

If you don't want to use sql you can still try the older version with voult...
  • +
  • -
  • 0

#5 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 19.04.2009 19:54

Oh ok, well dam, i dont want to use the old versions thats why >< haha, i like the new ones =/. Dam. Just a proposition lol, like if u took the time to do it i would pay you. Like we could talk about a price or w.e. =p, for your time and thought to the work.
  • +
  • -
  • 0

#6 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 19.04.2009 20:07

supertaranta if you are ready to pay for making it, then it would be easer for you to buy sql host (better then some free sql host that are used) and it wouldn't be any problem when new version would be make (it isn't like copy/paste... dam differences in those version - thats the point of only sql is supported now).

Still I think you should try for few days with free sql host and then think again about voult... And there are backups of sql database so even after a crash or something it would be pretty safe.

And there are some extras for sql version as online statistics (anybody can look at it from his browser) make by GuTeK.
  • +
  • -
  • 0

#7 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 00:30

Haha, actually that was the first thing i tried =p hehe the sql, and i dunno, to me with the belated load also for the menu >< hehe. i dunno i know your probably against my way of thought, but i rather use nvault. And yes i agree with what u say it would be better for me to pay for sql and so on. And i know its not like copy and paste. But hey witout trying you cant get anywhere huh >< hehe. well actually i would still pay you for writing it in nvault, im not saying to support it or anything. Just write it for nvault, and thats it, just one version for me =p haha. And like its actually also for a learning base. So i mean if you would like to do it =) we can talk prices. hehe. And i understand maybe your trying to make it better for me by not waisting my money or anything, but still i want to learn hehe. and i think to have a nvault version NEW and have the SQL version it would help a lot because i would be able to see what does what and what exactly everything means. =) hehe. So let me know if your up for the job.
  • +
  • -
  • 0

#8 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 09:47

I could think about making in next versiom a cvar for sql/nvoult usage but then every class would have the same exp and lvl on all classes...

But i don't have time (even for making ver. 5.10) so it's really hard to tell when (if i would make it) I would finish it...
  • +
  • -
  • 0

#9 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 11:15

Oh ok =/. hmm i understand. yea time is precious lol. Well thanks, if anything ill wirte to you =) hehe.
  • +
  • -
  • 0

#10 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 13:52

supertaranta, BTW it's kinda weird to read so many haha, lol, huh and emoticons... it was really hard to take you seriusly...
  • +
  • -
  • 0

#11 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 19:59

Oh, i apologize, here in new york the lol, and haha in a way isnt taken so seriously, my bad for it. I was being very serious about this though. So wait, there is no posibility of saving the classes seperatly?
  • +
  • -
  • 0

#12 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 20:28

There ware some raported problem with old voult when there ware too many players in data base... and with every class seperatly it would need like 7-8 times more space -> could hold (if number of players [couldn't chack it for my self] isn't biger then max players on serwer in a ~year~) 7-8 times less players and that would be pretty bad for anybody...
  • +
  • -
  • 0

#13 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 20:34

Uh huh. Well hmm, well then there is a possibility to do this, how would it be writen like could u give me an example for this?


Edit1: alright well i actually looked into this a little, and if you could help me. I was looking at the war3mod right, and it saves by nvault, this is whats the code.

if (id && playerxp[id] && p_skills[id][0])
		{
			new vaultkey[64], vaultdata[128], index[32]
			format(vaultkey, 63, "WC3_%s_%s", playerid, currentrace)
			format(vaultdata, 127, "%d %d %d %d %d %d",playerxp[id],p_skills[id][0],
				p_skills[id][1],p_skills[id][2],p_skills[id][3],p_skills[id][4])
			set_vaultdata(vaultkey,vaultdata)
						
			// Prune Information Setup
			format(vaultkey, 63,"WC3_%s",playerid)							
			
                        if(!vaultdata_exists(vaultkey))
                        {
                                get_vaultdata("WC3_war3index", index, 31);
                                format(vaultdata,127,"%d ^"%s^" %d",str_to_num(index),playername,get_systime())
                                set_vaultdata(vaultkey,vaultdata)
                                format(vaultkey,63,"WC3_pruneindex_%d",str_to_num(index))
                                set_vaultdata(vaultkey,playerid)
                                format(index,31,"%d",(str_to_num(index)+1))
                                set_vaultdata("WC3_war3index",index)
                        }
                        else
                        {
                                get_vaultdata(vaultkey,vaultdata,127)
                                parse(vaultdata,index,31)
                                format(vaultdata,127,"%d ^"%s^" %d",str_to_num(index),playername,get_systime())
                                set_vaultdata(vaultkey,vaultdata)
                        }
		}
	#endif
	
	return PLUGIN_CONTINUE


public get_<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue2.gif' class='bbc_emoticon' alt='xP' />_from_file(id,returnrace)

new vaultkey[64], vaultdata[128], currentrace[2]
		format(currentrace,1,"%d",p_skills[id][0])
				
		if(returnrace)
		{		
			#if !EXPANDED_RACES
			for(new i=1;i < 5; i++)
			#else
			for(new i=1;i < 9; i++)
			#endif
			{
			
				format(vaultkey, 63, "WC3_%s_%d", playerid, i)
				if (vaultdata_exists(vaultkey))
				{
					get_vaultdata(vaultkey, vaultdata,127)
					parse(vaultdata,<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue2.gif' class='bbc_emoticon' alt='xP' />,7,race,1,skill1,1,skill2,1,skill3,1,skill4,1)
					
					racexp[i-1] = str_to_num(<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue2.gif' class='bbc_emoticon' alt='xP' />)
				}
				else
				{
					racexp[i-1] = 0
				}
				
				if (p_skills[id][0])
					racexp[p_skills[id][0]-1]=playerxp[id]
				#if !EXPANDED_RACES
				server_cmd("display_race_select %d %d %d %d %d",id, racexp[0], racexp[1], racexp[2], racexp[3])
				#else
				server_cmd("display_race_select %d %d %d %d %d %d %d %d %d",id, racexp[0], racexp[1], racexp[2], racexp[3], racexp[4], racexp[5], racexp[6], racexp[7])
				#endif
			}			
		}
		else
		{
			format(vaultkey, 63, "WC3_%s_%s", playerid, currentrace)
			if(vaultdata_exists(vaultkey))
			{
				get_vaultdata(vaultkey, vaultdata, 127)
				parse(vaultdata,<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue2.gif' class='bbc_emoticon' alt='xP' />,7,race,1,skill1,1,skill2,1,skill3,1,skill4,1)
				
				playerxp[id]=str_to_num(<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue2.gif' class='bbc_emoticon' alt='xP' />)
				p_skills[id][1]=str_to_num(skill1)
				p_skills[id][2]=str_to_num(skill2)
				p_skills[id][3]=str_to_num(skill3)
				p_skills[id][4]=str_to_num(skill4)
				displaylevel(id,0)
			}
			else
			{
				playerxp[id]=0
				p_skills[id][1]=0
				p_skills[id][2]=0
				p_skills[id][3]=0
				p_skills[id][4]=0
				displaylevel(id,0)
			}
		}
	#endif
	
	return PLUGIN_CONTINUE


// Prune Code follows
		new index, nIndex, strIndex[31], vaultkey[64], playerid[32], playername[MAX_NAME_LENGTH]
		new vaultdata[128], junk[32], stroldtime[32], nowtime, oldtime
		new bool:prunetime=false
		
		nowtime = get_systime()

		get_vaultdata("WC3_prunedate",vaultdata,127)
		oldtime = str_to_num(vaultdata)
		if((nowtime-oldtime) > (VAULT_PRUNE_LIMIT*86400))
		{
			prunetime=true
			format(junk,31,"%d",nowtime)
			set_vaultdata("WC3_prunedate",junk)
		}

		get_vaultdata("WC3_war3index",vaultdata,127)
		nIndex = str_to_num(vaultdata)
		index = 1

		while(index < nIndex && prunetime)
		{
			format(vaultkey,63,"WC3_pruneindex_%d",index)
			if(vaultdata_exists(vaultkey))
			{	
				get_vaultdata(vaultkey,playerid,31)
				format(vaultkey, 63, "WC3_%s",playerid)
				get_vaultdata(vaultkey,vaultdata,127)
				parse(vaultdata,junk,31,playername,MAX_NAME_LENGTH-1,stroldtime,31)
				oldtime = str_to_num(stroldtime)

				if((nowtime-oldtime) > (DAYS_BEFORE_DELETE*86400))
				{	
					#if !EXPANDED_RACES
					for(new i=1;i < 5; i++)
					#else
					for(new i=1;i < 9; i++)
					#endif
					{
						format(vaultkey, 63, "WC3_%s_%d", playerid, i)
						remove_vaultdata(vaultkey)
					}
					format(vaultkey,63,"WC3_pruneindex_%d",index)
					remove_vaultdata(vaultkey)
					format(vaultkey,63,"WC3_%s",playerid)
					remove_vaultdata(vaultkey)
				}
				else
					index++
			}
			else
			{
				if(--nIndex > 1)
				{	
					num_to_str(nIndex,strIndex,31)
					format(vaultkey,63,"WC3_pruneindex_%s",strIndex)
					get_vaultdata(vaultkey,playerid,31)
					remove_vaultdata(vaultkey)
					format(vaultkey,63,"WC3_pruneindex_%d",index)
					set_vaultdata(vaultkey,playerid)
					format(vaultkey,63,"WC3_%s",playerid)
					get_vaultdata(vaultkey,vaultdata,127)
					parse(vaultdata,junk,31,playername,MAX_NAME_LENGTH-1,stroldtime,31)				
					format(vaultdata,127,"%d ^"%s^" %s",index,playername,stroldtime)
					set_vaultdata(vaultkey,vaultdata)
					set_vaultdata("WC3_war3index",strIndex)
				}
				else
					set_vaultdata("WC3_war3index","1")
			}	
		}
	#endif

	return PLUGIN_CONTINUE



Those are the ones that i saw when i skimed through it. How would this be made in diablo mod. would it have the same idea or? Like if you could start me off, like show me for one class, and then i could possibly do it for the rest.
  • +
  • -
  • 0

#14 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 21:02

Don't want to look truth it so i just write short what is needed for nvoult:

save:
- format something that will help you find player in database (nick,steamID,IP or setinfo whatever)
- format all important data like exp (lvl), stats (int,str,sta,agi) with extra char (space, #,$ anything (but nuber) will do) between every data
- save to database

load:
- get data from same formated data that helps you find player in database
- parse importan data (reversed format)
- string-> number conversion of data
- load the data to the integers and floats that are used in plugin (player_*** )


All the code you give from war3 is pretty much the same thing that i writed (but it isn't amxx code :F)
  • +
  • -
  • 0

#15 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 21:09

Ah Yea, i just realized that too. Hmm do. Well from what u stated this should be correct right?


new name[32];     
	get_user_name(id,name,31);
	
	replace_all(name, 31, " ", "'")
	 
	new vaultkey[64],vaultdata[256]
	format(vaultkey,63,"%s-Dbmod",name)
	format(vaultdata,255,"%i#%i#%i#%i#%i#%i#%i#%i",player_class[id],player_<img src='http://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue2.gif' class='bbc_emoticon' alt='xP' />[id],player_lvl[id],player_intelligence[id],player_strength[id],player_point[id],player_agility[id],player_dextery[id])
	nvault_set(g_vault,vaultkey,vaultdata)
	return PLUGIN_HANDLED
} 

What do i need to add to that so it saves seperatly for each class?
  • +
  • -
  • 0

#16 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 21:16

supertaranta, you could add to:
- format something that will help you find player in database

an extra data like class - so you would look in database player with the same name and class like the one that player chose.

You could make 8 diferent databases for every class seperatly - it would hold the same number of players but don't know if it would work slower or something...

Ps. sorry but I don't have time to check my English so it could (should) have more mistakes in it O:)
  • +
  • -
  • 0

#17 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 21:27

lol, its fine =) no ones perfect in english. If you could, could u show me what u mean exactly by 8 different datebases?


And wait what do u mean by data class, is the class not in the save?
new playerclass[33]
??


Im sorry for all these questions. . .
  • +
  • -
  • 0

#18 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 21:39

format(vaultkey,63,"%s-%d-Dbmod",name,player_class[id])

Player class in vaultkay

or seperate databases by changin (formating) g_vault (with is const in normal/old version and it isn't formated in save/load function).
  • +
  • -
  • 0

#19 supertaranta

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:55
Offline

Napisano 20.04.2009 21:41

oh ok and by adding the vault key, then what will it save separetly? or would that go under load and then i would have to add something to the load?
  • +
  • -
  • 0

#20 Miczu

    Godlike

  • Przyjaciel

Reputacja: 646
Wszechmogący

  • Postów:2862
Offline

Napisano 20.04.2009 21:46

vaultkey is a key to your data, every data have it's own key. When your key hold your nick then nobody with diferent name cant acces (load) it. If you add to it a class then it will be accesed only with name and class as when you saved it.

class in vaultkay will make every class seperatly but in the same database (text file) in so it will make database something like 7-8 times bigget then with same lvl on all classes...
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych