|
You last visited: Today at 02:09
Advertisement
BlockMapExp
Discussion on BlockMapExp within the Nostale forum part of the MMORPGs category.
06/04/2018, 02:52
|
#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?
|
|
|
06/04/2018, 03:34
|
#2
|
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.
|
|
|
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
|
|
|
06/04/2018, 06:33
|
#4
|
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
|
|
|
06/04/2018, 10:50
|
#5
|
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.
|
|
|
06/04/2018, 11:35
|
#6
|
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);
|
|
|
|
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
|
|
|
06/04/2018, 12:07
|
#8
|
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!
|
|
|
06/04/2018, 12:14
|
#9
|
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;
}
|
|
|
06/04/2018, 12:21
|
#10
|
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
|
|
|
06/04/2018, 12:46
|
#11
|
elite*gold: 50
Join Date: Jul 2014
Posts: 1,670
Received Thanks: 1,139
|
Quote:
Originally Posted by Itachi-Senpai
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 ?
|
|
|
06/04/2018, 17:52
|
#12
|
elite*gold: 195
Join Date: Mar 2015
Posts: 331
Received Thanks: 200
|
Quote:
Originally Posted by xSensitivex
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
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?
|
|
|
|
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
|
|
|
06/04/2018, 19:18
|
#14
|
elite*gold: 0
Join Date: Feb 2018
Posts: 138
Received Thanks: 112
|
Quote:
Originally Posted by redbull2905
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
|
|
|
06/04/2018, 22:20
|
#15
|
elite*gold: 0
Join Date: May 2009
Posts: 1,005
Received Thanks: 1,019
|
Quote:
Originally Posted by Zanouu
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
|
|
|
All times are GMT +2. The time now is 02:09.
|
|