Home arrow Forum

[NG]
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Can't find the solution... (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Can't find the solution...
#806
Slander (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Can't find the solution... 1 Year, 9 Months ago Karma: 0  
Hi there,

I actualy don't understand what happens in the code...
I made some minor changes in Mandingo bot to attribute ranks to players. That way, a player who has killed 5 persons in a row is ranked as Trooper, 10 in a row as Captain ans so on...

This works perfectly for this part, but i also decided to remove the rank when the ranked player dies. So i made the second part with the following code:
Code:

# Buffer $kiar = $urtodatabase->getPlayerValue($hitteduid, 'KillingsInARow'); $adviseType = 'none'; # General Rank if(($kiar ge $urtodatabase->getIpcValue('numgen')) && ($urtodatabase->getIpcValue('numgen') ne 0)) { # DEBUG printf("%s was general with %s killings in a row when he died", $urtodatabase->get_coloredPlayerName($hitteduid), $kiar); ... } # Captain Rank elsif(($kiar ge $urtodatabase->getIpcValue('numcap')) && ($urtodatabase->getIpcValue('numcap') ne 0)) { # DEBUG printf("%s was captain with %s killings in a row when he died", $urtodatabase->get_coloredPlayerName($hitteduid), $kiar); ... } # Trooper Rank elsif(($kspree ge $urtodatabase->getIpcValue('numtro')) && ($urtodatabase->getIpcValue('numtro') ne 0)) { # DEBUG printf("%s was trooper with %s killings in a row when he died", $urtodatabase->get_coloredPlayerName($hitteduid), $kiar); ... } # Send To Server if (($urtodatabase->getIpcValue('canitalk') eq "yes") && ($adviseType ne 'none')) { # DEBUG printf(" (numtro = %s numcap = %s numgen = %s)\n", $urtodatabase->getIpcValue('numtro'), $urtodatabase->getIpcValue('numcap'), $urtodatabase->getIpcValue('numgen')); ... }
I only left the "printf" commands here but there is a bit more of code in each conditions (the interaction with the serveur) but the "bug" cannot come from these lines... Then i ran the bot and killed 5 guys in a row so i reached the Trooper rank as wanted. The result in the terminal was:
Code:

Slander is now trooper with 5 killings in a row (numtro = 5 numcap = 10 numgen = 15)
After that i let my character killed by another guy but this time the code doesn't worked ! The result in the terminal was:
Code:

Slander was general with 5 killings in a row when he died (numtro = 5 numcap = 10 numgen = 15)
As you can see, $kiar is 5 but the first condition is triggered ! It is impossible ! 5 cannot be greater or equal to 15 ! Does anyone have an idea ? I ommit to precise that this code works perfectly for the others ranks (those greater than Trooper). If the killed guy was Captain the 2nd condition is triggered and for the other ranks after it works too... But the "bug" occurs only with the first rank... I don't understand what happens... If someone have an idea... Anyway, have a good day, Slander
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#807
Parantido (Admin)
Admin
Posts: 318
graph
User Online Now Click here to see the profile of this user
Re:Can't find the solution... 1 Year, 8 Months ago Karma: 22  
There's no needs to apply this change!

Mandingo already do that .. you'v only to change following strings

"Killing Spree"
"Rampage"
"God Like"

with your own custom strings

Regards

Parantido
 
Report to moderator   Logged Logged  
 
[NetGuardians] - Clan Founder
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop