Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 02:09

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

Advertisement



BlockMapExp

Discussion on BlockMapExp within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2017
Posts: 380
Received Thanks: 60
BlockMapExp

Good evening, I would like to have help I try to block the experiments on the cards at a certain level. Can you tell me if I forget something or do wrong?

redbull2905 is offline  
Old 06/04/2018, 03:34   #2
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
This is a very strange code >< firstly you forgot a } and secondly your return; everywhere Moreover the 2 nd else if is useless just use the first part with the correct values.
Seems you don’t really understand what you are trying to do.
0Lucifer0 is offline  
Old 06/04/2018, 04:24   #3
 
elite*gold: 0
Join Date: Jul 2017
Posts: 380
Received Thanks: 60
I'm not sure to remember "MapLevelNoXp" the normally I did everything well

redbull2905 is offline  
Old 06/04/2018, 06:33   #4
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
this just prove you don't understand at all what you are doing... At least you don't understand return
2nd block is useless.
1st block can be merged

return just stop the method...
this is an equivalent of your code
Quote:
public void MapLevelNoExp(ClientSession, int MapId,int Level)
{

}
PS:not exactly equivalent because your code use more CPU than a empty code. But your code do nothing
0Lucifer0 is offline  
Old 06/04/2018, 10:50   #5
 
Saber none's Avatar
 
elite*gold: 30
Join Date: Sep 2014
Posts: 587
Received Thanks: 315
in a nutshell, normally you use a return to return a certain value or object, moreover you only want to use it if you want to go out of the methode. Btw the data type of your methode is void so you actually dont need to return something.
Saber none is offline  
Old 06/04/2018, 11:35   #6

 
Blowa's Avatar
 
elite*gold: 98
Join Date: Jan 2010
Posts: 631
Received Thanks: 1,726


Your code does nothing actually except wasting some CPU cycles. (and ******* naming conventions)

So, to answer your question, your code won't work.

Simply as is :
Quote:
// i don't remind the correct method that is doing the job for xp
public void GetJobLevelXp()

// IsOnNoXpMap should be a method in Map object since your maps contains ITS infos
if (MapInstance.IsOnNoXpMap(session))
{
// not getting xp
return;
}

// add xp here
session.Character.JobXpUp(xp);
Blowa is offline  
Old 06/04/2018, 11:54   #7
 
elite*gold: 0
Join Date: Jul 2017
Posts: 380
Received Thanks: 60
This is the code of zanou I specify
redbull2905 is offline  
Old 06/04/2018, 12:07   #8
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
I don’t think this is the code of Zanou or if it is his code you remove most of it. This is a non-sens piece of code. this is what someone who don’t know anything would do. Zanou already added thing to his server so I suppose he know at least how to do a if statement correctly!
0Lucifer0 is offline  
Thanks
1 User
Old 06/04/2018, 12:14   #9

 
FI0w's Avatar
 
elite*gold: 50
Join Date: Jul 2014
Posts: 1,670
Received Thanks: 1,139
I use for this example the Basic OpenNos Source.

First you go to this line:




there you add a line over it:

Code:
bool BlockedExpMap(int mapid){
	switch(mapid){
		case 1:
		case 2:
			return true;
		default:
			return false;
	}
}
and under this:


Code:
if(BlockedExpMap(Session.CurrentMapInstance.Map.MapId)){
	return;
}
FI0w is offline  
Thanks
3 Users
Old 06/04/2018, 12:21   #10

 
Itachi-Senpai's Avatar
 
elite*gold: 195
Join Date: Mar 2015
Posts: 331
Received Thanks: 200
Or you just remove the xp on your database for the special monster`s o.o
Itachi-Senpai is offline  
Old 06/04/2018, 12:46   #11

 
FI0w's Avatar
 
elite*gold: 50
Join Date: Jul 2014
Posts: 1,670
Received Thanks: 1,139
Quote:
Originally Posted by Itachi-Senpai View Post
Or you just remove the xp on your database for the special monster`s o.o
Tell me why you should do a bullshit Database when you can do it in Source ?
FI0w is offline  
Thanks
1 User
Old 06/04/2018, 17:52   #12

 
Itachi-Senpai's Avatar
 
elite*gold: 195
Join Date: Mar 2015
Posts: 331
Received Thanks: 200
Quote:
Originally Posted by xSensitivex View Post
Tell me why you should do a bullshit Database when you can do it in Source ?
Cause something like this appears xD
Quote:
Originally Posted by redbull2905 View Post
Good evening, I would like to have help I try to block the experiments on the cards at a certain level. Can you tell me if I forget something or do wrong?

Itachi-Senpai is offline  
Old 06/04/2018, 18:43   #13
 
elite*gold: 0
Join Date: Jul 2017
Posts: 380
Received Thanks: 60
At worst you can not just get me the code to know that I use opennos-dev de ciapa
redbull2905 is offline  
Old 06/04/2018, 19:18   #14
 
Zanouu's Avatar
 
elite*gold: 0
Join Date: Feb 2018
Posts: 138
Received Thanks: 112
Quote:
Originally Posted by redbull2905 View Post
At worst you can not just get me the code to know that I use opennos-dev de ciapa
They gave him to you several times, furthermore you could avoid adding some **** and saying that his my "code" . Monkey ..

Code:
public void MapLevelNoExp(ClientSession Session, Int MapId, Int Level)
{
if (Session.CurrentMapInstance.Map.MapId == MapId)
{
if (Session.Character.Level <= Level)
{
return;
}
}
}
=> In your GetExp ( GetJExp , etc) Just added

Session.Character.MapLevelNoExp(Session,YOURMAPID, YOURLEVEL); Woaw
Zanouu is online now  
Old 06/04/2018, 22:20   #15
 
0Lucifer0's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
Quote:
Originally Posted by Zanouu View Post
They gave him to you several times, furthermore you could avoid adding some **** and saying that his my "code" . Monkey ..

Code:
public void MapLevelNoExp(ClientSession Session, Int MapId, Int Level)
{
if (Session.CurrentMapInstance.Map.MapId == MapId)
{
if (Session.Character.Level <= Level)
{
return;
}
}
}
=> In your GetExp ( GetJExp , etc) Just added

Session.Character.MapLevelNoExp(Session,YOURMAPID, YOURLEVEL); Woaw
This code can’t work and have nothing to do in Character
0Lucifer0 is offline  
Reply




All times are GMT +2. The time now is 02: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.