Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ragnoroker: Come join RuneGuild today! Join added automated PVP tournmanents with group stages! - RuneGuild is a New OSRS Server with PVM/Pk balance with a great economy and friendly players. Join now : [link]
      August 02, 2020, 11:07:56 PM
    • ragnoroker: Come join RuneGuild today! Join added automated PVP tournmanents with group stages! - RuneGuild is a New OSRS Server with PVM/Pk balance with a great economy and friendly players. Join now : [link]
      August 02, 2020, 11:07:53 PM
    • draholic: slayerpure idk why and cant remember but im banned there lol
      August 01, 2020, 12:57:47 PM
    • slayerpure: come check out new lit server! need players and staff. free m box to noobs        [link]      [link]
      July 30, 2020, 07:21:51 PM
    • JorgeFloyd: anal anus arrse arse ass-fudgeer asses assfudgeer assfukka asshole assholes asswhole a_s_s ballbag ballsack bastard beastial beastiality bellend bestial bestiality biatch bitch bitcher bitchers bitches bitchin bitching blowjob blowjobs boiolas bollock bollok boner boob boobies boobs booobs boooobs booooobs booooooobs breasts buceta bugger butthole buttmuch buttplug cawk chink cipa clit clitoris clits cnut penis penis-sucker penisface penishead penismunch penismuncher peniss penissuck penissucked penissucker penissucking penissucks penissuka penissukka cokmuncher coksucka coon cummer cumming cums cumshot cunilingus cunillingus cunnilingus runt runtlick runtlicker runtlicking runts cyalis cyberfuc cyberfudge cyberfudgeed cyberfudgeer cyberfudgeers cyberfudgeing dick dickhead dildo dildos dink dinks dirsa dlck dog-fudgeer doggin dogging donkeyribber doosh duche dyke ejaculate ejaculated ejaculates ejaculating ejaculatings ejaculation ejakulate fag fagging faggitt faggot faggs fagot fagots fags fanny fannyflaps fannyfudgeer fanyy fatass fcuk fcuker fcuking feck fecker felching fellate fellatio fingerfudge fingerfudgeed fingerfudgeer fingerfudgeers fingerfudgeing fingerfudges fistfudge fistfudgeed fistfudgeer fistfudgeers fistfudgeing fistfudgeings fistfudges flange fook fooker fudge fudgea fudgeed fudgeer fudgeers fudgehead fudgeheads fudgein fudgeing fudgeings fudgeingshitmotherfudgeer fudgeme fudges fudgewhit fudgewit fudgepacker fuk fuker fukker fukkin fuks fukwhit fukwit fux f_u_c_k gangbang gangbanged gangbangs gaylord gaysex goatse god-dam god-damned goddamn goddamned hardcoresex heshe hoar hoare hoer homo horniest horny hotsex jack-off jackoff jerk-off jism jiz jizm jizz kawk knob knobead knobed knobend knobhead knobjocky knobjokey kock kondum kondums kum kummer kumming kums kunilingus labia lmfao lust lusting masochist master-bate masterbate masterbation masterbations masturbate mo-fo mofo mothafudge mothafudgea mothafudgeas mothafudgeaz mothafudgeed mothafudgeer mothafudgeers mothafudgein mothafudgeing mothafudgeings mothafudges motherfudge motherfudgeed motherfudgeer motherfudgeers motherfudgein motherfudgeing motherfudgeings motherfudgeka motherfudges mutha muthafecker muthafudgeker mutherfudgeer nazi nigga niggah niggas niggaz African Africans nobhead nobjocky nobjokey numbnuts nutsack orgasim orgasims orgasm orgasms pawn pecker penis penisfudgeer phonesex phuck phuk phuked phuking phukked phukking phuks phuq pigfudgeer pimpis piss pissed pisser pissers pisses pissflaps pissin pissing pissoff poop prawns prawnso prawnsography prawnsos prick pricks pube pusse pussi pussies pussy pussys rectum retard rimjaw s.o.b. sadist schlong screwing scroat scrote scrotum semen sex sh!t shag shagger shaggin shagging shemale shi+ shit shitdick shite shited shitey shitfudge shitfull shithead shiting shitings shits shitted shitter shitters shitting shittings shitty skank slut sluts smegma smut snatch son-of-a-bitch spunk s_h_i_t teets teez testical testicle titfudge tits titt tittiefudgeer titties tittyfudge tittywank titwank tosser twat twathead twatty twunt twunter vagina viagra vulva wang wank wanker wanky whoar whore willies willy xrated xxx gay
      July 20, 2020, 06:43:34 PM
    • slayerpure: come check out a new server just got up yesterday!!!!     [link]
      July 20, 2020, 01:28:20 PM
    • slayerpure: join a new custom server! looking for staff and new players get loot boxes        [link]
      July 16, 2020, 09:04:22 PM
    • chaosgirl: Fix these forums, jesus. all the spam!!
      July 16, 2020, 04:43:19 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]
      July 16, 2020, 02:34:19 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]+
      July 16, 2020, 02:34:15 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]+
      July 16, 2020, 02:34:10 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade LINK HERE -> [link]
      July 16, 2020, 02:34:04 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 16, 2020, 02:33:33 AM
    • slayerpure: custom server with goku, vegeta, darth vader, rick and morty, joker, and world boss. join now here!!!  [link]
      July 11, 2020, 08:35:27 PM
    • dan v jad: PkOwnage! 2 Worlds! Come join us!  [link]  Join us on Discord! [link]  Download Mirrors: [link]
      July 11, 2020, 10:50:02 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 09, 2020, 12:09:03 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 09, 2020, 12:08:59 AM
    • Shady Aftermath: Skyfire317, The Only Server With Warding,Divination,Archaeology, AFK Auto Upgrade [link]
      July 09, 2020, 12:08:51 AM
    • demon dylan: anyone know moparscape call back link?
      July 08, 2020, 07:02:51 PM
    • ragnoroker: Brand new server! Less than 1 week old! Nightmare/Raids 1/2/Hydra/Pk Modes/Exp modes/ Unique  Join today - [link]
      July 04, 2020, 06:42:38 PM

    Author Topic: [194 and 317 compared] Refactored "buildMenuForPlayer" method  (Read 675 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineAmbokile

    • Member
    • ****
    • Posts: 3,009
    • Thanks: +0/-0
      • View Profile
    Pretty interesting to see the changes between the 194 client and the 317 client.

    194
    Code: Java
    1.         publicfinalvoid buildMenuForPlayer(Player targetPlayer, int data1,
    2.                         int data2, int data3){
    3.                 if(targetPlayer != localPlayer
    4.                                 && menuActionRow <400){
    5.                         String targetPlayerDisplayName =(targetPlayer.name
    6.                                         + getCombatLevelDifferenceColour(targetPlayer.combatLevel,
    7.                                                         localPlayer.combatLevel)
    8.                                         +" (level-"+ targetPlayer.combatLevel+")");
    9.                         if(itemSelected ==1){
    10.                                 menuActionName[menuActionRow]="Use "+ selectedItemName +" with @[email protected]"
    11.                                                 + targetPlayerDisplayName;
    12.                                 menuActionId[menuActionRow]=636;
    13.                                 menuActionData1[menuActionRow]= data1;
    14.                                 menuActionData2[menuActionRow]= data2;
    15.                                 menuActionData3[menuActionRow]= data3;
    16.                                 menuActionRow++;
    17.                         }elseif(spellSelected ==1){
    18.                                 if((selectedSpellUsability & 0x8)==8){
    19.                                         menuActionName[menuActionRow]= selectedSpellTooltip +" @[email protected]"+ targetPlayerDisplayName;
    20.                                         menuActionId[menuActionRow]=730;
    21.                                         menuActionData1[menuActionRow]= data1;
    22.                                         menuActionData2[menuActionRow]= data2;
    23.                                         menuActionData3[menuActionRow]= data3;
    24.                                         menuActionRow++;
    25.                                 }
    26.                         }else{
    27.                                 menuActionName[menuActionRow]="Trade with @[email protected]"+ targetPlayerDisplayName;
    28.                                 menuActionId[menuActionRow]=1682;
    29.                                 menuActionData1[menuActionRow]= data1;
    30.                                 menuActionData2[menuActionRow]= data2;
    31.                                 menuActionData3[menuActionRow]= data3;
    32.                                 menuActionRow++;
    33.                                 menuActionName[menuActionRow]="Follow @[email protected]"+ targetPlayerDisplayName;
    34.                                 menuActionId[menuActionRow]=1930;
    35.                                 menuActionData1[menuActionRow]= data1;
    36.                                 menuActionData2[menuActionRow]= data2;
    37.                                 menuActionData3[menuActionRow]= data3;
    38.                                 menuActionRow++;
    39.                                 if(wildernessLevel >0){
    40.                                         menuActionName[menuActionRow]="Attack @[email protected]"+ targetPlayerDisplayName;
    41.                                         menuActionId[menuActionRow]=1754;
    42.                                         menuActionData1[menuActionRow]= data1;
    43.                                         menuActionData2[menuActionRow]= data2;
    44.                                         menuActionData3[menuActionRow]= data3;
    45.                                         menuActionRow++;
    46.                                 }
    47.                         }
    48.                 }
    49.         }

    317
    Code: Java
    1.         privatevoid buildMenuForPlayer(Player targetPlayer, int data1, int data2,
    2.                         int data3){
    3.                 if(targetPlayer == localPlayer)
    4.                         return;
    5.                 if(menuActionRow >=400)
    6.                         return;
    7.                 String targetPlayerDisplayName;
    8.                 if(targetPlayer.skill==0)
    9.                         targetPlayerDisplayName = targetPlayer.name
    10.                                         + getCombatLevelDifferenceColour(localPlayer.combatLevel,
    11.                                                         targetPlayer.combatLevel)+" (level-"
    12.                                         + targetPlayer.combatLevel+")";
    13.                 else
    14.                         targetPlayerDisplayName = targetPlayer.name+" (skill-"+ targetPlayer.skill+")";
    15.                 if(itemSelected ==1){
    16.                         menuActionName[menuActionRow]="Use "+ selectedItemName
    17.                                         +" with @[email protected]"+ targetPlayerDisplayName;
    18.                         menuActionId[menuActionRow]=491;
    19.                         menuActionData1[menuActionRow]= data1;
    20.                         menuActionData2[menuActionRow]= data2;
    21.                         menuActionData3[menuActionRow]= data3;
    22.                         menuActionRow++;
    23.                 }elseif(spellSelected ==1){
    24.                         if((selectedSpellUsability &8)==8){
    25.                                 menuActionName[menuActionRow]= selectedSpellTooltip +" @[email protected]"
    26.                                                 + targetPlayerDisplayName;
    27.                                 menuActionId[menuActionRow]=365;
    28.                                 menuActionData1[menuActionRow]= data1;
    29.                                 menuActionData2[menuActionRow]= data2;
    30.                                 menuActionData3[menuActionRow]= data3;
    31.                                 menuActionRow++;
    32.                         }
    33.                 }else{
    34.                         for(int a =4; a >=0; a--)
    35.                                 if(playerActionNames[a]!=null){
    36.                                         menuActionName[menuActionRow]= playerActionNames[a]
    37.                                                         +" @[email protected]"+ targetPlayerDisplayName;
    38.                                         int modifier =0;
    39.                                         if(playerActionNames[a].equalsIgnoreCase("attack")){
    40.                                                 if(targetPlayer.combatLevel> localPlayer.combatLevel)
    41.                                                         modifier =2000;
    42.                                                 if(localPlayer.team!=0&& targetPlayer.team!=0)
    43.                                                         if(localPlayer.team== targetPlayer.team)
    44.                                                                 modifier =2000;
    45.                                                         else
    46.                                                                 modifier =0;
    47.                                         }elseif(playerActionNotAtTop[a])
    48.                                                 modifier =2000;
    49.                                         if(a ==0)
    50.                                                 menuActionId[menuActionRow]=561+ modifier;
    51.                                         if(a ==1)
    52.                                                 menuActionId[menuActionRow]=779+ modifier;
    53.                                         if(a ==2)
    54.                                                 menuActionId[menuActionRow]=27+ modifier;
    55.                                         if(a ==3)
    56.                                                 menuActionId[menuActionRow]=577+ modifier;
    57.                                         if(a ==4)
    58.                                                 menuActionId[menuActionRow]=729+ modifier;
    59.                                         menuActionData1[menuActionRow]= data1;
    60.                                         menuActionData2[menuActionRow]= data2;
    61.                                         menuActionData3[menuActionRow]= data3;
    62.                                         menuActionRow++;
    63.                                 }
    64.  
    65.                 }
    66.                 for(int a =0; a < menuActionRow; a++){
    67.                         if(menuActionId[a]==516){
    68.                                 menuActionName[a]="Walk here @[email protected]"+ targetPlayerDisplayName;
    69.                                 return;
    70.                         }
    71.                 }
    72.         }

    All dummies have been removed from both versions.
    Runescape Gambling

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [194 and 317 compared] Refactored "buildMenuForPlayer" method
    « Reply #1 on: November 04, 2014, 01:45:20 PM »
    Lol between 194 and 317 they decided that the wilderness wouldn't be the only area you could have pvp.

    So did the wildernessLevel just become a dummy between 194 and 317 or what?

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: [194 and 317 compared] Refactored "buildMenuForPlayer" method
    « Reply #2 on: November 05, 2014, 09:54:20 PM »
    Lol between 194 and 317 they decided that the wilderness wouldn't be the only area you could have pvp.

    So did the wildernessLevel just become a dummy between 194 and 317 or what?

    No, they relied on the client to determine the actions a player had on right-click. In modern servers we send a frame with the option and position, which gave them more control over what actions were displayed (assuming there were more than trade, follow and attack by the time 317 was around)

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal