RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Actors name control

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 68
RMRK Junior
This script let you check if actors names have banned words in they.

Code: [Select]
#==============================================================================
# Actors name control
# By gerkrt/gerrtunk, Heretic86(Idea)
# Version: 1.0
# License: MIT, credits
# Date: 12/07/2011
# IMPORTANT NOTE: to acces the more actualitzed or corrected version of this
# script check here: http://usuarios.multimania.es/kisap/english_list.html
#==============================================================================
 
=begin
 
------INTRODUCTION------

This script let you check if actors names have banned words in they.

-------INSTRUCTIONS---------

Add any new words in Banned_words list, adding a , 'X' each time.
The switch is actived when the scripts call found what where seeking.
Note that yu can use the scripts in a conditions and efects.

is_banned?(actor_id): Call script that check if the actor have a  banned name.
  is_banned?(1) --> check for alexis actor id 1
 
is_word?(actor_id, word): Call script that check if the actors name is the word.
  is_word?(1, 'Wep')  --> check for alexis actor id and the word 'Wep'

Note that this script is case unsesitive.
=end

module Wep
  Banned_words = 'Wep', 'Joan', 'melodic'
  Switch_for_banned = 1
end

class Interpreter

  #--------------------------------------------------------------------------
  # * Is banned?
  #--------------------------------------------------------------------------
  def is_banned?(actor_id)
    for bw in Wep::Banned_words
      if bw.upcase == $game_actors[actor_id].name.upcase
        $game_switches[Wep::Switch_for_banned] = true
        return truerir
      end
    end
    return false
  end
 
  #--------------------------------------------------------------------------
  # * Is word?
  #--------------------------------------------------------------------------
  def is_word?(actor_id, bw)
    if bw.upcase == $game_actors[actor_id].name.upcase
      $game_switches[Wep::Switch_for_banned] = true
      return true
    end
    return false
  end
   
end