Getting a method not defined error in a script

I got a script that would enable me to call events from one map to another, but I keep getting a method not defined error. I had an event that would activate on player interaction and would call an event on another map

I got the script from here: https://rmrk.net/index.php?topic=49541.0

This is the script

Code:
==============================================================================
#
# ▼ Yanfly Engine Ace - Spawn Event v1.00
# -- Last Updated: 2012.02.08
# -- Level: Normal, Hard
# -- Requires: n/a
#
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.02.08 - Started Script and Finished.
# Edited for RPG Maker XP by Wrinkle
# Credit to Modern Algebra for fixing the graphic refresh bug
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# For those who would like to spawn pre-made events from the current map or
# even other maps, this script allows you to do so. With the option of spawning
# the events at specific locations or a random spot marked by a certain region,
# you can have events spawn using simple script calls. The events remain until
# a map change.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# spawn_event_location(x, y, event_id)
# spawn_event_location(x, y, event_id, map_id)
# This causes a new event to be created at location x,y on the current map with
# the data from the corresponding event and map ID.
# The map_id is where the event will be called from according to event_id.
# If no map_id is included it will call the event from your current map.
#
#==============================================================================

#==============================================================================
# ■ Game_Map
#==============================================================================

class Game_Map
 
  #--------------------------------------------------------------------------
  # new method: spawn_event
  #--------------------------------------------------------------------------
  def spawn_event(dx, dy, event_id, map_id)
    map_id = @map_id if map_id == 0
    map = load_data(sprintf("Data/Map%03d.rxdata", map_id))
    event = generated_event(map, event_id)
    return if event.nil?
    key_id = @events.keys.max + 1
    @events[key_id] = Game_Event.new(@map_id, event)
    @events[key_id].moveto(dx, dy)
    $scene.spriteset.wrinkle_refresh_event(@events[key_id])
  end
 
  #--------------------------------------------------------------------------
  # new method: generated_event
  #--------------------------------------------------------------------------
  def generated_event(map, event_id)
    for key in map.events
      event = key[1]
      next if event.nil?
      return event if event.id == event_id
    end
    return nil
  end
 
end # Game_Map

#==============================================================================
# ■ Game_Interpreter
#==============================================================================

class Interpreter
 
  #--------------------------------------------------------------------------
  # new method: spawn_event_location
  #--------------------------------------------------------------------------
  def spawn_event_location(dx, dy, event_id, map_id = 0)
    $game_map.spawn_event(dx, dy, event_id, map_id)
  end

end # Game_Interpreter

#==============================================================================
# ■ Scene_Map
#==============================================================================

class Scene_Map
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :spriteset
 
end # Scene_Map

class Spriteset_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh_Event
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def wrinkle_refresh_event(event)
    # Refresh new region event
    index = @character_sprites.size - 1
    @character_sprites.insert(index, Sprite_Character.new(@viewport1, event))
  
  end
end  #Refresh_Event


#==============================================================================
#
# ▼ End of File
#
#==============================================================================

And this is the error:

Code:
Script error in event 1 (coords 6,6), map 22 (MAP022)


Exception: NoMethodError


Message: undefined method `wrinkle_refresh_event' for nil:NilClass




***Full script:


spawn_event_location(8,8,1,1)




Backtrace:


386:Spawn_event:53:in `spawn_event'


386:Spawn_event:80:in `spawn_event_location'


(eval):1:in `execute_script'


033:Interpreter:143:in `eval'


033:Interpreter:143:in `execute_script'


034:Interpreter_Commands:1112:in `command_355'


034:Interpreter_Commands:116:in `execute_command'


033:Interpreter:133:in `block in update'


033:Interpreter:90:in `loop'


033:Interpreter:90:in `update'
1) where exactly did you install the script?
2) did you start a new game (correct) or loaded a savefile (wrong) after installing the script?
3) please show a screenshot of the full event (including properties and all pages) where you tried to use the script commands


EDIT:
You should specifically state that the script had been modified to work in RMXP despite being originally made for VXAce - that almost caused me to give wrong advice
sorry kinda new to this so didn't know what I needed to include, yes the code was rewritten for RMXP form VXAce

1)
I should add that i'm using pokemon essentials, I installed the script above Main. I inserted a new script and called it Spawn_event.

2) I did start a new game, I always do when editing script or other things

3)This is the event for calling the other event
1687192403215.png


And this is the even its trying to call
1687192671450.png


I should also explain what i'm trying to achieve. I want to have a pokémon to spawn en be interacted with at the same time another pokemon should be able to spawn and this should go on indefinetly
@NerdiusMaximus Pokémon Essentials is not supported here because Nintendo C&D'ed it, so you won't be able to get help with it on this forum.

Closing.

Original thread: https://forums.rpgmakerweb.com/threads/getting-a-method-not-defined-error-in-a-script.158490/