Thread: [APOLLO] Append doesn't work anymore for me?

Results 1 to 5 of 5
  1. #1 [APOLLO] Append doesn't work anymore for me? 
    Donator

    6ix9ine's Avatar
    Join Date
    Oct 2012
    Posts
    622
    Thanks given
    514
    Thanks received
    112
    Rep Power
    582
    My big question is why is BOWS empty.

    So basically ive tried writing a few skils, but ever since I wrote potions append doesnt work. When I try to read from it, it reads Nothing, and if I send_message the variable it puts out blank space. My question is am I doing soemthing wrong?

    Ignore the code it is hardly finished, and appending was in a different class just I tried putting it in the same class to see if it would work. I need bow to read the unstrung variable, but it reads nothing.

    When I send_message the variable BOWS[primary]



    Code:
    require 'java'
    java_import 'org.apollo.game.action.Action'
    java_import 'org.apollo.game.model.Animation'
    java_import 'org.apollo.game.event.impl.ItemActionEvent'
    java_import 'org.apollo.game.model.Skill'
    
    BOW_STRING = 1777
    
    BOWS = {}
      
    class Bows
        attr_reader :unstrung, :strung
        def initialize(unstrung, strung)
          @unstrung = unstrung
          @strung = strung
        end
      end
      
       class Fletchingaction < Action
        attr_reader :started
        def initialize(character, slot, bow)
          super(0, true, character)
          @character = character
          @slot = slot
          @bow = bow
          @started = false
        end
        
        def execute
          @started = true
          character.inventory.add @bow.strung, 1
          stop
        end
      end
      
    
    on :event, :item_on_item do |ctx, player, event|
      primary = event.id
      secondary = event.target_id
      player.send_message "#{BOWS[primary]}"
      unless BOWS[primary].nil?
         player.send_message "omg does it work?"
         player.startAction Fletchingaction.new(player, event.slot, BOWS[primary])
      end
    end
      
    def append_bows(bow)
      BOWS[bow.id] = bow
    end
      
    append_bows Bows.new(50, 841)      # Normal Shortbow
    Quote Originally Posted by Huey View Post
    Because of all the nub syipkpkers nulls that runs in no way to stop them ***gots. There runing everything yyou can't even enjoy an fucking server with out an asshole with his head stuck up his *** crashing an server. Every fucking 10 minutes an asshole always log on server crashing it because of the ***got who made it... So how the hell do yall stand these ***gots that's crashing server. Damn people just move on do something else play warock or something that's what im about to start playing... if you would like to add me its [email protected] it was nice knowing ya rune-server and burn in hell server crashers
    Reply With Quote  
     

  2. #2  
    Donator

    6ix9ine's Avatar
    Join Date
    Oct 2012
    Posts
    622
    Thanks given
    514
    Thanks received
    112
    Rep Power
    582
    bump
    Quote Originally Posted by Huey View Post
    Because of all the nub syipkpkers nulls that runs in no way to stop them ***gots. There runing everything yyou can't even enjoy an fucking server with out an asshole with his head stuck up his *** crashing an server. Every fucking 10 minutes an asshole always log on server crashing it because of the ***got who made it... So how the hell do yall stand these ***gots that's crashing server. Damn people just move on do something else play warock or something that's what im about to start playing... if you would like to add me its [email protected] it was nice knowing ya rune-server and burn in hell server crashers
    Reply With Quote  
     

  3. #3  
    Donator

    6ix9ine's Avatar
    Join Date
    Oct 2012
    Posts
    622
    Thanks given
    514
    Thanks received
    112
    Rep Power
    582
    bump
    Quote Originally Posted by Huey View Post
    Because of all the nub syipkpkers nulls that runs in no way to stop them ***gots. There runing everything yyou can't even enjoy an fucking server with out an asshole with his head stuck up his *** crashing an server. Every fucking 10 minutes an asshole always log on server crashing it because of the ***got who made it... So how the hell do yall stand these ***gots that's crashing server. Damn people just move on do something else play warock or something that's what im about to start playing... if you would like to add me its [email protected] it was nice knowing ya rune-server and burn in hell server crashers
    Reply With Quote  
     

  4. #4  
    Extreme Donator


    Join Date
    May 2010
    Posts
    1,344
    Thanks given
    961
    Thanks received
    132
    Rep Power
    216
    First you do a check:
    Code:
      primary = event.id
      secondary = event.target_id
      bow = BOWS[primary]
      if bow == nil
        bow = BOWS[secondary]
      end
      if bow != nil
        player.send_message "This works: #{bow.strung}"
        ...
      end
    Reply With Quote  
     

  5. #5  
    Donator

    6ix9ine's Avatar
    Join Date
    Oct 2012
    Posts
    622
    Thanks given
    514
    Thanks received
    112
    Rep Power
    582
    I have checked BOWS is always empty
    Quote Originally Posted by Huey View Post
    Because of all the nub syipkpkers nulls that runs in no way to stop them ***gots. There runing everything yyou can't even enjoy an fucking server with out an asshole with his head stuck up his *** crashing an server. Every fucking 10 minutes an asshole always log on server crashing it because of the ***got who made it... So how the hell do yall stand these ***gots that's crashing server. Damn people just move on do something else play warock or something that's what im about to start playing... if you would like to add me its [email protected] it was nice knowing ya rune-server and burn in hell server crashers
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Server doesn't start anymore
    By Faygopenguin in forum Help
    Replies: 7
    Last Post: 07-24-2012, 10:29 PM
  2. PI Doesn't cut it anymore
    By Shaqattack118. in forum Help
    Replies: 15
    Last Post: 02-19-2012, 06:05 PM
  3. [562] RS2HD Doesn't Work Anymore
    By Charlie in forum Help
    Replies: 8
    Last Post: 09-30-2011, 09:57 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •